accountdialog.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef _ACCOUNT_DIALOG_H_
00024 #define _ACCOUNT_DIALOG_H_
00025
00026 #include <kdialogbase.h>
00027 #include "kmfoldercombobox.h"
00028
00029 class QRegExpValidator;
00030 class QCheckBox;
00031 class QComboBox;
00032 class QPushButton;
00033 class QLabel;
00034 class QLineEdit;
00035 class QRadioButton;
00036 class KIntNumInput;
00037 class KMAccount;
00038 class KMFolder;
00039 class KMServerTest;
00040 class QButtonGroup;
00041 namespace KMail {
00042 class SieveConfigEditor;
00043 }
00044
00045 class AccountDialog : public KDialogBase
00046 {
00047 Q_OBJECT
00048
00049 public:
00050 AccountDialog( const QString & caption, KMAccount *account,
00051 QWidget *parent=0, const char *name=0, bool modal=true );
00052 virtual ~AccountDialog();
00053 private:
00054 struct LocalWidgets
00055 {
00056 QLabel *titleLabel;
00057 QLineEdit *nameEdit;
00058 QComboBox *locationEdit;
00059 QRadioButton *lockMutt;
00060 QRadioButton *lockMuttPriv;
00061 QRadioButton *lockProcmail;
00062 QComboBox *procmailLockFileName;
00063 QRadioButton *lockFcntl;
00064 QRadioButton *lockNone;
00065 QLineEdit *precommand;
00066 #if 0
00067 QCheckBox *resourceCheck;
00068 QPushButton *resourceClearButton;
00069 QPushButton *resourceClearPastButton;
00070 #endif
00071 QCheckBox *excludeCheck;
00072 QCheckBox *intervalCheck;
00073 QLabel *intervalLabel;
00074 KIntNumInput *intervalSpin;
00075 QComboBox *folderCombo;
00076 QComboBox *identityCombo;
00077 };
00078
00079 struct MaildirWidgets
00080 {
00081 QLabel *titleLabel;
00082 QLineEdit *nameEdit;
00083 QComboBox *locationEdit;
00084 QLineEdit *precommand;
00085 #if 0
00086 QCheckBox *resourceCheck;
00087 QPushButton *resourceClearButton;
00088 QPushButton *resourceClearPastButton;
00089 #endif
00090 QCheckBox *excludeCheck;
00091 QCheckBox *intervalCheck;
00092 QLabel *intervalLabel;
00093 KIntNumInput *intervalSpin;
00094 QComboBox *folderCombo;
00095 QComboBox *identityCombo;
00096 };
00097
00098 struct PopWidgets
00099 {
00100 QLabel *titleLabel;
00101 QLineEdit *nameEdit;
00102 QLineEdit *loginEdit;
00103 QLineEdit *passwordEdit;
00104 QLineEdit *hostEdit;
00105 QLineEdit *portEdit;
00106 QLineEdit *precommand;
00107 QButtonGroup *encryptionGroup;
00108 QRadioButton *encryptionNone;
00109 QRadioButton *encryptionSSL;
00110 QRadioButton *encryptionTLS;
00111 QButtonGroup *authGroup;
00112 QRadioButton *authUser;
00113 QRadioButton *authPlain;
00114 QRadioButton *authLogin;
00115 QRadioButton *authCRAM_MD5;
00116 QRadioButton *authDigestMd5;
00117 QRadioButton *authAPOP;
00118 QPushButton *checkCapabilities;
00119 QCheckBox *usePipeliningCheck;
00120 QCheckBox *storePasswordCheck;
00121 QCheckBox *leaveOnServerCheck;
00122 #if 0
00123 QCheckBox *resourceCheck;
00124 QPushButton *resourceClearButton;
00125 QPushButton *resourceClearPastButton;
00126 #endif
00127 QCheckBox *excludeCheck;
00128 QCheckBox *intervalCheck;
00129 QCheckBox *filterOnServerCheck;
00130 QLabel *intervalLabel;
00131 KIntNumInput *intervalSpin;
00132 KIntNumInput *filterOnServerSizeSpin;
00133 QComboBox *folderCombo;
00134 QComboBox *identityCombo;
00135 };
00136
00137 struct ImapWidgets
00138 {
00139 QLabel *titleLabel;
00140 QLineEdit *nameEdit;
00141 QLineEdit *loginEdit;
00142 QLineEdit *passwordEdit;
00143 QLineEdit *hostEdit;
00144 QLineEdit *portEdit;
00145 QLineEdit *prefixEdit;
00146 #if 0
00147 QCheckBox *resourceCheck;
00148 QPushButton *resourceClearButton;
00149 QPushButton *resourceClearPastButton;
00150 #endif
00151 QCheckBox *autoExpungeCheck;
00152 QCheckBox *hiddenFoldersCheck;
00153 QCheckBox *subscribedFoldersCheck;
00154 QCheckBox *locallySubscribedFoldersCheck;
00155 QCheckBox *loadOnDemandCheck;
00156 QCheckBox *storePasswordCheck;
00157 QCheckBox *progressDialogCheck;
00158 QCheckBox *excludeCheck;
00159 QCheckBox *intervalCheck;
00160 QCheckBox *listOnlyOpenCheck;
00161 QLabel *intervalLabel;
00162 KIntNumInput *intervalSpin;
00163 QButtonGroup *encryptionGroup;
00164 QRadioButton *encryptionNone;
00165 QRadioButton *encryptionSSL;
00166 QRadioButton *encryptionTLS;
00167 QButtonGroup *authGroup;
00168 QRadioButton *authUser;
00169 QRadioButton *authPlain;
00170 QRadioButton *authLogin;
00171 QRadioButton *authCramMd5;
00172 QRadioButton *authDigestMd5;
00173 QRadioButton *authAnonymous;
00174 QPushButton *checkCapabilities;
00175 KMFolderComboBox *trashCombo;
00176 };
00177
00178 private slots:
00179 virtual void slotOk();
00180 void slotLocationChooser();
00181 void slotMaildirChooser();
00182 void slotEnablePopInterval( bool state );
00183 void slotEnableImapInterval( bool state );
00184 void slotEnableLocalInterval( bool state );
00185 void slotEnableMaildirInterval( bool state );
00186 void slotFontChanged();
00187 void slotLeaveOnServerClicked();
00188 void slotFilterOnServerClicked();
00189 void slotPipeliningClicked();
00190 void slotPopEncryptionChanged(int);
00191 void slotImapEncryptionChanged(int);
00192 void slotCheckPopCapabilities();
00193 void slotCheckImapCapabilities();
00194 void slotPopCapabilities( const QStringList &, const QStringList & );
00195 void slotImapCapabilities( const QStringList &, const QStringList & );
00196 #if 0
00197
00198
00199
00200 #endif
00201
00202 private:
00203 void makeLocalAccountPage();
00204 void makeMaildirAccountPage();
00205 void makePopAccountPage();
00206 void makeImapAccountPage( bool disconnected = false );
00207 void setupSettings();
00208 void saveSettings();
00209 void checkHighest( QButtonGroup * );
00210 static unsigned int popCapabilitiesFromStringList( const QStringList & );
00211 static unsigned int imapCapabilitiesFromStringList( const QStringList & );
00212 void enablePopFeatures( unsigned int );
00213 void enableImapAuthMethods( unsigned int );
00214
00215 private:
00216 LocalWidgets mLocal;
00217 MaildirWidgets mMaildir;
00218 PopWidgets mPop;
00219 ImapWidgets mImap;
00220 KMAccount *mAccount;
00221 QValueList<QGuardedPtr<KMFolder> > mFolderList;
00222 QStringList mFolderNames;
00223 KMServerTest *mServerTest;
00224 enum EncryptionMethods {
00225 NoEncryption = 0,
00226 SSL = 1,
00227 TLS = 2
00228 };
00229 enum Capabilities {
00230 Plain = 1,
00231 Login = 2,
00232 CRAM_MD5 = 4,
00233 Digest_MD5 = 8,
00234 Anonymous = 16,
00235 APOP = 32,
00236 Pipelining = 64,
00237 TOP = 128,
00238 UIDL = 256,
00239 STLS = 512,
00240 STARTTLS = 512,
00241 AllCapa = 0xffffffff
00242 };
00243 unsigned int mCurCapa;
00244 unsigned int mCapaNormal;
00245 unsigned int mCapaSSL;
00246 unsigned int mCapaTLS;
00247 KMail::SieveConfigEditor *mSieveConfigEditor;
00248 QRegExpValidator *mValidator;
00249 };
00250
00251
00252 #endif
This file is part of the documentation for kmail Library Version 3.3.2.