blob: aa53c76b385a8747647deb611355e2d81316df6b (
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
45
|
#include "maillistcontroller.h"
#include <QStringList>
#include <akonadi2common/clientapi.h>
#include "maillistmodel.h"
MailListController::MailListController(QObject *parent) : QObject(parent), m_model(new MailListModel)
{
}
MailListModel *MailListController::model() const
{
return m_model.data();
}
QString MailListController::folderId() const
{
return m_folderId;
}
void MailListController::setFolderId(const QString &folderId)
{
if (m_folderId != folderId) {
m_folderId = folderId;
Akonadi2::Query query;
query.syncOnDemand = false;
query.processAll = false;
query.liveQuery = true;
query.requestedProperties << "subject" << "sender" << "senderName" << "date" << "unread" << "important";
query.parentProperty = folderId.toLatin1();
m_model->runQuery(query);
emit folderIdChanged();
}
}
void MailListController::addMail(QString subject)
{
qDebug() << "add mail";
}
|