23 #ifndef _ACCOUNT_DIALOG_H_
24 #define _ACCOUNT_DIALOG_H_
26 #include <kdialogbase.h>
27 #include <tdelistview.h>
28 #include <klineedit.h>
29 #include <tqguardedptr.h>
30 #include "imapaccountbase.h"
32 class TQRegExpValidator;
52 class SieveConfigEditor;
53 class FolderRequester;
55 class AccountDialog :
public KDialogBase
61 AccountDialog(
const TQString & caption, KMAccount *account,
62 TQWidget *parent=0,
const char *name=0,
bool modal=
true );
63 virtual ~AccountDialog();
69 TQComboBox *locationEdit;
70 TQRadioButton *lockMutt;
71 TQRadioButton *lockMuttPriv;
72 TQRadioButton *lockProcmail;
73 TQComboBox *procmailLockFileName;
74 TQRadioButton *lockFcntl;
75 TQRadioButton *lockNone;
76 TQLineEdit *precommand;
78 TQCheckBox *resourceCheck;
79 TQPushButton *resourceClearButton;
80 TQPushButton *resourceClearPastButton;
82 TQCheckBox *includeInCheck;
83 TQCheckBox *intervalCheck;
84 TQLabel *intervalLabel;
85 KIntNumInput *intervalSpin;
86 TQComboBox *folderCombo;
88 KPIM::IdentityCombo *identityCombo;
89 TQLabel *identityLabel;
96 TQComboBox *locationEdit;
97 TQLineEdit *precommand;
99 TQCheckBox *resourceCheck;
100 TQPushButton *resourceClearButton;
101 TQPushButton *resourceClearPastButton;
103 TQCheckBox *includeInCheck;
104 TQCheckBox *intervalCheck;
105 TQLabel *intervalLabel;
106 KIntNumInput *intervalSpin;
107 TQComboBox *folderCombo;
109 KPIM::IdentityCombo *identityCombo;
110 TQLabel *identityLabel;
116 TQLineEdit *nameEdit;
117 TQLineEdit *loginEdit;
118 TQLineEdit *passwordEdit;
119 TQLineEdit *hostEdit;
120 TQLineEdit *portEdit;
121 TQLineEdit *precommand;
122 TQButtonGroup *encryptionGroup;
123 TQRadioButton *encryptionNone;
124 TQRadioButton *encryptionSSL;
125 TQRadioButton *encryptionTLS;
126 TQButtonGroup *authGroup;
127 TQRadioButton *authUser;
128 TQRadioButton *authPlain;
129 TQRadioButton *authLogin;
130 TQRadioButton *authCRAM_MD5;
131 TQRadioButton *authDigestMd5;
132 TQRadioButton *authNTLM;
133 TQRadioButton *authGSSAPI;
134 TQRadioButton *authAPOP;
136 TQPushButton *checkCapabilities;
137 TQCheckBox *usePipeliningCheck;
138 TQCheckBox *storePasswordCheck;
139 TQCheckBox *leaveOnServerCheck;
140 TQCheckBox *leaveOnServerDaysCheck;
141 KIntNumInput *leaveOnServerDaysSpin;
142 TQCheckBox *leaveOnServerCountCheck;
143 KIntNumInput *leaveOnServerCountSpin;
144 TQCheckBox *leaveOnServerSizeCheck;
145 KIntNumInput *leaveOnServerSizeSpin;
147 TQCheckBox *resourceCheck;
148 TQPushButton *resourceClearButton;
149 TQPushButton *resourceClearPastButton;
151 TQCheckBox *includeInCheck;
152 TQCheckBox *intervalCheck;
153 TQCheckBox *filterOnServerCheck;
154 TQLabel *intervalLabel;
155 KIntNumInput *intervalSpin;
156 KIntNumInput *filterOnServerSizeSpin;
157 TQComboBox *folderCombo;
159 KPIM::IdentityCombo *identityCombo;
160 TQLabel *identityLabel;
166 TQLineEdit *nameEdit;
167 TQLineEdit *loginEdit;
168 TQLineEdit *passwordEdit;
169 TQLineEdit *hostEdit;
170 TQLineEdit *portEdit;
172 TQCheckBox *resourceCheck;
173 TQPushButton *resourceClearButton;
174 TQPushButton *resourceClearPastButton;
176 TQCheckBox *autoExpungeCheck;
177 TQCheckBox *hiddenFoldersCheck;
178 TQCheckBox *subscribedFoldersCheck;
179 TQCheckBox *locallySubscribedFoldersCheck;
180 TQCheckBox *loadOnDemandCheck;
181 TQCheckBox *storePasswordCheck;
182 TQCheckBox *progressDialogCheck;
183 TQCheckBox *includeInCheck;
184 TQCheckBox *intervalCheck;
185 TQCheckBox *listOnlyOpenCheck;
186 TQLabel *intervalLabel;
187 KIntNumInput *intervalSpin;
188 TQButtonGroup *encryptionGroup;
189 TQRadioButton *encryptionNone;
190 TQRadioButton *encryptionSSL;
191 TQRadioButton *encryptionTLS;
192 TQButtonGroup *authGroup;
193 TQRadioButton *authUser;
194 TQRadioButton *authPlain;
195 TQRadioButton *authLogin;
196 TQRadioButton *authCramMd5;
197 TQRadioButton *authDigestMd5;
198 TQRadioButton *authGSSAPI;
199 TQRadioButton *authNTLM;
200 TQRadioButton *authAnonymous;
201 TQPushButton *checkCapabilities;
202 FolderRequester *trashCombo;
203 KLineEdit *personalNS;
204 KLineEdit *otherUsersNS;
206 TQToolButton *editPNS;
207 TQToolButton *editONS;
208 TQToolButton *editSNS;
209 ImapAccountBase::nsDelimMap nsMap;
210 KPIM::IdentityCombo *identityCombo;
211 TQLabel *identityLabel;
215 virtual void slotOk();
216 void slotLocationChooser();
217 void slotMaildirChooser();
218 void slotEnablePopInterval(
bool state );
219 void slotEnableImapInterval(
bool state );
220 void slotEnableLocalInterval(
bool state );
221 void slotEnableMaildirInterval(
bool state );
222 void slotFontChanged();
223 void slotLeaveOnServerClicked();
224 void slotEnableLeaveOnServerDays(
bool state );
225 void slotEnableLeaveOnServerCount(
bool state );
226 void slotEnableLeaveOnServerSize(
bool state );
227 void slotFilterOnServerClicked();
228 void slotPipeliningClicked();
229 void slotPopEncryptionChanged(
int);
230 void slotImapEncryptionChanged(
int);
231 void slotCheckPopCapabilities();
232 void slotCheckImapCapabilities();
233 void slotPopCapabilities(
const TQStringList &,
const TQStringList & );
234 void slotImapCapabilities(
const TQStringList &,
const TQStringList & );
235 void slotReloadNamespaces();
236 void slotSetupNamespaces(
const ImapAccountBase::nsDelimMap& map );
237 void slotEditPersonalNamespace();
238 void slotEditOtherUsersNamespace();
239 void slotEditSharedNamespace();
240 void slotConnectionResult(
int errorCode,
const TQString& );
241 void slotLeaveOnServerDaysChanged(
int value );
242 void slotLeaveOnServerCountChanged(
int value );
243 void slotFilterOnServerSizeChanged(
int value );
251 void makeLocalAccountPage();
252 void makeMaildirAccountPage();
253 void makePopAccountPage();
254 void makeImapAccountPage(
bool disconnected =
false );
255 void setupSettings();
257 void checkHighest( TQButtonGroup * );
258 static unsigned int popCapabilitiesFromStringList(
const TQStringList & );
259 static unsigned int imapCapabilitiesFromStringList(
const TQStringList & );
260 void enablePopFeatures(
unsigned int );
261 void enableImapAuthMethods(
unsigned int );
262 void initAccountForConnect();
263 const TQString namespaceListToString(
const TQStringList& list );
267 MaildirWidgets mMaildir;
271 TQValueList<TQGuardedPtr<KMFolder> > mFolderList;
272 TQStringList mFolderNames;
273 KMServerTest *mServerTest;
274 enum EncryptionMethods {
295 unsigned int mCurCapa;
296 unsigned int mCapaNormal;
297 unsigned int mCapaSSL;
298 unsigned int mCapaTLS;
299 KMail::SieveConfigEditor *mSieveConfigEditor;
300 TQRegExpValidator *mValidator;
303 class NamespaceLineEdit:
public KLineEdit
309 NamespaceLineEdit( TQWidget* parent );
311 const TQString& lastText() {
return mLastText; }
314 virtual void setText (
const TQString & );
320 class NamespaceEditDialog:
public KDialogBase
326 NamespaceEditDialog( TQWidget* parent, ImapAccountBase::imapNamespace type,
327 ImapAccountBase::nsDelimMap* map );
331 void slotRemoveEntry(
int );
334 ImapAccountBase::imapNamespace mType;
335 ImapAccountBase::nsDelimMap* mNamespaceMap;
336 ImapAccountBase::namespaceDelim mDelimMap;
337 TQMap<int, NamespaceLineEdit*> mLineEditMap;