kmail Library API Documentation

accountdialog.h

00001 /* -*- c++ -*- 00002 * accountdialog.h 00003 * 00004 * kmail: KDE mail client 00005 * This file: Copyright (C) 2000 Espen Sand, espen@kde.org 00006 * 00007 * This program is free software; you can redistribute it and/or modify 00008 * it under the terms of the GNU General Public License as published by 00009 * the Free Software Foundation; either version 2 of the License, or 00010 * (at your option) any later version. 00011 * 00012 * This program is distributed in the hope that it will be useful, 00013 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00015 * GNU General Public License for more details. 00016 * 00017 * You should have received a copy of the GNU General Public License 00018 * along with this program; if not, write to the Free Software 00019 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 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; // only used by normal (online) IMAP 00152 QCheckBox *hiddenFoldersCheck; 00153 QCheckBox *subscribedFoldersCheck; 00154 QCheckBox *loadOnDemandCheck; 00155 QCheckBox *storePasswordCheck; 00156 QCheckBox *progressDialogCheck; // only used by Disconnected IMAP 00157 QCheckBox *excludeCheck; 00158 QCheckBox *intervalCheck; 00159 QCheckBox *listOnlyOpenCheck; 00160 QLabel *intervalLabel; 00161 KIntNumInput *intervalSpin; 00162 QButtonGroup *encryptionGroup; 00163 QRadioButton *encryptionNone; 00164 QRadioButton *encryptionSSL; 00165 QRadioButton *encryptionTLS; 00166 QButtonGroup *authGroup; 00167 QRadioButton *authUser; 00168 QRadioButton *authPlain; 00169 QRadioButton *authLogin; 00170 QRadioButton *authCramMd5; 00171 QRadioButton *authDigestMd5; 00172 QRadioButton *authAnonymous; 00173 QPushButton *checkCapabilities; 00174 KMFolderComboBox *trashCombo; 00175 }; 00176 00177 private slots: 00178 virtual void slotOk(); 00179 void slotLocationChooser(); 00180 void slotMaildirChooser(); 00181 void slotEnablePopInterval( bool state ); 00182 void slotEnableImapInterval( bool state ); 00183 void slotEnableLocalInterval( bool state ); 00184 void slotEnableMaildirInterval( bool state ); 00185 void slotFontChanged(); 00186 void slotLeaveOnServerClicked(); 00187 void slotFilterOnServerClicked(); 00188 void slotPipeliningClicked(); 00189 void slotPopEncryptionChanged(int); 00190 void slotImapEncryptionChanged(int); 00191 void slotCheckPopCapabilities(); 00192 void slotCheckImapCapabilities(); 00193 void slotPopCapabilities( const QStringList &, const QStringList & ); 00194 void slotImapCapabilities( const QStringList &, const QStringList & ); 00195 #if 0 00196 // Moc doesn't understand #if 0, so they are also commented out 00197 // void slotClearResourceAllocations(); 00198 // void slotClearPastResourceAllocations(); 00199 #endif 00200 00201 private: 00202 void makeLocalAccountPage(); 00203 void makeMaildirAccountPage(); 00204 void makePopAccountPage(); 00205 void makeImapAccountPage( bool disconnected = false ); 00206 void setupSettings(); 00207 void saveSettings(); 00208 void checkHighest( QButtonGroup * ); 00209 static unsigned int popCapabilitiesFromStringList( const QStringList & ); 00210 static unsigned int imapCapabilitiesFromStringList( const QStringList & ); 00211 void enablePopFeatures( unsigned int ); 00212 void enableImapAuthMethods( unsigned int ); 00213 00214 private: 00215 LocalWidgets mLocal; 00216 MaildirWidgets mMaildir; 00217 PopWidgets mPop; 00218 ImapWidgets mImap; 00219 KMAccount *mAccount; 00220 QValueList<QGuardedPtr<KMFolder> > mFolderList; 00221 QStringList mFolderNames; 00222 KMServerTest *mServerTest; 00223 enum EncryptionMethods { 00224 NoEncryption = 0, 00225 SSL = 1, 00226 TLS = 2 00227 }; 00228 enum Capabilities { 00229 Plain = 1, 00230 Login = 2, 00231 CRAM_MD5 = 4, 00232 Digest_MD5 = 8, 00233 Anonymous = 16, 00234 APOP = 32, 00235 Pipelining = 64, 00236 TOP = 128, 00237 UIDL = 256, 00238 STLS = 512, // TLS for POP 00239 STARTTLS = 512, // TLS for IMAP 00240 AllCapa = 0xffffffff 00241 }; 00242 unsigned int mCurCapa; 00243 unsigned int mCapaNormal; 00244 unsigned int mCapaSSL; 00245 unsigned int mCapaTLS; 00246 KMail::SieveConfigEditor *mSieveConfigEditor; 00247 QRegExpValidator *mValidator; 00248 }; 00249 00250 00251 #endif
KDE Logo
This file is part of the documentation for kmail Library Version 3.3.0.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Fri Aug 27 12:52:01 2004 by doxygen 1.3.8 written by Dimitri van Heesch, © 1997-2003