summaryrefslogtreecommitdiffstats
path: root/applications/kube-mail/package/contents/ui/main.qml
diff options
context:
space:
mode:
Diffstat (limited to 'applications/kube-mail/package/contents/ui/main.qml')
-rw-r--r--applications/kube-mail/package/contents/ui/main.qml138
1 files changed, 138 insertions, 0 deletions
diff --git a/applications/kube-mail/package/contents/ui/main.qml b/applications/kube-mail/package/contents/ui/main.qml
new file mode 100644
index 00000000..88d2edde
--- /dev/null
+++ b/applications/kube-mail/package/contents/ui/main.qml
@@ -0,0 +1,138 @@
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
21import org.kde.plasma.components 2.0 as PlasmaComponents
22
23import org.kde.akonadi2.mail 1.0 as Mail
24
25ApplicationWindow {
26 id: app
27
28 //FIXME remove fixed pixel hight
29 //for now just convinience during testing
30 height: 1080 * 0.7
31 width: 1920 * 0.7
32
33 visible: true
34
35 //Controller:
36 Mail.FolderList {
37 id: folderList
38 }
39
40 Mail.MailList {
41 id: mailList
42 }
43
44 Mail.SingleMail{
45 id: singleMail
46 }
47
48 //UI
49 toolBar: ToolBar {
50
51 Row {
52 anchors.fill: parent
53
54 PlasmaComponents.ToolButton {
55
56 height: parent.height
57
58 iconName: "mail-message-new"
59
60 text: "Compose"
61 }
62
63 PlasmaComponents.ToolButton {
64
65 height: parent.height
66
67 iconName: "mail-mark-unread"
68 text: "Mark Unread"
69
70 onClicked: {
71 mailList.markMailUnread(true)
72 }
73 }
74
75 PlasmaComponents.ToolButton {
76
77 height: parent.height
78
79 iconName: "mail-mark-important"
80 text: "Mark Important"
81
82 onClicked: {
83 mailList.markMailImportant(true)
84 }
85 }
86
87 PlasmaComponents.ToolButton {
88
89 height: parent.height
90
91 iconName: "edit-delete"
92 text: "Delete Mail"
93
94 onClicked: {
95 mailList.deleteMail()
96 }
97 }
98 }
99 }
100
101 SplitView {
102 anchors.fill: parent
103
104 FolderListView {
105 id: folderListView
106
107 width: unit.size * 55
108 Layout.maximumWidth: unit.size * 150
109 Layout.minimumWidth: unit.size * 30
110 }
111
112 MailListView {
113 id: mailListView
114
115 width: unit.size * 80
116 Layout.maximumWidth: unit.size * 250
117 Layout.minimumWidth: unit.size * 50
118 }
119
120 SingleMailView {
121 id: mailView
122
123 Layout.fillWidth: true
124 }
125 }
126
127 //TODO find a better way to scale UI
128 Item {
129 id: unit
130
131 property int size: 5
132 }
133
134 ColorPalette {
135 id: colorPalette
136 }
137}
138