summaryrefslogtreecommitdiffstats
path: root/applications/examples/SingleMail.qml
diff options
context:
space:
mode:
authorMichael Bohlender <michael.bohlender@kdemail.net>2015-12-06 21:01:20 +0100
committerMichael Bohlender <michael.bohlender@kdemail.net>2015-12-06 21:01:20 +0100
commit5b1025d49af793381ad3ea921e9b03d3326ac979 (patch)
treef8fe4225053715508d16bf5381c4ca61b1097126 /applications/examples/SingleMail.qml
parent055fcb73f17718cf85b8fc6e72231be97d99a619 (diff)
downloadkube-5b1025d49af793381ad3ea921e9b03d3326ac979.tar.gz
kube-5b1025d49af793381ad3ea921e9b03d3326ac979.zip
add SingleMailController including example
Diffstat (limited to 'applications/examples/SingleMail.qml')
-rw-r--r--applications/examples/SingleMail.qml50
1 files changed, 50 insertions, 0 deletions
diff --git a/applications/examples/SingleMail.qml b/applications/examples/SingleMail.qml
new file mode 100644
index 00000000..6acd00e5
--- /dev/null
+++ b/applications/examples/SingleMail.qml
@@ -0,0 +1,50 @@
1/*
2 * Copyright (C) 2015 Michael Bohlender <michael.bohlender@kdemail.net>
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 3 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, see <http://www.gnu.org/licenses/>.
16 */
17
18import QtQuick 2.4
19import QtQuick.Controls 1.3
20import QtQuick.Layouts 1.1
21
22import org.kde.akonadi2.mail 1.0
23
24Item {
25 id: root
26
27 SingleMail {
28 id: singleMail
29
30 akonadiId: "test"
31 }
32
33 ScrollView {
34 anchors.fill: parent
35
36 ColumnLayout {
37 Button {
38 text: singleMail.isUnread ? "mark unread" : "mark read"
39 onClicked: singleMail.markMailUnread(!singleMail.isUnread)
40 }
41 Button {
42 text: singleMail.isImportant ? "important" : "not important"
43 onClicked: singleMail.markMailImportant(!singleMail.isImportant)
44 }
45 Label {
46 text: singleMail.message
47 }
48 }
49 }
50} \ No newline at end of file