blob: e6ec9a22e1555531775d070e3c2dd1dd810a6f2b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
#pragma once
#include "maillistmodel.h"
#include <QObject>
#include <QString>
class SingleMailController : public QObject
{
Q_OBJECT
Q_PROPERTY (QString akonadiId READ akonadiId WRITE setAkonadiId NOTIFY akonadiIdChanged)
Q_PROPERTY (bool isUnread READ isUnread NOTIFY isUnreadChanged)
Q_PROPERTY (bool isImportant READ isImportant NOTIFY isImportantChanged)
Q_PROPERTY (QString message READ message NOTIFY messageChanged)
public:
explicit SingleMailController(QObject *parent = Q_NULLPTR);
QString akonadiId() const;
void setAkonadiId(const QString &id);
bool isUnread() const;
bool isImportant() const;
QString message() const;
void loadMessage(const QString &id);
signals:
void akonadiIdChanged();
void isUnreadChanged();
void isImportantChanged();
void messageChanged();
public slots:
void deleteMail();
void markMailImportant(bool important);
void markMailUnread(bool unread);
private:
QString m_akonadiId;
bool m_isImportant;
bool m_isUnread;
QString m_message;
};
|