summaryrefslogtreecommitdiffstats
path: root/framework/mail/maillistmodel.h
diff options
context:
space:
mode:
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