kmfoldercombobox.h
00001 /* kmail folder-list combo-box 00002 * A specialized TQComboBox widget that refreshes its contents when 00003 * the folder list changes. 00004 */ 00005 00006 #ifndef __KMFOLDERCOMBOBOX 00007 #define __KMFOLDERCOMBOBOX 00008 00009 #include "kmfolder.h" 00010 00011 #include <tqcombobox.h> 00012 #include <tqguardedptr.h> 00013 00014 class KMFolderComboBox : public TQComboBox 00015 { 00016 Q_OBJECT 00017 00018 00019 public: 00020 KMFolderComboBox( TQWidget *parent = 0, char *name = 0 ); 00021 KMFolderComboBox( bool rw, TQWidget *parent = 0, char *name = 0 ); 00022 00024 void showOutboxFolder(bool shown); 00025 00027 void showImapFolders(bool shown); 00028 00029 void setFolder( KMFolder *aFolder ); 00030 void setFolder( const TQString &idString ); 00031 KMFolder *getFolder(); 00032 00033 public slots: 00035 void refreshFolders(); 00036 00037 private slots: 00038 void slotActivated(int index); 00039 00040 private: 00042 void createFolderList(TQStringList *names, 00043 TQValueList<TQGuardedPtr<KMFolder> > *folders); 00044 void init(); 00045 00046 TQGuardedPtr<KMFolder> mFolder; 00047 bool mOutboxShown; 00048 bool mImapShown; 00049 int mSpecialIdx; 00050 }; 00051 00052 #endif /* __KMFOLDERCOMBOBOX */