kmail
kmfoldercombobox.h
Go to the documentation of this file.00001 /* kmail folder-list combo-box 00002 * A specialized QComboBox 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 <qcombobox.h> 00012 #include <qguardedptr.h> 00013 00014 class KMFolderComboBox : public QComboBox 00015 { 00016 Q_OBJECT 00017 00018 public: 00019 KMFolderComboBox( QWidget *parent = 0, char *name = 0 ); 00020 KMFolderComboBox( bool rw, QWidget *parent = 0, char *name = 0 ); 00021 00023 void showOutboxFolder(bool shown); 00024 00026 void showImapFolders(bool shown); 00027 00028 void setFolder( KMFolder *aFolder ); 00029 void setFolder( const QString &idString ); 00030 KMFolder *getFolder(); 00031 00032 public slots: 00034 void refreshFolders(); 00035 00036 private slots: 00037 void slotActivated(int index); 00038 00039 private: 00041 void createFolderList(QStringList *names, 00042 QValueList<QGuardedPtr<KMFolder> > *folders); 00043 void init(); 00044 00045 QGuardedPtr<KMFolder> mFolder; 00046 bool mOutboxShown; 00047 bool mImapShown; 00048 int mSpecialIdx; 00049 }; 00050 00051 #endif /* __KMFOLDERCOMBOBOX */