00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029 #ifndef KMWIZARD_H
00030 #define KMWIZARD_H
00031
00032 #include <kwizard.h>
00033
00034 class KLineEdit;
00035 class TQCheckBox;
00036 class TQLabel;
00037 class TQPushButton;
00038
00039 class KMAccount;
00040 class KMKernel;
00041 class KMServerTest;
00042 class AccountTypeBox;
00043 class KMTransportInfo;
00044
00045 class AccountWizard : public KWizard
00046 {
00047 Q_OBJECT
00048
00049
00050 public:
00058 static void start( KMKernel *kernel, TQWidget *parent = 0 );
00059
00063 void showPage( TQWidget *page );
00064
00065 protected:
00066 AccountWizard( KMKernel *kernel, TQWidget *parent );
00067 ~AccountWizard() {};
00068
00069 void setupWelcomePage();
00070 void setupAccountTypePage();
00071 void setupAccountInformationPage();
00072 void setupLoginInformationPage();
00073 void setupServerInformationPage();
00074
00075 protected slots:
00076 void chooseLocation();
00077 virtual void accept();
00078 void createTransport();
00079 void transportCreated();
00080 void createAccount();
00081 void accountCreated();
00082 void finished();
00083
00084 private slots:
00085 void popCapabilities( const TQStringList&, const TQStringList& );
00086 void imapCapabilities( const TQStringList&, const TQStringList& );
00087 void smtpCapabilities( const TQStringList&, const TQStringList&,
00088 const TQString&, const TQString&, const TQString& );
00089
00090 private:
00091 TQString accountName() const;
00092 TQLabel *createInfoLabel( const TQString &msg );
00093
00094 void checkPopCapabilities( const TQString&, int );
00095 void checkImapCapabilities( const TQString&, int );
00096 void checkSmtpCapabilities( const TQString&, int );
00097 uint popCapabilitiesFromStringList( const TQStringList& );
00098 uint imapCapabilitiesFromStringList( const TQStringList& );
00099 uint authMethodsFromString( const TQString& );
00100 uint authMethodsFromStringList( const TQStringList& );
00101
00102 TQWidget *mWelcomePage;
00103
00104 TQWidget *mAccountTypePage;
00105 AccountTypeBox *mTypeBox;
00106
00107 TQWidget *mAccountInformationPage;
00108 KLineEdit *mRealName;
00109 KLineEdit *mEMailAddress;
00110 KLineEdit *mOrganization;
00111
00112 TQWidget *mLoginInformationPage;
00113 KLineEdit *mLoginName;
00114 KLineEdit *mPassword;
00115
00116 TQWidget *mServerInformationPage;
00117 TQLabel *mIncomingLabel;
00118 KLineEdit *mIncomingServer;
00119 TQCheckBox *mIncomingUseSSL;
00120 KLineEdit *mIncomingLocation;
00121
00122 TQPushButton *mChooseLocation;
00123 KLineEdit *mOutgoingServer;
00124 TQCheckBox *mOutgoingUseSSL;
00125 TQCheckBox *mLocalDelivery;
00126
00127 TQWidget *mIncomingServerWdg;
00128 TQWidget *mIncomingLocationWdg;
00129
00130 TQLabel *mAuthInfoLabel;
00131
00132 KMKernel *mKernel;
00133 KMAccount *mAccount;
00134 KMTransportInfo *mTransportInfo;
00135 TQPtrList<KMTransportInfo> mTransportInfoList;
00136 KMServerTest *mServerTest;
00137 };
00138
00139 #endif