diff options
-rw-r--r-- | components/mail/contents/ui/main.qml | 37 | ||||
-rw-r--r-- | components/package/contents/ui/Outbox.qml | 9 | ||||
-rw-r--r-- | framework/domain/CMakeLists.txt | 2 | ||||
-rw-r--r-- | framework/domain/actions/sinkactions.cpp | 62 | ||||
-rw-r--r-- | framework/domain/composercontroller.cpp | 1 | ||||
-rw-r--r-- | framework/domain/composercontroller.h | 1 | ||||
-rw-r--r-- | framework/domain/mailcontroller.cpp | 66 | ||||
-rw-r--r-- | framework/domain/mailcontroller.h | 42 | ||||
-rw-r--r-- | framework/domain/mailplugin.cpp | 4 | ||||
-rw-r--r-- | framework/domain/outboxcontroller.cpp | 50 | ||||
-rw-r--r-- | framework/domain/outboxcontroller.h | 39 |
11 files changed, 221 insertions, 92 deletions
diff --git a/components/mail/contents/ui/main.qml b/components/mail/contents/ui/main.qml index cf5cfd6a..423d8f34 100644 --- a/components/mail/contents/ui/main.qml +++ b/components/mail/contents/ui/main.qml | |||
@@ -62,24 +62,6 @@ Controls2.ApplicationWindow { | |||
62 | } | 62 | } |
63 | 63 | ||
64 | KubeAction.Action { | 64 | KubeAction.Action { |
65 | id: editAction | ||
66 | actionId: "org.kde.kube.actions.edit" | ||
67 | context: maillistcontext | ||
68 | } | ||
69 | |||
70 | KubeAction.Action { | ||
71 | id: markAsReadAction | ||
72 | actionId: "org.kde.kube.actions.mark-as-read" | ||
73 | context: maillistcontext | ||
74 | } | ||
75 | |||
76 | KubeAction.Action { | ||
77 | id: deleteAction | ||
78 | actionId: "org.kde.kube.actions.move-to-trash" | ||
79 | context: maillistcontext | ||
80 | } | ||
81 | |||
82 | KubeAction.Action { | ||
83 | id: syncAction | 65 | id: syncAction |
84 | actionId: "org.kde.kube.actions.synchronize" | 66 | actionId: "org.kde.kube.actions.synchronize" |
85 | context: folderListContext | 67 | context: folderListContext |
@@ -115,6 +97,13 @@ Controls2.ApplicationWindow { | |||
115 | */ | 97 | */ |
116 | //END ActionHandler | 98 | //END ActionHandler |
117 | 99 | ||
100 | //Controller | ||
101 | KubeFramework.MailController { | ||
102 | id: mailController | ||
103 | mail: mailListView.currentMail | ||
104 | } | ||
105 | |||
106 | |||
118 | //BEGIN Shortcuts | 107 | //BEGIN Shortcuts |
119 | Shortcut { | 108 | Shortcut { |
120 | sequence: StandardKey.Refresh | 109 | sequence: StandardKey.Refresh |
@@ -123,8 +112,8 @@ Controls2.ApplicationWindow { | |||
123 | } | 112 | } |
124 | Shortcut { | 113 | Shortcut { |
125 | sequence: StandardKey.Delete | 114 | sequence: StandardKey.Delete |
126 | onActivated: deleteAction.execute() | 115 | onActivated: mailController.moveToTrashAction.execute() |
127 | enabled: deleteAction.ready | 116 | enabled: mailController.moveToTrashAction.enabled |
128 | } | 117 | } |
129 | Shortcut { | 118 | Shortcut { |
130 | sequence: StandardKey.MoveToNextLine | 119 | sequence: StandardKey.MoveToNextLine |
@@ -221,10 +210,10 @@ Controls2.ApplicationWindow { | |||
221 | ToolButton { | 210 | ToolButton { |
222 | iconName: "mail-mark-unread" | 211 | iconName: "mail-mark-unread" |
223 | text: "Mark As Read" | 212 | text: "Mark As Read" |
224 | enabled: markAsReadAction.ready | 213 | enabled: mailController.markAsRead.enabled |
225 | tooltip: "mark mail as read" | 214 | tooltip: "mark mail as read" |
226 | onClicked: { | 215 | onClicked: { |
227 | markAsReadAction.execute() | 216 | mailController.markAsRead.execute() |
228 | } | 217 | } |
229 | } | 218 | } |
230 | 219 | ||
@@ -240,10 +229,10 @@ Controls2.ApplicationWindow { | |||
240 | ToolButton { | 229 | ToolButton { |
241 | iconName: "edit-delete" | 230 | iconName: "edit-delete" |
242 | text: "Delete Mail" | 231 | text: "Delete Mail" |
243 | enabled: deleteAction.ready | 232 | enabled: mailController.moveToTrashAction.enabled |
244 | tooltip: "delete email" | 233 | tooltip: "delete email" |
245 | onClicked: { | 234 | onClicked: { |
246 | deleteAction.execute() | 235 | mailController.moveToTrashAction.execute() |
247 | } | 236 | } |
248 | } | 237 | } |
249 | } | 238 | } |
diff --git a/components/package/contents/ui/Outbox.qml b/components/package/contents/ui/Outbox.qml index 5330cd4e..3a51e51a 100644 --- a/components/package/contents/ui/Outbox.qml +++ b/components/package/contents/ui/Outbox.qml | |||
@@ -37,11 +37,8 @@ ToolButton { | |||
37 | dialog.visible = dialog.visible ? false : true | 37 | dialog.visible = dialog.visible ? false : true |
38 | } | 38 | } |
39 | 39 | ||
40 | KubeAction.Action { | 40 | KubeFramework.OutboxController { |
41 | id: sendNowAction | 41 | id: outboxController |
42 | actionId: "org.kde.kube.actions.sendOutbox" | ||
43 | context: KubeAction.Context { | ||
44 | } | ||
45 | } | 42 | } |
46 | 43 | ||
47 | //BEGIN Dialog | 44 | //BEGIN Dialog |
@@ -88,7 +85,7 @@ ToolButton { | |||
88 | height: Kirigami.Units.gridUnit * 2 | 85 | height: Kirigami.Units.gridUnit * 2 |
89 | text: qsTr("Send now.") | 86 | text: qsTr("Send now.") |
90 | onClicked: { | 87 | onClicked: { |
91 | sendNowAction.execute() | 88 | outboxController.sendOutboxAction.execute() |
92 | } | 89 | } |
93 | } | 90 | } |
94 | 91 | ||
diff --git a/framework/domain/CMakeLists.txt b/framework/domain/CMakeLists.txt index bb522416..8f343928 100644 --- a/framework/domain/CMakeLists.txt +++ b/framework/domain/CMakeLists.txt | |||
@@ -23,6 +23,8 @@ set(mailplugin_SRCS | |||
23 | selector.cpp | 23 | selector.cpp |
24 | completer.cpp | 24 | completer.cpp |
25 | controller.cpp | 25 | controller.cpp |
26 | outboxcontroller.cpp | ||
27 | mailcontroller.cpp | ||
26 | ) | 28 | ) |
27 | find_package(KF5 REQUIRED COMPONENTS Package) | 29 | find_package(KF5 REQUIRED COMPONENTS Package) |
28 | 30 | ||
diff --git a/framework/domain/actions/sinkactions.cpp b/framework/domain/actions/sinkactions.cpp index a2d4c02c..460cb6a1 100644 --- a/framework/domain/actions/sinkactions.cpp +++ b/framework/domain/actions/sinkactions.cpp | |||
@@ -31,53 +31,6 @@ using namespace Kube; | |||
31 | using namespace Sink; | 31 | using namespace Sink; |
32 | using namespace Sink::ApplicationDomain; | 32 | using namespace Sink::ApplicationDomain; |
33 | 33 | ||
34 | static ActionHandlerHelper markAsReadHandler("org.kde.kube.actions.mark-as-read", | ||
35 | [](Context *context) -> bool { | ||
36 | return context->property("mail").isValid(); | ||
37 | }, | ||
38 | [](Context *context) { | ||
39 | auto mail = context->property("mail").value<Mail::Ptr>(); | ||
40 | if (!mail) { | ||
41 | SinkWarning() << "Failed to get the mail mail: " << context->property("mail"); | ||
42 | return; | ||
43 | } | ||
44 | mail->setProperty("unread", false); | ||
45 | SinkLog() << "Mark as read " << mail->identifier(); | ||
46 | Store::modify(*mail).exec(); | ||
47 | } | ||
48 | ); | ||
49 | |||
50 | static ActionHandlerHelper moveToTrashHandler("org.kde.kube.actions.move-to-trash", | ||
51 | [](Context *context) -> bool { | ||
52 | return context->property("mail").isValid(); | ||
53 | }, | ||
54 | [](Context *context) { | ||
55 | auto mail = context->property("mail").value<Mail::Ptr>(); | ||
56 | if (!mail) { | ||
57 | SinkWarning() << "Failed to get the mail mail: " << context->property("mail"); | ||
58 | return; | ||
59 | } | ||
60 | mail->setTrash(true); | ||
61 | SinkLog() << "Move to trash " << mail->identifier(); | ||
62 | Store::modify(*mail).exec(); | ||
63 | } | ||
64 | ); | ||
65 | |||
66 | static ActionHandlerHelper deleteHandler("org.kde.kube.actions.delete", | ||
67 | [](Context *context) -> bool { | ||
68 | return context->property("mail").isValid(); | ||
69 | }, | ||
70 | [](Context *context) { | ||
71 | auto mail = context->property("mail").value<Mail::Ptr>(); | ||
72 | if (!mail) { | ||
73 | SinkWarning() << "Failed to get the mail mail: " << context->property("mail"); | ||
74 | return; | ||
75 | } | ||
76 | SinkLog() << "Remove " << mail->identifier(); | ||
77 | Store::remove(*mail).exec(); | ||
78 | } | ||
79 | ); | ||
80 | |||
81 | class FolderContext : public Kube::ContextWrapper { | 34 | class FolderContext : public Kube::ContextWrapper { |
82 | using Kube::ContextWrapper::ContextWrapper; | 35 | using Kube::ContextWrapper::ContextWrapper; |
83 | KUBE_CONTEXTWRAPPER_PROPERTY(Sink::ApplicationDomain::Folder::Ptr, Folder, folder) | 36 | KUBE_CONTEXTWRAPPER_PROPERTY(Sink::ApplicationDomain::Folder::Ptr, Folder, folder) |
@@ -101,18 +54,3 @@ static ActionHandlerHelper synchronizeHandler("org.kde.kube.actions.synchronize" | |||
101 | } | 54 | } |
102 | ); | 55 | ); |
103 | 56 | ||
104 | static ActionHandlerHelper sendOutboxHandler("org.kde.kube.actions.sendOutbox", | ||
105 | [](Context *context) -> bool { | ||
106 | return true; | ||
107 | }, | ||
108 | ActionHandlerHelper::JobHandler{[](Context *context) -> KAsync::Job<void> { | ||
109 | using namespace Sink::ApplicationDomain; | ||
110 | Query query; | ||
111 | query.containsFilter<SinkResource::Capabilities>(ResourceCapabilities::Mail::transport); | ||
112 | return Store::fetchAll<SinkResource>(query) | ||
113 | .each([=](const SinkResource::Ptr &resource) -> KAsync::Job<void> { | ||
114 | return Store::synchronize(SyncScope{}.resourceFilter(resource->identifier())); | ||
115 | }); | ||
116 | }} | ||
117 | ); | ||
118 | |||
diff --git a/framework/domain/composercontroller.cpp b/framework/domain/composercontroller.cpp index 4ce356a9..75396735 100644 --- a/framework/domain/composercontroller.cpp +++ b/framework/domain/composercontroller.cpp | |||
@@ -1,5 +1,6 @@ | |||
1 | /* | 1 | /* |
2 | Copyright (c) 2016 Michael Bohlender <michael.bohlender@kdemail.net> | 2 | Copyright (c) 2016 Michael Bohlender <michael.bohlender@kdemail.net> |
3 | Copyright (c) 2016 Christian Mollekopf <mollekopf@kolabsys.com> | ||
3 | 4 | ||
4 | This library is free software; you can redistribute it and/or modify it | 5 | This library is free software; you can redistribute it and/or modify it |
5 | under the terms of the GNU Library General Public License as published by | 6 | under the terms of the GNU Library General Public License as published by |
diff --git a/framework/domain/composercontroller.h b/framework/domain/composercontroller.h index c5046306..2e74954e 100644 --- a/framework/domain/composercontroller.h +++ b/framework/domain/composercontroller.h | |||
@@ -1,5 +1,6 @@ | |||
1 | /* | 1 | /* |
2 | Copyright (c) 2016 Michael Bohlender <michael.bohlender@kdemail.net> | 2 | Copyright (c) 2016 Michael Bohlender <michael.bohlender@kdemail.net> |
3 | Copyright (c) 2016 Christian Mollekopf <mollekopf@kolabsys.com> | ||
3 | 4 | ||
4 | This library is free software; you can redistribute it and/or modify it | 5 | This library is free software; you can redistribute it and/or modify it |
5 | under the terms of the GNU Library General Public License as published by | 6 | under the terms of the GNU Library General Public License as published by |
diff --git a/framework/domain/mailcontroller.cpp b/framework/domain/mailcontroller.cpp new file mode 100644 index 00000000..4c5ae5c6 --- /dev/null +++ b/framework/domain/mailcontroller.cpp | |||
@@ -0,0 +1,66 @@ | |||
1 | /* | ||
2 | Copyright (c) 2016 Christian Mollekopf <mollekopf@kolabsys.com> | ||
3 | |||
4 | This library is free software; you can redistribute it and/or modify it | ||
5 | under the terms of the GNU Library General Public License as published by | ||
6 | the Free Software Foundation; either version 2 of the License, or (at your | ||
7 | option) any later version. | ||
8 | |||
9 | This library is distributed in the hope that it will be useful, but WITHOUT | ||
10 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
11 | FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public | ||
12 | License for more details. | ||
13 | |||
14 | You should have received a copy of the GNU Library General Public License | ||
15 | along with this library; see the file COPYING.LIB. If not, write to the | ||
16 | Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA | ||
17 | 02110-1301, USA. | ||
18 | */ | ||
19 | #include "mailcontroller.h" | ||
20 | |||
21 | #include <sink/store.h> | ||
22 | #include <sink/log.h> | ||
23 | |||
24 | SINK_DEBUG_AREA("mailcontroller"); | ||
25 | |||
26 | MailController::MailController() | ||
27 | : Kube::Controller(), | ||
28 | action_markAsRead{new Kube::ControllerAction}, | ||
29 | action_moveToTrash{new Kube::ControllerAction}, | ||
30 | action_remove{new Kube::ControllerAction} | ||
31 | { | ||
32 | QObject::connect(markAsReadAction(), &Kube::ControllerAction::triggered, this, &MailController::markAsRead); | ||
33 | QObject::connect(moveToTrashAction(), &Kube::ControllerAction::triggered, this, &MailController::moveToTrash); | ||
34 | QObject::connect(removeAction(), &Kube::ControllerAction::triggered, this, &MailController::remove); | ||
35 | } | ||
36 | |||
37 | void MailController::markAsRead() | ||
38 | { | ||
39 | using namespace Sink; | ||
40 | using namespace Sink::ApplicationDomain; | ||
41 | auto mail = getMail(); | ||
42 | mail->setUnread(false); | ||
43 | SinkLog() << "Mark as read " << mail->identifier(); | ||
44 | run(Store::modify(*mail)); | ||
45 | } | ||
46 | |||
47 | void MailController::moveToTrash() | ||
48 | { | ||
49 | using namespace Sink; | ||
50 | using namespace Sink::ApplicationDomain; | ||
51 | auto mail = getMail(); | ||
52 | mail->setTrash(true); | ||
53 | SinkLog() << "Move to trash " << mail->identifier(); | ||
54 | run(Store::modify(*mail)); | ||
55 | } | ||
56 | |||
57 | void MailController::remove() | ||
58 | { | ||
59 | using namespace Sink; | ||
60 | using namespace Sink::ApplicationDomain; | ||
61 | auto mail = getMail(); | ||
62 | mail->setTrash(true); | ||
63 | SinkLog() << "Remove " << mail->identifier(); | ||
64 | run(Store::remove(*mail)); | ||
65 | } | ||
66 | |||
diff --git a/framework/domain/mailcontroller.h b/framework/domain/mailcontroller.h new file mode 100644 index 00000000..66cb7b4b --- /dev/null +++ b/framework/domain/mailcontroller.h | |||
@@ -0,0 +1,42 @@ | |||
1 | /* | ||
2 | Copyright (c) 2016 Christian Mollekopf <mollekopf@kolabsys.com> | ||
3 | |||
4 | This library is free software; you can redistribute it and/or modify it | ||
5 | under the terms of the GNU Library General Public License as published by | ||
6 | the Free Software Foundation; either version 2 of the License, or (at your | ||
7 | option) any later version. | ||
8 | |||
9 | This library is distributed in the hope that it will be useful, but WITHOUT | ||
10 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
11 | FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public | ||
12 | License for more details. | ||
13 | |||
14 | You should have received a copy of the GNU Library General Public License | ||
15 | along with this library; see the file COPYING.LIB. If not, write to the | ||
16 | Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA | ||
17 | 02110-1301, USA. | ||
18 | */ | ||
19 | #pragma once | ||
20 | |||
21 | #include <QObject> | ||
22 | #include "controller.h" | ||
23 | #include "sink/applicationdomaintype.h" | ||
24 | |||
25 | #define KUBE_CONTROLLER_ACTION(NAME) \ | ||
26 | Q_PROPERTY (Kube::ControllerAction* NAME##Action READ NAME##Action CONSTANT) \ | ||
27 | private: QScopedPointer<Kube::ControllerAction> action_##NAME; \ | ||
28 | public: Kube::ControllerAction* NAME##Action() const { Q_ASSERT(action_##NAME); return action_##NAME.data(); } \ | ||
29 | private slots: void NAME(); \ | ||
30 | |||
31 | |||
32 | class MailController : public Kube::Controller | ||
33 | { | ||
34 | Q_OBJECT | ||
35 | KUBE_CONTROLLER_PROPERTY(Sink::ApplicationDomain::Mail::Ptr, Mail, mail) | ||
36 | KUBE_CONTROLLER_ACTION(markAsRead) | ||
37 | KUBE_CONTROLLER_ACTION(moveToTrash) | ||
38 | KUBE_CONTROLLER_ACTION(remove) | ||
39 | |||
40 | public: | ||
41 | explicit MailController(); | ||
42 | }; | ||
diff --git a/framework/domain/mailplugin.cpp b/framework/domain/mailplugin.cpp index c7023bde..eeb1aeb1 100644 --- a/framework/domain/mailplugin.cpp +++ b/framework/domain/mailplugin.cpp | |||
@@ -29,6 +29,8 @@ | |||
29 | #include "accountscontroller.h" | 29 | #include "accountscontroller.h" |
30 | #include "accountsmodel.h" | 30 | #include "accountsmodel.h" |
31 | #include "outboxmodel.h" | 31 | #include "outboxmodel.h" |
32 | #include "outboxcontroller.h" | ||
33 | #include "mailcontroller.h" | ||
32 | 34 | ||
33 | #include <QtQml> | 35 | #include <QtQml> |
34 | 36 | ||
@@ -44,5 +46,7 @@ void MailPlugin::registerTypes (const char *uri) | |||
44 | qmlRegisterType<AccountFactory>(uri, 1, 0, "AccountFactory"); | 46 | qmlRegisterType<AccountFactory>(uri, 1, 0, "AccountFactory"); |
45 | qmlRegisterType<AccountsController>(uri, 1, 0, "AccountsController"); | 47 | qmlRegisterType<AccountsController>(uri, 1, 0, "AccountsController"); |
46 | qmlRegisterType<AccountsModel>(uri, 1, 0, "AccountsModel"); | 48 | qmlRegisterType<AccountsModel>(uri, 1, 0, "AccountsModel"); |
49 | qmlRegisterType<OutboxController>(uri, 1, 0, "OutboxController"); | ||
47 | qmlRegisterType<OutboxModel>(uri, 1, 0, "OutboxModel"); | 50 | qmlRegisterType<OutboxModel>(uri, 1, 0, "OutboxModel"); |
51 | qmlRegisterType<MailController>(uri, 1, 0, "MailController"); | ||
48 | } | 52 | } |
diff --git a/framework/domain/outboxcontroller.cpp b/framework/domain/outboxcontroller.cpp new file mode 100644 index 00000000..3b4f0e62 --- /dev/null +++ b/framework/domain/outboxcontroller.cpp | |||
@@ -0,0 +1,50 @@ | |||
1 | /* | ||
2 | Copyright (c) 2016 Christian Mollekopf <mollekopf@kolabsys.com> | ||
3 | |||
4 | This library is free software; you can redistribute it and/or modify it | ||
5 | under the terms of the GNU Library General Public License as published by | ||
6 | the Free Software Foundation; either version 2 of the License, or (at your | ||
7 | option) any later version. | ||
8 | |||
9 | This library is distributed in the hope that it will be useful, but WITHOUT | ||
10 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
11 | FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public | ||
12 | License for more details. | ||
13 | |||
14 | You should have received a copy of the GNU Library General Public License | ||
15 | along with this library; see the file COPYING.LIB. If not, write to the | ||
16 | Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA | ||
17 | 02110-1301, USA. | ||
18 | */ | ||
19 | #include "outboxcontroller.h" | ||
20 | |||
21 | #include <sink/store.h> | ||
22 | #include <sink/log.h> | ||
23 | |||
24 | SINK_DEBUG_AREA("outboxcontroller"); | ||
25 | |||
26 | OutboxController::OutboxController() | ||
27 | : Kube::Controller(), | ||
28 | mSynchronizeOutboxAction{new Kube::ControllerAction} | ||
29 | { | ||
30 | QObject::connect(mSynchronizeOutboxAction.data(), &Kube::ControllerAction::triggered, this, &OutboxController::sendOutbox); | ||
31 | } | ||
32 | |||
33 | Kube::ControllerAction* OutboxController::sendOutboxAction() const | ||
34 | { | ||
35 | return mSynchronizeOutboxAction.data(); | ||
36 | } | ||
37 | |||
38 | void OutboxController::sendOutbox() | ||
39 | { | ||
40 | using namespace Sink; | ||
41 | using namespace Sink::ApplicationDomain; | ||
42 | Query query; | ||
43 | query.containsFilter<SinkResource::Capabilities>(ResourceCapabilities::Mail::transport); | ||
44 | auto job = Store::fetchAll<SinkResource>(query) | ||
45 | .each([=](const SinkResource::Ptr &resource) -> KAsync::Job<void> { | ||
46 | return Store::synchronize(SyncScope{}.resourceFilter(resource->identifier())); | ||
47 | }); | ||
48 | run(job); | ||
49 | } | ||
50 | |||
diff --git a/framework/domain/outboxcontroller.h b/framework/domain/outboxcontroller.h new file mode 100644 index 00000000..4c24ad59 --- /dev/null +++ b/framework/domain/outboxcontroller.h | |||
@@ -0,0 +1,39 @@ | |||
1 | /* | ||
2 | Copyright (c) 2016 Christian Mollekopf <mollekopf@kolabsys.com> | ||
3 | |||
4 | This library is free software; you can redistribute it and/or modify it | ||
5 | under the terms of the GNU Library General Public License as published by | ||
6 | the Free Software Foundation; either version 2 of the License, or (at your | ||
7 | option) any later version. | ||
8 | |||
9 | This library is distributed in the hope that it will be useful, but WITHOUT | ||
10 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
11 | FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public | ||
12 | License for more details. | ||
13 | |||
14 | You should have received a copy of the GNU Library General Public License | ||
15 | along with this library; see the file COPYING.LIB. If not, write to the | ||
16 | Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA | ||
17 | 02110-1301, USA. | ||
18 | */ | ||
19 | #pragma once | ||
20 | |||
21 | #include <QObject> | ||
22 | #include "controller.h" | ||
23 | |||
24 | class OutboxController : public Kube::Controller | ||
25 | { | ||
26 | Q_OBJECT | ||
27 | Q_PROPERTY (Kube::ControllerAction* sendOutboxAction READ sendOutboxAction CONSTANT) | ||
28 | |||
29 | public: | ||
30 | explicit OutboxController(); | ||
31 | |||
32 | Kube::ControllerAction* sendOutboxAction() const; | ||
33 | |||
34 | private slots: | ||
35 | void sendOutbox(); | ||
36 | |||
37 | private: | ||
38 | QScopedPointer<Kube::ControllerAction> mSynchronizeOutboxAction; | ||
39 | }; | ||