summaryrefslogtreecommitdiffstats
path: root/framework/mail/folderlistmodel.h
diff options
context:
space:
mode:
authorMichael Bohlender <michael.bohlender@kdemail.net>2015-12-07 00:17:51 +0100
committerMichael Bohlender <michael.bohlender@kdemail.net>2015-12-07 00:17:51 +0100
commit58f9f288fc5b3a7edf42e4dc997fe93418977249 (patch)
tree0347d0af57ea3fe2eecb795951010a68078897e0 /framework/mail/folderlistmodel.h
parentf5b9f73e87d8263428d19b161bdb57b1a5172105 (diff)
downloadkube-58f9f288fc5b3a7edf42e4dc997fe93418977249.tar.gz
kube-58f9f288fc5b3a7edf42e4dc997fe93418977249.zip
add folderlistmodel
Diffstat (limited to 'framework/mail/folderlistmodel.h')
-rw-r--r--framework/mail/folderlistmodel.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/framework/mail/folderlistmodel.h b/framework/mail/folderlistmodel.h
new file mode 100644
index 00000000..9a782327
--- /dev/null
+++ b/framework/mail/folderlistmodel.h
@@ -0,0 +1,27 @@
1#pragma once
2
3#include <QObject>
4#include <QIdentityProxyModel>
5#include <QSharedPointer>
6#include <QStringList>
7
8class FolderListModel : public QIdentityProxyModel
9{
10 Q_OBJECT
11
12public:
13 FolderListModel(QObject *parent = Q_NULLPTR);
14 ~FolderListModel();
15
16 QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
17
18 enum Roles {
19 Name = Qt::UserRole + 1,
20 Icon
21 };
22
23 QHash<int, QByteArray> roleNames() const;
24
25private:
26 QSharedPointer<QAbstractItemModel> mModel;
27};