diff options
Diffstat (limited to 'framework/mail/maillistcontroller.h')
-rw-r--r-- | framework/mail/maillistcontroller.h | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/framework/mail/maillistcontroller.h b/framework/mail/maillistcontroller.h new file mode 100644 index 00000000..8aa5713b --- /dev/null +++ b/framework/mail/maillistcontroller.h | |||
@@ -0,0 +1,31 @@ | |||
1 | #pragma once | ||
2 | |||
3 | #include "maillistmodel.h" | ||
4 | |||
5 | #include <QObject> | ||
6 | #include <QScopedPointer> | ||
7 | #include <QString> | ||
8 | |||
9 | class MailListController : public QObject | ||
10 | { | ||
11 | Q_OBJECT | ||
12 | Q_PROPERTY (QString query READ query WRITE setQuery NOTIFY queryChanged) | ||
13 | Q_PROPERTY (MailListModel *model READ model CONSTANT) | ||
14 | |||
15 | public: | ||
16 | explicit MailListController(QObject *parent = Q_NULLPTR); | ||
17 | |||
18 | QString query() const; | ||
19 | void setQuery(const QString &query); | ||
20 | MailListModel *model() const; | ||
21 | |||
22 | signals: | ||
23 | void queryChanged(); | ||
24 | |||
25 | public slots: | ||
26 | void addMail(QString subject); | ||
27 | |||
28 | private: | ||
29 | QString m_query; | ||
30 | QScopedPointer<MailListModel> m_model; | ||
31 | }; \ No newline at end of file | ||