Logo Search packages:      
Sourcecode: mailody-kde4 version File versions  Download package

SetupIdentities::SetupIdentities ( QWidget *  parent = 0  ) 

Constructor

Parameters:
parent Parent Widget

Definition at line 46 of file setupidentities.cpp.

References updateButtons().

        : QWidget( parent )
{
    QGridLayout *mainGrid = new QGridLayout( this );

    m_identybox = new KListWidget( this );
    m_identybox->setAcceptDrops( false );
    connect( m_identybox,
             SIGNAL( currentItemChanged( QListWidgetItem*, QListWidgetItem* ) ),
             SLOT( slotSelectionChanged( QListWidgetItem*, QListWidgetItem* ) ) );

    mainGrid->addWidget( m_identybox, 0, 0, 1, 2, Qt::AlignLeft );

    QPushButton *add = new QPushButton( i18n( "Add" ), this );
    add->setWhatsThis( i18n( "Add new identity" ) );
    connect( add, SIGNAL( clicked() ), SLOT( slotAdd() ) );
    mainGrid->addWidget( add, 1, 0, Qt::AlignLeft );

    m_del = new QPushButton( i18n( "Remove" ), this );
    m_del->setWhatsThis( i18n( "Remove the selected identity" ) );
    connect( m_del, SIGNAL( clicked() ), SLOT( slotDel() ) );
    mainGrid->addWidget( m_del, 1, 1, Qt::AlignLeft );

    m_tabWidget = new KTabWidget( this );

    mainGrid->addWidget( m_tabWidget, 0, 2, 2, 4 );
    mainGrid->setRowStretch( 0, 0 );
    mainGrid->setColumnStretch( 1, 0 );
    mainGrid->setColumnStretch( 2, 0 );
    mainGrid->setColumnStretch( 3, 2 );
    mainGrid->setColumnStretch( 4, 2 );
    mainGrid->setColumnStretch( 5, 2 );
    mainGrid->setColumnMinimumWidth( 3, 150 );
    mainGrid->setColumnMinimumWidth( 4, 50 );
    mainGrid->setColumnMinimumWidth( 5, 100 );

    // -------------- page 1 ---------------------- //

    QWidget *page1 = new QWidget( this );
    QGridLayout *m1 = new QGridLayout( page1 );

    QLabel *l0 = new QLabel( i18n( "Identity name:" ) + ' ', page1 );
    l0->setAlignment( Qt::AlignRight | Qt::AlignVCenter );
    m1->addWidget( l0, 0, 0 );
    l0->setWhatsThis( i18n( "The label of this identiy" ) );
    m_identityName = new KLineEdit( page1 );
    connect( m_identityName, SIGNAL( textChanged( const QString& ) ),
             SLOT( slotIdentityNameEdit( const QString& ) ) );
    m1->addWidget( m_identityName, 0, 1 );
    l0->setBuddy( m_identityName );

    QLabel *l1 = new QLabel( i18n( "Full name:" ) + ' ', page1 );
    l1->setAlignment( Qt::AlignRight | Qt::AlignVCenter );
    l1->setWhatsThis( i18n( "Your full name, shown in messages you send using this identity." ) );
    m1->addWidget( l1, 1, 0 );
    m_fullName = new KLineEdit( page1 );
    m1->addWidget( m_fullName, 1, 1 );
    l1->setBuddy( m_fullName );

    QLabel *l2 = new QLabel( i18n( "E-Mail Address:" ) + ' ', page1 );
    l2->setAlignment( Qt::AlignRight | Qt::AlignVCenter );
    l2->setWhatsThis( i18n( "Your E-Mail Address" ) );
    m1->addWidget( l2, 2, 0 );
    m_emailAddress = new KLineEdit( page1 );
    m1->addWidget( m_emailAddress, 2, 1 );
    l2->setBuddy( m_emailAddress );

//X     QLabel *htmlp = new QLabel( i18n( "Include HTML part:" ) + ' ', page1 );
//X     m1->addWidget( htmlp, 6, 0 );
//X     htmlp->setAlignment( Qt::AlignRight | Qt::AlignVCenter );
    m_htmlPart = new QGroupBox( i18n( "Include Auto HTML Part:" ), page1 );
    m_htmlPart->setWhatsThis( i18n( "Mailody is able to convert your plain "
                                    "message to a html message and include that "
                                    "in the outgoing message. This means the "
                                    "receiver will also have clickable links and "
                                    "colored quote levels." ) );
    QHBoxLayout *htmlPartLay = new QHBoxLayout( m_htmlPart );
    htmlPartLay->setMargin( 0 );
    htmlPartLay->setSpacing( KDialog::spacingHint() );
    QRadioButton *yes = new QRadioButton( i18n( "Yes" ), m_htmlPart );
    QRadioButton *no = new QRadioButton( i18n( "No" ), m_htmlPart );
    htmlPartLay->addWidget( yes );
    htmlPartLay->addWidget( no );
    m1->addWidget( m_htmlPart, 6, 0, 1, 2 );
//X     htmlp->setBuddy( m_htmlPart );

    m_htmlPart_group = new QButtonGroup( page1 );
    m_htmlPart_group->addButton( no, 1 );
    m_htmlPart_group->addButton( yes, 2 );

    m_htmlPrefer = new QGroupBox( i18n( "Prefer composer HTML mode:" ), page1 );
    m_htmlPrefer->setWhatsThis( i18n( "This sets the composer to HTML mode by default" ) );
    QHBoxLayout *htmlPreferLay = new QHBoxLayout( m_htmlPrefer );
    htmlPreferLay->setMargin( 0 );
    htmlPreferLay->setSpacing( KDialog::spacingHint() );
    QRadioButton *yes2 = new QRadioButton( i18n( "Yes" ), m_htmlPrefer );
    QRadioButton *no2 = new QRadioButton( i18n( "No" ), m_htmlPrefer );
    htmlPreferLay->addWidget( yes2 );
    htmlPreferLay->addWidget( no2 );
    m1->addWidget( m_htmlPrefer, 7, 0, 1, 2 );

    m_htmlPrefer_group = new QButtonGroup( page1 );
    m_htmlPrefer_group->addButton( no2, 1 );
    m_htmlPrefer_group->addButton( yes2, 2 );

    m_sigPos = new QGroupBox( i18n( "Signature position:" ), page1 );
    m_sigPos->setWhatsThis( i18n( "Location of the signature when replying to messages" ) );
    QHBoxLayout *sigPosLay = new QHBoxLayout( m_sigPos );
    sigPosLay->setMargin( 0 );
    sigPosLay->setSpacing( KDialog::spacingHint() );
    QRadioButton *yes3 = new QRadioButton( i18n( "Top" ), m_sigPos );
    QRadioButton *no3 = new QRadioButton( i18n( "Bottom" ), m_sigPos );
    sigPosLay->addWidget( yes3 );
    sigPosLay->addWidget( no3 );
    m1->addWidget( m_sigPos, 8, 0, 1, 2 );

    m_sigPos_group = new QButtonGroup( page1 );
    m_sigPos_group->addButton( no3, 1 );
    m_sigPos_group->addButton( yes3, 2 );

    QSpacerItem *spacer1 = new QSpacerItem( 50, 50, QSizePolicy::Minimum,
                                            QSizePolicy::Expanding );
    m1->addItem( spacer1, 9, 1 );

    m_tabWidget->addTab( page1,i18n( "General" ) );

    // ------------------- page 2 -----------------------//
    QWidget *page2 = new QWidget( this );
    QBoxLayout *m2 = new QBoxLayout( QBoxLayout::TopToBottom, page2 );

    m_signatureWidget = new KPIMIdentities::SignatureConfigurator( page2 );
    m2->addWidget( m_signatureWidget );

    m_tabWidget->addTab( page2,i18n( "Signature" ) );
    //---------------------------------------------------//

    readSettings();
    m_tabWidget->setEnabled( false );

    updateButtons();
}


Generated by  Doxygen 1.6.0   Back to index