diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2016-03-09 15:20:31 +0100 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2016-03-09 15:20:31 +0100 |
commit | f5185c4799fe0e9c31a218dfc8310515ac921c2b (patch) | |
tree | 5524d7a85c8bf82890d79ec6d1bb82b5124fd3b3 /framework/mail/maillistcontroller.cpp | |
parent | c9ccf868f5d533a07811b949577f772f618d2de3 (diff) | |
download | kube-f5185c4799fe0e9c31a218dfc8310515ac921c2b.tar.gz kube-f5185c4799fe0e9c31a218dfc8310515ac921c2b.zip |
Moved framework/mail to framework/domain
Diffstat (limited to 'framework/mail/maillistcontroller.cpp')
-rw-r--r-- | framework/mail/maillistcontroller.cpp | 101 |
1 files changed, 0 insertions, 101 deletions
diff --git a/framework/mail/maillistcontroller.cpp b/framework/mail/maillistcontroller.cpp deleted file mode 100644 index a4bd6436..00000000 --- a/framework/mail/maillistcontroller.cpp +++ /dev/null | |||
@@ -1,101 +0,0 @@ | |||
1 | /* | ||
2 | Copyright (c) 2016 Michael Bohlender <michael.bohlender@kdemail.net> | ||
3 | Copyright (c) 2016 Christian Mollekopf <mollekopf@kolabsys.com> | ||
4 | |||
5 | This library is free software; you can redistribute it and/or modify it | ||
6 | under the terms of the GNU Library General Public License as published by | ||
7 | the Free Software Foundation; either version 2 of the License, or (at your | ||
8 | option) any later version. | ||
9 | |||
10 | This library is distributed in the hope that it will be useful, but WITHOUT | ||
11 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
12 | FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public | ||
13 | License for more details. | ||
14 | |||
15 | You should have received a copy of the GNU Library General Public License | ||
16 | along with this library; see the file COPYING.LIB. If not, write to the | ||
17 | Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA | ||
18 | 02110-1301, USA. | ||
19 | */ | ||
20 | |||
21 | #include "maillistcontroller.h" | ||
22 | |||
23 | #include <QStringList> | ||
24 | |||
25 | #include <sink/store.h> | ||
26 | |||
27 | #include "maillistmodel.h" | ||
28 | |||
29 | MailListController::MailListController(QObject *parent) : QObject(parent), m_model(new MailListModel) | ||
30 | { | ||
31 | } | ||
32 | |||
33 | MailListModel *MailListController::model() const | ||
34 | { | ||
35 | return m_model.data(); | ||
36 | |||
37 | } | ||
38 | |||
39 | void MailListController::loadAllMail() | ||
40 | { | ||
41 | Sink::Query query; | ||
42 | query.liveQuery = true; | ||
43 | query.requestedProperties << "subject" << "sender" << "senderName" << "date" << "unread" << "important"; | ||
44 | m_model->runQuery(query); | ||
45 | } | ||
46 | |||
47 | void MailListController::loadMailFolder(const QString &folderId) | ||
48 | { | ||
49 | Sink::Query query; | ||
50 | query.liveQuery = true; | ||
51 | query.requestedProperties << "subject" << "sender" << "senderName" << "date" << "unread" << "important" << "folder"; | ||
52 | query.propertyFilter.insert("folder", folderId.toLatin1()); | ||
53 | m_model->runQuery(query); | ||
54 | } | ||
55 | |||
56 | void MailListController::loadUnreadMail() | ||
57 | { | ||
58 | Sink::Query query; | ||
59 | query.liveQuery = true; | ||
60 | query.requestedProperties << "subject" << "sender" << "senderName" << "date" << "unread" << "important"; | ||
61 | query.propertyFilter.insert("unread", true); | ||
62 | m_model->runQuery(query); | ||
63 | } | ||
64 | |||
65 | void MailListController::loadImportantMail() | ||
66 | { | ||
67 | Sink::Query query; | ||
68 | query.liveQuery = true; | ||
69 | query.requestedProperties << "subject" << "sender" << "senderName" << "date" << "unread" << "important"; | ||
70 | query.propertyFilter.insert("important", true); | ||
71 | m_model->runQuery(query); | ||
72 | } | ||
73 | |||
74 | QString MailListController::selectedMail() const | ||
75 | { | ||
76 | return m_selectedMail; | ||
77 | } | ||
78 | |||
79 | void MailListController::setSelectedMail(const QString& id) | ||
80 | { | ||
81 | if (m_selectedMail != id) { | ||
82 | m_selectedMail = id; | ||
83 | emit selectedMailChanged(); | ||
84 | } | ||
85 | } | ||
86 | |||
87 | void MailListController::markMailImportant(bool important) | ||
88 | { | ||
89 | qDebug() << "user action: mark mail important "; | ||
90 | } | ||
91 | |||
92 | void MailListController::markMailUnread(bool unread) | ||
93 | { | ||
94 | qDebug() << "user action: mark mail unread "; | ||
95 | } | ||
96 | |||
97 | void MailListController::deleteMail() | ||
98 | { | ||
99 | qDebug() << "user action: delete mail"; | ||
100 | } | ||
101 | |||