diff options
Diffstat (limited to 'applications/examples')
-rw-r--r-- | applications/examples/SingleMail.qml | 50 |
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 | |||
18 | import QtQuick 2.4 | ||
19 | import QtQuick.Controls 1.3 | ||
20 | import QtQuick.Layouts 1.1 | ||
21 | |||
22 | import org.kde.akonadi2.mail 1.0 | ||
23 | |||
24 | Item { | ||
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 | ||