kmail

kmfoldercombobox.h
1 /* kmail folder-list combo-box
2  * A specialized TQComboBox widget that refreshes its contents when
3  * the folder list changes.
4  */
5 
6 #ifndef __KMFOLDERCOMBOBOX
7 #define __KMFOLDERCOMBOBOX
8 
9 #include "kmfolder.h"
10 
11 #include <tqcombobox.h>
12 #include <tqguardedptr.h>
13 
14 class KMFolderComboBox : public TQComboBox
15 {
16  TQ_OBJECT
17 
18 
19 public:
20  KMFolderComboBox( TQWidget *parent = 0, char *name = 0 );
21  KMFolderComboBox( bool rw, TQWidget *parent = 0, char *name = 0 );
22 
24  void showOutboxFolder(bool shown);
25 
27  void showImapFolders(bool shown);
28 
29  void setFolder( KMFolder *aFolder );
30  void setFolder( const TQString &idString );
31  KMFolder *getFolder();
32 
33 public slots:
35  void refreshFolders();
36 
37 private slots:
38  void slotActivated(int index);
39 
40 private:
42  void createFolderList(TQStringList *names,
43  TQValueList<TQGuardedPtr<KMFolder> > *folders);
44  void init();
45 
46  TQGuardedPtr<KMFolder> mFolder;
47  bool mOutboxShown;
48  bool mImapShown;
49  int mSpecialIdx;
50 };
51 
52 #endif /* __KMFOLDERCOMBOBOX */
Mail folder.
Definition: kmfolder.h:69