summaryrefslogtreecommitdiffstats
path: root/framework/mail/maillistmodel.h
diff options
context:
space:
mode:
authorMichael Bohlender <michael.bohlender@kdemail.net>2015-10-16 17:11:22 +0200
committerMichael Bohlender <michael.bohlender@kdemail.net>2015-10-16 17:12:02 +0200
commit3b455f3b2e557fa4f1ca69c042309612acf7fe59 (patch)
tree71fefae0257e8f706ec5b1b81d429d98697cfa2a /framework/mail/maillistmodel.h
parentac6cbedf135a3b31596af83bf75843f1fabdf1fb (diff)
downloadkube-3b455f3b2e557fa4f1ca69c042309612acf7fe59.tar.gz
kube-3b455f3b2e557fa4f1ca69c042309612acf7fe59.zip
initial mailplugin with maillistcontroller, model and view
Diffstat (limited to 'framework/mail/maillistmodel.h')
-rw-r--r--framework/mail/maillistmodel.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/framework/mail/maillistmodel.h b/framework/mail/maillistmodel.h
new file mode 100644
index 00000000..72a26c59
--- /dev/null
+++ b/framework/mail/maillistmodel.h
@@ -0,0 +1,29 @@
1#pragma once
2
3#include <QAbstractListModel>
4#include <QStringList>
5
6class MailListModel : public QAbstractListModel
7{
8 Q_OBJECT
9
10public:
11 MailListModel(QObject *parent = Q_NULLPTR);
12 ~MailListModel();
13
14 enum Roles {
15 Subject = Qt::UserRole + 1
16 };
17
18 QHash<int, QByteArray> roleNames() const;
19 QVariant data(const QModelIndex &index, int role) const;
20 int rowCount(const QModelIndex &parent = QModelIndex()) const;
21
22 bool addMails(const QStringList &items);
23 void clearMails();
24
25 void runQuery(const QString &query);
26
27private:
28 QStringList m_msgs;
29}; \ No newline at end of file