diff options
author | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
---|---|---|
committer | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
commit | 460c52653ab0dcca6f19a4f492ed2c5e4e963ab0 (patch) | |
tree | 67208f7c145782a7e90b123b982ca78d88cc2c87 /kmail/kmfoldercombobox.h | |
download | tdepim-460c52653ab0dcca6f19a4f492ed2c5e4e963ab0.tar.gz tdepim-460c52653ab0dcca6f19a4f492ed2c5e4e963ab0.zip |
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kmail/kmfoldercombobox.h')
-rw-r--r-- | kmail/kmfoldercombobox.h | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/kmail/kmfoldercombobox.h b/kmail/kmfoldercombobox.h new file mode 100644 index 000000000..1b46c104f --- /dev/null +++ b/kmail/kmfoldercombobox.h @@ -0,0 +1,51 @@ +/* kmail folder-list combo-box + * A specialized QComboBox widget that refreshes its contents when + * the folder list changes. + */ + +#ifndef __KMFOLDERCOMBOBOX +#define __KMFOLDERCOMBOBOX + +#include "kmfolder.h" + +#include <qcombobox.h> +#include <qguardedptr.h> + +class KMFolderComboBox : public QComboBox +{ + Q_OBJECT + +public: + KMFolderComboBox( QWidget *parent = 0, char *name = 0 ); + KMFolderComboBox( bool rw, QWidget *parent = 0, char *name = 0 ); + + /** Select whether the outbox folder is shown. Default is yes. */ + void showOutboxFolder(bool shown); + + /** Select whether the IMAP folders should be shown. Default is yes. */ + void showImapFolders(bool shown); + + void setFolder( KMFolder *aFolder ); + void setFolder( const QString &idString ); + KMFolder *getFolder(); + +public slots: + /** Refresh list of folders in the combobox. */ + void refreshFolders(); + +private slots: + void slotActivated(int index); + +private: + /** Create folder list using the folder manager. */ + void createFolderList(QStringList *names, + QValueList<QGuardedPtr<KMFolder> > *folders); + void init(); + + QGuardedPtr<KMFolder> mFolder; + bool mOutboxShown; + bool mImapShown; + int mSpecialIdx; +}; + +#endif /* __KMFOLDERCOMBOBOX */ |