summaryrefslogtreecommitdiffstats
path: root/framework/mail/maillistmodel.h
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2016-01-03 20:31:10 +0100
committerChristian Mollekopf <chrigi_1@fastmail.fm>2016-01-03 20:31:10 +0100
commitdd09ca9ef4bb9780b953d6dd2999dbefe50bd1ff (patch)
treedfcef3671c7f36d762f74b4226477fe6978688f2 /framework/mail/maillistmodel.h
parentdea41f0345188d776522e5b91ba25d25c418e581 (diff)
downloadkube-dd09ca9ef4bb9780b953d6dd2999dbefe50bd1ff.tar.gz
kube-dd09ca9ef4bb9780b953d6dd2999dbefe50bd1ff.zip
Instead of using controllers, directly use the models
...and connect components via properties
Diffstat (limited to 'framework/mail/maillistmodel.h')
-rw-r--r--framework/mail/maillistmodel.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/framework/mail/maillistmodel.h b/framework/mail/maillistmodel.h
index b5fa7c57..7718477c 100644
--- a/framework/mail/maillistmodel.h
+++ b/framework/mail/maillistmodel.h
@@ -9,6 +9,8 @@
9class MailListModel : public QIdentityProxyModel 9class MailListModel : public QIdentityProxyModel
10{ 10{
11 Q_OBJECT 11 Q_OBJECT
12 Q_PROPERTY (QVariant parentFolder READ parentFolder WRITE setParentFolder)
13 Q_PROPERTY (QVariant mail READ mail WRITE setMail)
12 14
13public: 15public:
14 MailListModel(QObject *parent = Q_NULLPTR); 16 MailListModel(QObject *parent = Q_NULLPTR);
@@ -31,6 +33,12 @@ public:
31 QHash<int, QByteArray> roleNames() const; 33 QHash<int, QByteArray> roleNames() const;
32 34
33 void runQuery(const Akonadi2::Query &query); 35 void runQuery(const Akonadi2::Query &query);
36
37 void setParentFolder(const QVariant &parentFolder);
38 QVariant parentFolder() const;
39
40 void setMail(const QVariant &mail);
41 QVariant mail() const;
34private: 42private:
35 QSharedPointer<QAbstractItemModel> m_model; 43 QSharedPointer<QAbstractItemModel> m_model;
36}; 44};