diff options
author | Michael Bohlender <michael.bohlender@kdemail.net> | 2015-12-17 20:41:02 +0100 |
---|---|---|
committer | Michael Bohlender <michael.bohlender@kdemail.net> | 2015-12-17 20:41:02 +0100 |
commit | 7b5dd9662ef7c4cb005587a356e471b3767cffce (patch) | |
tree | 5d11c47212f57294f490afe8f212a83cfd89f1b8 /framework/mail/singlemailcontroller.h | |
parent | ad1dd41fc444cf598c1dbfec44a8ce348cb2bb73 (diff) | |
download | kube-7b5dd9662ef7c4cb005587a356e471b3767cffce.tar.gz kube-7b5dd9662ef7c4cb005587a356e471b3767cffce.zip |
singlemail controller load mail from akoandi
Diffstat (limited to 'framework/mail/singlemailcontroller.h')
-rw-r--r-- | framework/mail/singlemailcontroller.h | 31 |
1 files changed, 8 insertions, 23 deletions
diff --git a/framework/mail/singlemailcontroller.h b/framework/mail/singlemailcontroller.h index e6ec9a22..bdac971c 100644 --- a/framework/mail/singlemailcontroller.h +++ b/framework/mail/singlemailcontroller.h | |||
@@ -4,41 +4,26 @@ | |||
4 | 4 | ||
5 | #include <QObject> | 5 | #include <QObject> |
6 | #include <QString> | 6 | #include <QString> |
7 | #include <QDateTime> | ||
8 | #include <QScopedPointer> | ||
7 | 9 | ||
8 | class SingleMailController : public QObject | 10 | class SingleMailController : public QObject |
9 | { | 11 | { |
10 | Q_OBJECT | 12 | Q_OBJECT |
11 | Q_PROPERTY (QString akonadiId READ akonadiId WRITE setAkonadiId NOTIFY akonadiIdChanged) | 13 | Q_PROPERTY (MailListModel *model READ model CONSTANT) |
12 | Q_PROPERTY (bool isUnread READ isUnread NOTIFY isUnreadChanged) | ||
13 | Q_PROPERTY (bool isImportant READ isImportant NOTIFY isImportantChanged) | ||
14 | Q_PROPERTY (QString message READ message NOTIFY messageChanged) | ||
15 | 14 | ||
16 | public: | 15 | public: |
17 | explicit SingleMailController(QObject *parent = Q_NULLPTR); | 16 | explicit SingleMailController(QObject *parent = Q_NULLPTR); |
17 | ~SingleMailController(); | ||
18 | 18 | ||
19 | QString akonadiId() const; | 19 | MailListModel *model() const; |
20 | void setAkonadiId(const QString &id); | ||
21 | 20 | ||
22 | bool isUnread() const; | 21 | Q_SIGNALS: |
23 | bool isImportant() const; | ||
24 | QString message() const; | ||
25 | |||
26 | void loadMessage(const QString &id); | ||
27 | |||
28 | signals: | ||
29 | void akonadiIdChanged(); | ||
30 | void isUnreadChanged(); | ||
31 | void isImportantChanged(); | ||
32 | void messageChanged(); | 22 | void messageChanged(); |
33 | 23 | ||
34 | public slots: | 24 | public slots: |
35 | void deleteMail(); | 25 | void loadMail(const QString &id); |
36 | void markMailImportant(bool important); | ||
37 | void markMailUnread(bool unread); | ||
38 | 26 | ||
39 | private: | 27 | private: |
40 | QString m_akonadiId; | 28 | QScopedPointer<MailListModel> m_model; |
41 | bool m_isImportant; | ||
42 | bool m_isUnread; | ||
43 | QString m_message; | ||
44 | }; | 29 | }; |