00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifdef HAVE_CONFIG_H
00024 #include <config.h>
00025 #endif
00026
00027 #include <tqbuttongroup.h>
00028 #include <tqlayout.h>
00029 #include <tqradiobutton.h>
00030
00031 #include <klocale.h>
00032
00033 #include "kmacctseldlg.moc"
00034
00035 KMAcctSelDlg::KMAcctSelDlg( TQWidget *parent, const char *name, bool modal )
00036 : KDialogBase( parent, name, modal, i18n("Add Account"), Ok|Cancel, Ok )
00037 {
00038 TQFrame *page = makeMainWidget();
00039 TQVBoxLayout *topLayout = new TQVBoxLayout( page, 0, spacingHint() );
00040
00041 TQButtonGroup *group = new TQButtonGroup( i18n("Account Type"), page );
00042 connect(group, TQT_SIGNAL(clicked(int)), TQT_SLOT(buttonClicked(int)) );
00043
00044 topLayout->addWidget( group, 10 );
00045 TQVBoxLayout *vlay = new TQVBoxLayout( group, spacingHint()*2, spacingHint() );
00046 vlay->addSpacing( fontMetrics().lineSpacing() );
00047
00048 TQRadioButton *radioButton1 = new TQRadioButton( i18n("&Local mailbox"), group );
00049 vlay->addWidget( radioButton1 );
00050 TQRadioButton *radioButton2 = new TQRadioButton( i18n("&POP3"), group );
00051 vlay->addWidget( radioButton2 );
00052 TQRadioButton *radioButton3 = new TQRadioButton( i18n("&IMAP"), group );
00053 vlay->addWidget( radioButton3 );
00054 TQRadioButton *radioButton4 = new TQRadioButton( i18n("&Disconnected IMAP"), group );
00055 vlay->addWidget( radioButton4 );
00056 TQRadioButton *radioButton5 = new TQRadioButton( i18n("&Maildir mailbox"), group );
00057 vlay->addWidget( radioButton5 );
00058
00059 vlay->addStretch( 10 );
00060
00061 radioButton2->setChecked(true);
00062 buttonClicked(1);
00063 }
00064
00065
00066 void KMAcctSelDlg::buttonClicked( int id )
00067 {
00068 mSelectedButton = id;
00069 }
00070
00071
00072 int KMAcctSelDlg::selected( void ) const
00073 {
00074 return mSelectedButton;
00075 }
00076
00077