kmail

kmfolderdia.h
1
31#ifndef __KMFOLDERDIA
32#define __KMFOLDERDIA
33
34#include <kdialogbase.h>
35#include "configuredialog_p.h"
36#include <tqvaluevector.h>
37
38class TQCheckBox;
39class TQPushButton;
40class TQLineEdit;
41class TQListBox;
42class TQComboBox;
43class KMFolder;
44class KMFolderTreeItem;
45class KMFolderDir;
46class KIntNumInput;
47class TDEIconButton;
48class KEditListBox;
49namespace KPIM { class IdentityCombo; }
50class KMFolderDialog;
51class KMFolderTree;
52template <typename T> class TQGuardedPtr;
53class TemplatesConfiguration;
54class KPushButton;
55
56namespace KMail {
57 class FolderRequester;
69class FolderDiaTab : public TQWidget
70{
71 TQ_OBJECT
72
73public:
74 FolderDiaTab( TQWidget *parent=0, const char* name=0 )
75 : TQWidget( parent, name ) {}
76
77 virtual void load() = 0;
78
83 virtual bool save() = 0;
84
85 enum AccepStatus { Accepted, Canceled, Delayed };
90 virtual AccepStatus accept() {
91 return save() ? Accepted : Canceled;
92 }
93
94signals:
98
102
104 void changed(bool);
105};
106
112{
113 TQ_OBJECT
114
115
116public:
118 const TQString& aName,
119 TQWidget* parent, const char* name = 0 );
120
121 virtual void load();
122 virtual bool save();
123
124private slots:
125 void slotChangeIcon( TQString icon );
126 /*
127 * is called if the folder dropdown changes
128 * then we update the other items to reflect the capabilities
129 */
130 void slotFolderNameChanged( const TQString& );
131 void slotFolderContentsSelectionChanged( int );
132
133private:
134 void initializeWithValuesFromFolder( KMFolder* folder );
135
136private:
137 TQComboBox *mShowSenderReceiverComboBox;
138 TQComboBox *mContentsComboBox;
139 TQComboBox *mIncidencesForComboBox;
140 TQCheckBox *mAlarmsBlockedCheckBox;
141 TQCheckBox *mSharedSeenFlagsCheckBox;
142 TQLabel *mNormalIconLabel;
143 TDEIconButton *mNormalIconButton;
144 TQLabel *mUnreadIconLabel;
145 TDEIconButton *mUnreadIconButton;
146 TQCheckBox *mIconsCheckBox;
147 TQCheckBox *mNewMailCheckBox;
148 TQCheckBox *mNotifyOnNewMailCheckBox;
149 TQCheckBox *mKeepRepliesInSameFolderCheckBox;
150 KLineEdit *mNameEdit;
151
152 KPIM::IdentityCombo *mIdentityComboBox;
153
154 KMFolderDialog* mDlg;
155 bool mIsLocalSystemFolder;
156 bool mIsResourceFolder;
157};
158
164{
165 TQ_OBJECT
166
167
168public:
169 FolderDiaTemplatesTab( KMFolderDialog *dlg, TQWidget *parent );
170
171 virtual void load();
172 virtual bool save();
173
174public slots:
175 void slotEmitChanged(); // do nothing for now
176
177 void slotCopyGlobal();
178
179private:
180 void initializeWithValuesFromFolder( KMFolder* folder );
181
182private:
183 TQCheckBox* mCustom;
184 TemplatesConfiguration* mWidget;
185 KPushButton* mCopyGlobal;
186 KMFolder* mFolder;
187 uint mIdentity;
188
189 KMFolderDialog* mDlg;
190 bool mIsLocalSystemFolder;
191};
192
193} // end of namespace KMail
194
198class KMFolderDialog : public KDialogBase
199{
200 TQ_OBJECT
201
202
203public:
204 KMFolderDialog( KMFolder *folder, KMFolderDir *aFolderDir,
205 KMFolderTree* parent, const TQString& caption,
206 const TQString& name = TQString() );
207
208 KMFolder* folder() const { return mFolder; }
209 void setFolder( KMFolder* folder );
210 // Was mFolder just created? (This only makes sense from save())
211 // If Apply is clicked, or OK proceeeds half-way, then next time "new folder" will be false.
212 bool isNewFolder() const { return mIsNewFolder; }
213
214 KMFolderDir* folderDir() const { return mFolderDir; }
215 typedef TQValueList<TQGuardedPtr<KMFolder> > FolderList;
216
217 KMFolder* parentFolder() const { return mParentFolder; }
218
219 KMFolderTree* folderTree() const { return mFolderTree; }
220
221protected slots:
222 void slotChanged( bool );
223 virtual void slotOk();
224 virtual void slotApply();
225
226 void slotReadyForAccept();
227 void slotCancelAccept();
228
229private:
230 void addTab( KMail::FolderDiaTab* tab );
231
232private:
233 // Can be 0 initially when creating a folder, but will be set by save() in the first tab.
234 TQGuardedPtr<KMFolder> mFolder;
235 TQGuardedPtr<KMFolderDir> mFolderDir;
236 TQGuardedPtr<KMFolder> mParentFolder;
237
238 bool mIsNewFolder; // if true, save() did set mFolder.
239
240 TQValueVector<KMail::FolderDiaTab*> mTabs;
241 int mDelayedSavingTabs; // this should go into a base class one day
242 KMFolderTree* mFolderTree;
243};
244
245#endif /*__KMFOLDERDIA*/
246
Dialog for handling the properties of a mail folder.
Definition: kmfolderdia.h:199
KMail list that manages the contents of one directory that may contain folders and/or other directori...
Definition: kmfolderdir.h:16
Mail folder.
Definition: kmfolder.h:69
"General" tab in the folder dialog Internal class, only used by KMFolderDialog
Definition: kmfolderdia.h:112
virtual bool save()
Unlike ConfigModuleTab, we return a bool from save.
This is the base class for tabs in the folder dialog.
Definition: kmfolderdia.h:70
virtual AccepStatus accept()
Called when clicking OK.
Definition: kmfolderdia.h:90
virtual bool save()=0
Unlike ConfigModuleTab, we return a bool from save.
void changed(bool)
Called when this module was changed [not really used yet].
void readyForAccept()
Emit this to tell the dialog that you're done with the async jobs, and that the dialog can be closed.
void cancelAccept()
Emit this, i.e.
"Templates" tab in the folder dialog Internal class, only used by KMFolderDialog
Definition: kmfolderdia.h:164
virtual bool save()
Unlike ConfigModuleTab, we return a bool from save.
folderdiaquotatab.h
Definition: aboutdata.cpp:40