diff options
-rw-r--r-- | applications/kube-mail-mobile/ColorPalette.qml | 27 | ||||
-rw-r--r-- | applications/kube-mail-mobile/ComposerView.qml | 127 | ||||
-rw-r--r-- | applications/kube-mail-mobile/FolderListView.qml | 121 | ||||
-rw-r--r-- | applications/kube-mail-mobile/MailListView.qml | 197 | ||||
-rw-r--r-- | applications/kube-mail-mobile/SingleMailView.qml | 171 | ||||
-rw-r--r-- | applications/mail-mobile/Avatar.qml (renamed from applications/kube-mail-mobile/Avatar.qml) | 6 | ||||
-rw-r--r-- | applications/mail-mobile/ComposerPage.qml (renamed from applications/kube-mail-mobile/main.qml) | 51 | ||||
-rw-r--r-- | applications/mail-mobile/FolderListModel.qml (renamed from applications/kube-mail-mobile/FolderListModel.qml) | 29 | ||||
-rw-r--r-- | applications/mail-mobile/FolderPage.qml | 120 | ||||
-rw-r--r-- | applications/mail-mobile/MailListModel.qml (renamed from applications/kube-mail-mobile/MailListModel.qml) | 2 | ||||
-rw-r--r-- | applications/mail-mobile/MailListPage.qml | 120 | ||||
-rw-r--r-- | applications/mail-mobile/SingleMailPage.qml | 131 | ||||
-rw-r--r-- | applications/mail-mobile/main.qml | 81 |
13 files changed, 486 insertions, 697 deletions
diff --git a/applications/kube-mail-mobile/ColorPalette.qml b/applications/kube-mail-mobile/ColorPalette.qml deleted file mode 100644 index c3993954..00000000 --- a/applications/kube-mail-mobile/ColorPalette.qml +++ /dev/null | |||
@@ -1,27 +0,0 @@ | |||
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 | |||
20 | //TODO probably expose it from the Cpp side | ||
21 | Item { | ||
22 | property string background: "#fcfcfc" | ||
23 | property string selected: "#3daee9" | ||
24 | property string read: "#232629" | ||
25 | property string border: "#232629" | ||
26 | } | ||
27 | |||
diff --git a/applications/kube-mail-mobile/ComposerView.qml b/applications/kube-mail-mobile/ComposerView.qml deleted file mode 100644 index d2f478b0..00000000 --- a/applications/kube-mail-mobile/ComposerView.qml +++ /dev/null | |||
@@ -1,127 +0,0 @@ | |||
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 | Item { | ||
23 | id: root | ||
24 | |||
25 | property StackView stack | ||
26 | |||
27 | //toolbar | ||
28 | ToolBar { | ||
29 | id: toolBar | ||
30 | |||
31 | RowLayout { | ||
32 | |||
33 | width: parent.width | ||
34 | |||
35 | spacing: unit.width * 8 | ||
36 | |||
37 | ToolButton { | ||
38 | iconName: "go-previous" | ||
39 | |||
40 | onClicked: stack.pop() | ||
41 | } | ||
42 | |||
43 | ToolButton { | ||
44 | iconName: "mail-reply-sender" | ||
45 | } | ||
46 | |||
47 | //FIXME spacer? | ||
48 | Label { | ||
49 | text: "" | ||
50 | Layout.fillWidth: true | ||
51 | } | ||
52 | |||
53 | ToolButton { | ||
54 | iconName: "mail-attachment" | ||
55 | } | ||
56 | |||
57 | ToolButton { | ||
58 | iconName: "mail-send" | ||
59 | } | ||
60 | } | ||
61 | } | ||
62 | |||
63 | //main content | ||
64 | Rectangle { | ||
65 | |||
66 | anchors { | ||
67 | top: toolBar.bottom | ||
68 | right: parent.right | ||
69 | left: parent.left | ||
70 | bottom: parent.bottom | ||
71 | } | ||
72 | |||
73 | color: colorPalette.background | ||
74 | |||
75 | ColumnLayout { | ||
76 | |||
77 | anchors { | ||
78 | top: parent.top | ||
79 | left: parent.left | ||
80 | right: parent.right | ||
81 | |||
82 | margins: unit.width * 5 | ||
83 | |||
84 | } | ||
85 | |||
86 | spacing: unit.height | ||
87 | |||
88 | RowLayout { | ||
89 | id: from | ||
90 | |||
91 | width: parent.width | ||
92 | |||
93 | spacing: unit.width * 5 | ||
94 | |||
95 | Label { | ||
96 | text: "From" | ||
97 | } | ||
98 | |||
99 | Button { | ||
100 | Layout.fillWidth: true | ||
101 | |||
102 | text: "meep@monkey.com" | ||
103 | |||
104 | } | ||
105 | |||
106 | } | ||
107 | |||
108 | RowLayout { | ||
109 | id: to | ||
110 | |||
111 | width: parent.width | ||
112 | |||
113 | spacing: unit.width * 5 | ||
114 | |||
115 | Label { | ||
116 | text: "To" | ||
117 | } | ||
118 | |||
119 | TextField { | ||
120 | Layout.fillWidth: true | ||
121 | |||
122 | } | ||
123 | |||
124 | } | ||
125 | } | ||
126 | } | ||
127 | } | ||
diff --git a/applications/kube-mail-mobile/FolderListView.qml b/applications/kube-mail-mobile/FolderListView.qml deleted file mode 100644 index 1baa03b6..00000000 --- a/applications/kube-mail-mobile/FolderListView.qml +++ /dev/null | |||
@@ -1,121 +0,0 @@ | |||
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 | Item { | ||
23 | id: root | ||
24 | |||
25 | property StackView stack; | ||
26 | |||
27 | //toolbar | ||
28 | ToolBar { | ||
29 | id: toolBar | ||
30 | |||
31 | RowLayout { | ||
32 | |||
33 | width: parent.width | ||
34 | |||
35 | spacing: unit.width * 5 | ||
36 | |||
37 | ToolButton { | ||
38 | anchors.right: parent.right | ||
39 | |||
40 | iconName: "system-search" | ||
41 | } | ||
42 | } | ||
43 | } | ||
44 | |||
45 | //main content | ||
46 | ListView { | ||
47 | |||
48 | anchors { | ||
49 | top: toolBar.bottom | ||
50 | right: parent.right | ||
51 | left: parent.left | ||
52 | bottom: parent.bottom | ||
53 | } | ||
54 | |||
55 | clip: true | ||
56 | |||
57 | model: FolderListModel { } | ||
58 | |||
59 | |||
60 | delegate: Item { | ||
61 | |||
62 | height: unit.width * 20 | ||
63 | width: parent.width | ||
64 | |||
65 | MouseArea { | ||
66 | id: mouseArea | ||
67 | |||
68 | anchors.fill: parent | ||
69 | |||
70 | onClicked: { | ||
71 | stack.push({"item": Qt.resolvedUrl("MailListView.qml"), properties: {stack: stack, folderId: model.name}}) | ||
72 | } | ||
73 | } | ||
74 | |||
75 | //background | ||
76 | Rectangle { | ||
77 | anchors.fill: parent | ||
78 | |||
79 | color: colorPalette.background | ||
80 | } | ||
81 | |||
82 | //clickColor | ||
83 | Rectangle { | ||
84 | id: clickColor | ||
85 | anchors.fill: parent | ||
86 | |||
87 | color: colorPalette.selected | ||
88 | opacity: 0.4 | ||
89 | |||
90 | visible: mouseArea.pressed | ||
91 | } | ||
92 | |||
93 | //FIXME without useing PlasmaComponents | ||
94 | ToolButton { | ||
95 | id: icon | ||
96 | |||
97 | anchors { | ||
98 | verticalCenter: parent.verticalCenter | ||
99 | left: parent.left | ||
100 | leftMargin: unit.width * 10 | ||
101 | } | ||
102 | |||
103 | iconName: model.icon | ||
104 | |||
105 | } | ||
106 | |||
107 | Label { | ||
108 | |||
109 | anchors{ | ||
110 | left: icon.right | ||
111 | leftMargin: unit.width * 15 | ||
112 | verticalCenter: icon.verticalCenter | ||
113 | } | ||
114 | |||
115 | text: model.name | ||
116 | |||
117 | font.weight: model.topLvl ? Font.DemiBold : Font.Normal | ||
118 | } | ||
119 | } | ||
120 | } | ||
121 | } | ||
diff --git a/applications/kube-mail-mobile/MailListView.qml b/applications/kube-mail-mobile/MailListView.qml deleted file mode 100644 index 869ce5e5..00000000 --- a/applications/kube-mail-mobile/MailListView.qml +++ /dev/null | |||
@@ -1,197 +0,0 @@ | |||
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 | Item { | ||
23 | id: root | ||
24 | |||
25 | property StackView stack; | ||
26 | property string folderId; | ||
27 | |||
28 | //toolbar | ||
29 | ToolBar { | ||
30 | id: toolBar | ||
31 | |||
32 | RowLayout { | ||
33 | |||
34 | width: parent.width | ||
35 | |||
36 | spacing: unit.width * 8 | ||
37 | |||
38 | ToolButton { | ||
39 | iconName: "go-previous" | ||
40 | |||
41 | onClicked: stack.pop() | ||
42 | } | ||
43 | |||
44 | Label { | ||
45 | Layout.fillWidth: true | ||
46 | |||
47 | text: "Current Folder Name" | ||
48 | } | ||
49 | |||
50 | ToolButton { | ||
51 | anchors.right: parent.right | ||
52 | |||
53 | iconName: "system-search" | ||
54 | } | ||
55 | } | ||
56 | } | ||
57 | |||
58 | //main content | ||
59 | ListView { | ||
60 | id: listView | ||
61 | |||
62 | anchors { | ||
63 | top: toolBar.bottom | ||
64 | right: parent.right | ||
65 | left: parent.left | ||
66 | bottom: parent.bottom | ||
67 | } | ||
68 | |||
69 | clip: true | ||
70 | |||
71 | model: MailListModel { } | ||
72 | |||
73 | delegate: Item { | ||
74 | id: delegateRoot | ||
75 | |||
76 | readonly property bool isCurrentItem: ListView.isCurrentItem | ||
77 | |||
78 | height: unit.width * 25 | ||
79 | width: parent.width | ||
80 | |||
81 | MouseArea { | ||
82 | id: mouseArea | ||
83 | |||
84 | anchors.fill: parent | ||
85 | |||
86 | onClicked: { | ||
87 | stack.push({"item": Qt.resolvedUrl("SingleMailView.qml"), properties: {stack: stack}}) | ||
88 | } | ||
89 | } | ||
90 | |||
91 | Rectangle { | ||
92 | anchors.fill: parent | ||
93 | |||
94 | color: colorPalette.background | ||
95 | |||
96 | |||
97 | //read | ||
98 | Rectangle { | ||
99 | anchors.fill: parent | ||
100 | |||
101 | color: colorPalette.read | ||
102 | opacity: 0.1 | ||
103 | |||
104 | visible: delegateRoot.isCurrentItem !== model.index && model.unread === false | ||
105 | } | ||
106 | |||
107 | //clickColor | ||
108 | Rectangle { | ||
109 | id: clickColor | ||
110 | anchors.fill: parent | ||
111 | |||
112 | color: colorPalette.selected | ||
113 | opacity: 0.4 | ||
114 | |||
115 | visible: mouseArea.pressed | ||
116 | } | ||
117 | |||
118 | //border | ||
119 | Rectangle { | ||
120 | anchors { | ||
121 | bottom: parent.bottom | ||
122 | } | ||
123 | |||
124 | height: 1 | ||
125 | width: parent.width | ||
126 | |||
127 | color: "#232629" //FIXME themeable? | ||
128 | opacity: 0.2 | ||
129 | } | ||
130 | } | ||
131 | |||
132 | |||
133 | Avatar { | ||
134 | id: avatar | ||
135 | anchors { | ||
136 | verticalCenter: parent.verticalCenter | ||
137 | left: parent.left | ||
138 | leftMargin: unit.width * 4 | ||
139 | } | ||
140 | |||
141 | width: unit.width * 15 | ||
142 | height: unit.width * 15 | ||
143 | |||
144 | name: model.senderName | ||
145 | |||
146 | } | ||
147 | |||
148 | Label { | ||
149 | id: senderName | ||
150 | |||
151 | anchors { | ||
152 | top: avatar.top | ||
153 | left: avatar.right | ||
154 | right: parent.right | ||
155 | leftMargin: unit.width * 2 | ||
156 | rightMargin: unit.width * 2 | ||
157 | } | ||
158 | |||
159 | text: model.senderName | ||
160 | |||
161 | font.pointSize: 12 //FIXME ? | ||
162 | } | ||
163 | |||
164 | Label { | ||
165 | id: subject | ||
166 | |||
167 | anchors { | ||
168 | top: senderName.bottom | ||
169 | left: senderName.left | ||
170 | right: parent.right | ||
171 | |||
172 | topMargin: unit.width * 2 | ||
173 | rightMargin: unit.width * 2 | ||
174 | } | ||
175 | |||
176 | text: model.subject | ||
177 | |||
178 | font.weight: Font.DemiBold | ||
179 | } | ||
180 | |||
181 | Label { | ||
182 | id: date | ||
183 | |||
184 | anchors { | ||
185 | top: avatar.top | ||
186 | right: parent.right | ||
187 | rightMargin: unit.width * 2 | ||
188 | } | ||
189 | |||
190 | text: model.date | ||
191 | |||
192 | font.weight: Font.Light | ||
193 | font.italic: true | ||
194 | } | ||
195 | } | ||
196 | } | ||
197 | } | ||
diff --git a/applications/kube-mail-mobile/SingleMailView.qml b/applications/kube-mail-mobile/SingleMailView.qml deleted file mode 100644 index ae184c4a..00000000 --- a/applications/kube-mail-mobile/SingleMailView.qml +++ /dev/null | |||
@@ -1,171 +0,0 @@ | |||
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 | Item { | ||
23 | id: root | ||
24 | |||
25 | property StackView stack; | ||
26 | property string mailId; | ||
27 | |||
28 | //toolbar | ||
29 | ToolBar { | ||
30 | id: toolBar | ||
31 | |||
32 | RowLayout { | ||
33 | |||
34 | width: parent.width | ||
35 | |||
36 | spacing: unit.width * 8 | ||
37 | |||
38 | ToolButton { | ||
39 | iconName: "go-previous" | ||
40 | |||
41 | onClicked: stack.pop() | ||
42 | } | ||
43 | |||
44 | //FIXME | ||
45 | Row { | ||
46 | anchors.horizontalCenter: parent.horizontalCenter | ||
47 | |||
48 | spacing: unit.width * 8 | ||
49 | |||
50 | ToolButton { | ||
51 | iconName: "mail-mark-unread-new" | ||
52 | } | ||
53 | ToolButton { | ||
54 | iconName: "mail-mark-important" | ||
55 | } | ||
56 | ToolButton { | ||
57 | iconName: "user-trash" | ||
58 | } | ||
59 | } | ||
60 | |||
61 | ToolButton { | ||
62 | |||
63 | anchors.right: parent.right | ||
64 | |||
65 | iconName: "mail-reply-sender" | ||
66 | |||
67 | onClicked: stack.push({"item": Qt.resolvedUrl("ComposerView.qml"), properties: {stack: stack}}) | ||
68 | } | ||
69 | } | ||
70 | } | ||
71 | |||
72 | //main content | ||
73 | Item { | ||
74 | |||
75 | anchors { | ||
76 | top: toolBar.bottom | ||
77 | right: parent.right | ||
78 | left: parent.left | ||
79 | bottom: parent.bottom | ||
80 | } | ||
81 | |||
82 | Item { | ||
83 | id: model | ||
84 | property string subject: "We need more Food" | ||
85 | property string sender: "Alice Trump" | ||
86 | property string senderAddress: "alice@wonderland.net" | ||
87 | property string cc: "vdg@kde.org; ross@ccmail.com" | ||
88 | property string time: "2 days ago" | ||
89 | property string body: "Hi Bob, \n \n Ut nibh massa, volutpat quis diam quis, tincidunt consectetur massa. Nulla eu ultricies justo, eu aliquam lacus. Maecenas at interdum est, at luctus nibh. Quisque scelerisque consequat lectus vitae egestas. Maecenas molestie risus id enim consequat dapibus. Ut dapibus hendrerit est, ut aliquam ex fringilla commodo. Donec rutrum consectetur dapibus. Fusce hendrerit pulvinar lacinia. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent semper sit amet elit ut volutpat. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae. \n \n Cheers, \n \n Alice" | ||
90 | } | ||
91 | |||
92 | Rectangle { | ||
93 | id: background | ||
94 | |||
95 | anchors.fill: parent | ||
96 | |||
97 | color: colorPalette.background | ||
98 | } | ||
99 | |||
100 | Item { | ||
101 | anchors { | ||
102 | fill: parent | ||
103 | margins: unit.width * 10 | ||
104 | } | ||
105 | |||
106 | Column { | ||
107 | id: content | ||
108 | |||
109 | width: parent.width | ||
110 | |||
111 | spacing: unit.width * 5 | ||
112 | |||
113 | |||
114 | Label { | ||
115 | text: model.subject | ||
116 | |||
117 | font.pixelSize: 22 // Fixme | ||
118 | } | ||
119 | |||
120 | //FIXME use propper avatar or avatar replacement | ||
121 | //Rectangle { | ||
122 | |||
123 | Item { | ||
124 | height: avatar.height | ||
125 | width: parent.width | ||
126 | |||
127 | Avatar { | ||
128 | id: avatar | ||
129 | |||
130 | width: unit.width * 15 | ||
131 | height: unit.width * 15 | ||
132 | |||
133 | name: model.sender | ||
134 | } | ||
135 | |||
136 | Label { | ||
137 | |||
138 | anchors { | ||
139 | left: avatar.right | ||
140 | top: avatar.top | ||
141 | leftMargin: unit.width * 3 | ||
142 | } | ||
143 | |||
144 | text: model.senderAddress | ||
145 | } | ||
146 | |||
147 | Label { | ||
148 | anchors { | ||
149 | left: avatar.right | ||
150 | bottom: avatar.bottom | ||
151 | leftMargin: unit.width * 3 | ||
152 | } | ||
153 | |||
154 | text: "CC: " + model.cc | ||
155 | |||
156 | } | ||
157 | } | ||
158 | |||
159 | Label { | ||
160 | |||
161 | width: parent.width | ||
162 | |||
163 | wrapMode: Text.WordWrap | ||
164 | |||
165 | text: model.body | ||
166 | |||
167 | } | ||
168 | } | ||
169 | } | ||
170 | } | ||
171 | } | ||
diff --git a/applications/kube-mail-mobile/Avatar.qml b/applications/mail-mobile/Avatar.qml index 3d3ffb2e..592a3f99 100644 --- a/applications/kube-mail-mobile/Avatar.qml +++ b/applications/mail-mobile/Avatar.qml | |||
@@ -38,7 +38,7 @@ Rectangle { | |||
38 | } | 38 | } |
39 | } | 39 | } |
40 | 40 | ||
41 | radius: 2 | 41 | radius: 100 |
42 | 42 | ||
43 | color: calcColor(name.length) | 43 | color: calcColor(name.length) |
44 | 44 | ||
@@ -47,8 +47,8 @@ Rectangle { | |||
47 | 47 | ||
48 | text: name.charAt(0) | 48 | text: name.charAt(0) |
49 | 49 | ||
50 | font.pointSize: unit.font.pixelSize * 1.2 | ||
51 | |||
52 | color: "#ecf0f1" | 50 | color: "#ecf0f1" |
51 | |||
52 | font.capitalization: Font.AllUppercase | ||
53 | } | 53 | } |
54 | } | 54 | } |
diff --git a/applications/kube-mail-mobile/main.qml b/applications/mail-mobile/ComposerPage.qml index 914a21d5..2e96a803 100644 --- a/applications/kube-mail-mobile/main.qml +++ b/applications/mail-mobile/ComposerPage.qml | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (C) 2015 Michael Bohlender <michael.bohlender@kdemail.net> | 2 | * Copyright (C) 2016 Michael Bohlender <michael.bohlender@kdemail.net> |
3 | * | 3 | * |
4 | * This program is free software; you can redistribute it and/or modify | 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 | 5 | * it under the terms of the GNU General Public License as published by |
@@ -16,36 +16,41 @@ | |||
16 | */ | 16 | */ |
17 | 17 | ||
18 | import QtQuick 2.4 | 18 | import QtQuick 2.4 |
19 | import QtQuick.Controls 1.3 | 19 | import QtQuick.Controls 1.4 as Controls |
20 | import QtQuick.Layouts 1.1 | 20 | import QtQuick.Layouts 1.2 |
21 | 21 | ||
22 | ApplicationWindow { | 22 | import org.kde.kirigami 1.0 as Kirigami |
23 | id: app | ||
24 | 23 | ||
25 | //FIXME remove fixed pixel hight | 24 | Kirigami.Page { |
26 | //for now just convinience during testing | 25 | id: root |
27 | width: 1080 / 2.7 | ||
28 | height: (1920 - 40)/ 2.7 | ||
29 | 26 | ||
30 | visible: true | 27 | anchors.fill: parent |
31 | 28 | ||
32 | StackView { | 29 | background: Rectangle { |
33 | id: stack | 30 | color: Kirigami.Theme.viewBackgroundColor |
31 | } | ||
32 | |||
33 | title: "Compose" | ||
34 | 34 | ||
35 | ColumnLayout { | ||
35 | anchors.fill: parent | 36 | anchors.fill: parent |
36 | 37 | ||
37 | //TODO set sink folderId property | 38 | Controls.TextField { |
38 | initialItem: {"item": Qt.resolvedUrl("FolderListView.qml"),properties: {stack: stack}} | 39 | Layout.fillWidth: true |
39 | } | ||
40 | 40 | ||
41 | //FIXME use whatever the plasma standart is | 41 | placeholderText: "To" |
42 | Label { | 42 | } |
43 | id: unit | ||
44 | 43 | ||
45 | text: " " | 44 | Controls.TextField { |
46 | } | 45 | Layout.fillWidth: true |
46 | |||
47 | placeholderText: "Subject" | ||
48 | } | ||
47 | 49 | ||
48 | ColorPalette { | 50 | Controls.TextArea { |
49 | id: colorPalette | 51 | Layout.fillWidth: true |
52 | Layout.fillHeight: true | ||
53 | } | ||
50 | } | 54 | } |
51 | } \ No newline at end of file | 55 | |
56 | } | ||
diff --git a/applications/kube-mail-mobile/FolderListModel.qml b/applications/mail-mobile/FolderListModel.qml index 19093d51..82622bfb 100644 --- a/applications/kube-mail-mobile/FolderListModel.qml +++ b/applications/mail-mobile/FolderListModel.qml | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (C) 2015 Michael Bohlender <michael.bohlender@kdemail.net> | 2 | * Copyright (C) 2016 Michael Bohlender <michael.bohlender@kdemail.net> |
3 | * | 3 | * |
4 | * This program is free software; you can redistribute it and/or modify | 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 | 5 | * it under the terms of the GNU General Public License as published by |
@@ -19,11 +19,6 @@ import QtQuick 2.4 | |||
19 | 19 | ||
20 | ListModel { | 20 | ListModel { |
21 | ListElement { | 21 | ListElement { |
22 | icon: "" | ||
23 | name: " kolabnow" | ||
24 | topLvl: true | ||
25 | } | ||
26 | ListElement { | ||
27 | icon: "mail-folder-inbox" | 22 | icon: "mail-folder-inbox" |
28 | name: "Inbox" | 23 | name: "Inbox" |
29 | } | 24 | } |
@@ -50,27 +45,6 @@ ListModel { | |||
50 | } | 45 | } |
51 | 46 | ||
52 | ListElement { | 47 | ListElement { |
53 | icon: "" | ||
54 | name: " campus.lmu.de" | ||
55 | topLvl: true | ||
56 | } | ||
57 | ListElement { | ||
58 | icon: "mail-folder-inbox" | ||
59 | name: "Inbox" | ||
60 | } | ||
61 | ListElement { | ||
62 | icon: "mail-folder-sent" | ||
63 | name: "Sent" | ||
64 | } | ||
65 | ListElement { | ||
66 | icon: "user-trash" | ||
67 | name: "Trash" | ||
68 | } | ||
69 | ListElement { | ||
70 | icon: "document-edit" | ||
71 | name: "Drafts" | ||
72 | } | ||
73 | ListElement { | ||
74 | icon: "folder" | 48 | icon: "folder" |
75 | name: "pim" | 49 | name: "pim" |
76 | } | 50 | } |
@@ -78,4 +52,5 @@ ListModel { | |||
78 | icon: "folder" | 52 | icon: "folder" |
79 | name: "vdg" | 53 | name: "vdg" |
80 | } | 54 | } |
55 | |||
81 | } | 56 | } |
diff --git a/applications/mail-mobile/FolderPage.qml b/applications/mail-mobile/FolderPage.qml new file mode 100644 index 00000000..42c150e8 --- /dev/null +++ b/applications/mail-mobile/FolderPage.qml | |||
@@ -0,0 +1,120 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2016 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.4 as Controls | ||
20 | import QtQuick.Layouts 1.2 | ||
21 | |||
22 | import org.kde.kirigami 1.0 as Kirigami | ||
23 | |||
24 | Kirigami.ScrollablePage { | ||
25 | id: root | ||
26 | |||
27 | anchors.fill: parent | ||
28 | |||
29 | background: Rectangle { | ||
30 | color: Kirigami.Theme.viewBackgroundColor | ||
31 | } | ||
32 | |||
33 | mainAction: Kirigami.Action { | ||
34 | iconName: "mail-message-new" | ||
35 | |||
36 | onTriggered: { | ||
37 | app.pageStack.push(Qt.resolvedUrl("ComposerPage.qml")) | ||
38 | } | ||
39 | |||
40 | } | ||
41 | |||
42 | ListView { | ||
43 | id: listView | ||
44 | |||
45 | model: MailListModel {} | ||
46 | |||
47 | delegate: Kirigami.SwipeListItem { | ||
48 | id: mailListDelegate | ||
49 | |||
50 | property bool important: model.important | ||
51 | property bool unread: model.unread | ||
52 | |||
53 | actions: [ | ||
54 | Kirigami.Action { | ||
55 | iconName: "mail-mark-important" | ||
56 | |||
57 | onTriggered: { | ||
58 | if(important) { | ||
59 | important = false | ||
60 | } else { | ||
61 | important = true | ||
62 | } | ||
63 | } | ||
64 | }, | ||
65 | Kirigami.Action { | ||
66 | iconName: "mail-mark-unread-new" | ||
67 | |||
68 | onTriggered: { | ||
69 | if(unread) { | ||
70 | unread = false | ||
71 | } else { | ||
72 | unread = true | ||
73 | } | ||
74 | } | ||
75 | }, | ||
76 | Kirigami.Action { | ||
77 | iconName: "entry-delete" | ||
78 | } | ||
79 | ] | ||
80 | |||
81 | enabled: true | ||
82 | |||
83 | onClicked: { | ||
84 | app.pageStack.push(Qt.resolvedUrl("MailListPage.qml")) | ||
85 | } | ||
86 | |||
87 | RowLayout { | ||
88 | anchors.fill: parent | ||
89 | |||
90 | width: parent.width | ||
91 | |||
92 | Avatar { | ||
93 | id: avatar | ||
94 | |||
95 | height: textItem.height * 0.9 | ||
96 | width: height | ||
97 | |||
98 | name: model.sender | ||
99 | } | ||
100 | |||
101 | ColumnLayout { | ||
102 | id: textItem | ||
103 | |||
104 | Controls.Label { | ||
105 | text: model.subject | ||
106 | |||
107 | color: important ? "#da4453" : unread ? "#1d99f3" : Kirigami.Theme.textColor | ||
108 | } | ||
109 | |||
110 | Controls.Label { | ||
111 | text: model.sender | ||
112 | } | ||
113 | Item { | ||
114 | Layout.fillWidth: true | ||
115 | } | ||
116 | } | ||
117 | } | ||
118 | } | ||
119 | } | ||
120 | } | ||
diff --git a/applications/kube-mail-mobile/MailListModel.qml b/applications/mail-mobile/MailListModel.qml index 4b425b90..28b6766f 100644 --- a/applications/kube-mail-mobile/MailListModel.qml +++ b/applications/mail-mobile/MailListModel.qml | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (C) 2015 Michael Bohlender <michael.bohlender@kdemail.net> | 2 | * Copyright (C) 2016 Michael Bohlender <michael.bohlender@kdemail.net> |
3 | * | 3 | * |
4 | * This program is free software; you can redistribute it and/or modify | 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 | 5 | * it under the terms of the GNU General Public License as published by |
diff --git a/applications/mail-mobile/MailListPage.qml b/applications/mail-mobile/MailListPage.qml new file mode 100644 index 00000000..a8dc87e2 --- /dev/null +++ b/applications/mail-mobile/MailListPage.qml | |||
@@ -0,0 +1,120 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2016 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.4 as Controls | ||
20 | import QtQuick.Layouts 1.2 | ||
21 | |||
22 | import org.kde.kirigami 1.0 as Kirigami | ||
23 | |||
24 | Kirigami.ScrollablePage { | ||
25 | id: root | ||
26 | |||
27 | anchors.fill: parent | ||
28 | |||
29 | background: Rectangle { | ||
30 | color: Kirigami.Theme.viewBackgroundColor | ||
31 | } | ||
32 | |||
33 | mainAction: Kirigami.Action { | ||
34 | iconName: "mail-message-new" | ||
35 | |||
36 | onTriggered: { | ||
37 | app.pageStack.push(Qt.resolvedUrl("ComposerPage.qml")) | ||
38 | } | ||
39 | |||
40 | } | ||
41 | |||
42 | ListView { | ||
43 | id: listView | ||
44 | |||
45 | model: MailListModel {} | ||
46 | |||
47 | delegate: Kirigami.SwipeListItem { | ||
48 | id: mailListDelegate | ||
49 | |||
50 | property bool important: model.important | ||
51 | property bool unread: model.unread | ||
52 | |||
53 | actions: [ | ||
54 | Kirigami.Action { | ||
55 | iconName: "mail-mark-important" | ||
56 | |||
57 | onTriggered: { | ||
58 | if(important) { | ||
59 | important = false | ||
60 | } else { | ||
61 | important = true | ||
62 | } | ||
63 | } | ||
64 | }, | ||
65 | Kirigami.Action { | ||
66 | iconName: "mail-mark-unread-new" | ||
67 | |||
68 | onTriggered: { | ||
69 | if(unread) { | ||
70 | unread = false | ||
71 | } else { | ||
72 | unread = true | ||
73 | } | ||
74 | } | ||
75 | }, | ||
76 | Kirigami.Action { | ||
77 | iconName: "entry-delete" | ||
78 | } | ||
79 | ] | ||
80 | |||
81 | enabled: true | ||
82 | |||
83 | onClicked: { | ||
84 | app.pageStack.push(Qt.resolvedUrl("SingleMailPage.qml")) | ||
85 | } | ||
86 | |||
87 | RowLayout { | ||
88 | anchors.fill: parent | ||
89 | |||
90 | width: parent.width | ||
91 | |||
92 | Avatar { | ||
93 | id: avatar | ||
94 | |||
95 | height: textItem.height * 0.9 | ||
96 | width: height | ||
97 | |||
98 | name: model.sender | ||
99 | } | ||
100 | |||
101 | ColumnLayout { | ||
102 | id: textItem | ||
103 | |||
104 | Controls.Label { | ||
105 | text: model.subject | ||
106 | |||
107 | color: important ? "#da4453" : unread ? "#1d99f3" : Kirigami.Theme.textColor | ||
108 | } | ||
109 | |||
110 | Controls.Label { | ||
111 | text: model.sender | ||
112 | } | ||
113 | Item { | ||
114 | Layout.fillWidth: true | ||
115 | } | ||
116 | } | ||
117 | } | ||
118 | } | ||
119 | } | ||
120 | } | ||
diff --git a/applications/mail-mobile/SingleMailPage.qml b/applications/mail-mobile/SingleMailPage.qml new file mode 100644 index 00000000..a5ee9b98 --- /dev/null +++ b/applications/mail-mobile/SingleMailPage.qml | |||
@@ -0,0 +1,131 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2016 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 as Controls | ||
20 | import QtQuick.Layouts 1.1 | ||
21 | |||
22 | import org.kde.kirigami 1.0 as Kirigami | ||
23 | |||
24 | Kirigami.ScrollablePage { | ||
25 | id: root | ||
26 | |||
27 | background: Rectangle { | ||
28 | color: Kirigami.Theme.viewBackgroundColor | ||
29 | } | ||
30 | |||
31 | title: "Read" | ||
32 | |||
33 | mainAction: Kirigami.Action { | ||
34 | iconName: "mail-reply-sender" | ||
35 | |||
36 | onTriggered: { | ||
37 | app.pageStack.push(Qt.resolvedUrl("ComposerPage.qml")) | ||
38 | } | ||
39 | |||
40 | } | ||
41 | contextualActions: [ | ||
42 | Kirigami.Action { | ||
43 | text:"Forward" | ||
44 | iconName: "mail-forward" | ||
45 | onTriggered: { | ||
46 | app.contextDrawer.close() | ||
47 | app.pageStack.push(Qt.resolvedUrl("ComposerPage.qml")) | ||
48 | } | ||
49 | } | ||
50 | ] | ||
51 | |||
52 | Item { | ||
53 | |||
54 | Layout.fillWidth: true | ||
55 | |||
56 | Item { | ||
57 | id: model | ||
58 | property string subject: "We need more Food" | ||
59 | property string sender: "Alice Trump" | ||
60 | property string senderAddress: "alice@wonderland.net" | ||
61 | property string cc: "vdg@kde.org; ross@ccmail.com" | ||
62 | property string time: "2 days ago" | ||
63 | property string body: "Hi Bob, \n \n Ut nibh massa, volutpat quis diam quis, tincidunt consectetur massa. Nulla eu ultricies justo, eu aliquam lacus. Maecenas at interdum est, at luctus nibh. Quisque scelerisque consequat lectus vitae egestas. Maecenas molestie risus id enim consequat dapibus. Ut dapibus hendrerit est, ut aliquam ex fringilla commodo. Donec rutru semper sit amet elit ut volutpat. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae. \n \n Cheers, \n \n Alice" | ||
64 | } | ||
65 | |||
66 | Item { | ||
67 | id: content | ||
68 | |||
69 | width: parent.width | ||
70 | |||
71 | Kirigami.Heading { | ||
72 | id: subject | ||
73 | text: model.subject | ||
74 | |||
75 | Layout.fillWidth: true | ||
76 | } | ||
77 | |||
78 | Kirigami.Label { | ||
79 | |||
80 | anchors { | ||
81 | top: subject.bottom | ||
82 | } | ||
83 | |||
84 | text: "From:" | ||
85 | } | ||
86 | |||
87 | Kirigami.Label { | ||
88 | id: sender | ||
89 | anchors { | ||
90 | top: avatar.top | ||
91 | right: avatar.left | ||
92 | } | ||
93 | |||
94 | text: model.sender | ||
95 | } | ||
96 | |||
97 | Kirigami.Label { | ||
98 | |||
99 | anchors { | ||
100 | bottom: avatar.bottom | ||
101 | right: avatar.left | ||
102 | } | ||
103 | |||
104 | text: model.senderAddress | ||
105 | } | ||
106 | |||
107 | Avatar { | ||
108 | id: avatar | ||
109 | |||
110 | anchors { | ||
111 | top: subject.bottom | ||
112 | right: content.right | ||
113 | } | ||
114 | name: model.sender | ||
115 | |||
116 | height: subject.height | ||
117 | width: subject.height | ||
118 | } | ||
119 | |||
120 | Kirigami.Label { | ||
121 | anchors.top: avatar.bottom | ||
122 | |||
123 | width: parent.width | ||
124 | |||
125 | wrapMode: Text.WordWrap | ||
126 | |||
127 | text: model.body | ||
128 | } | ||
129 | } | ||
130 | } | ||
131 | } | ||
diff --git a/applications/mail-mobile/main.qml b/applications/mail-mobile/main.qml new file mode 100644 index 00000000..d3db3b7f --- /dev/null +++ b/applications/mail-mobile/main.qml | |||
@@ -0,0 +1,81 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2016 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.4 as Controls | ||
20 | import QtQuick.Layouts 1.2 | ||
21 | |||
22 | import org.kde.kirigami 1.0 as Kirigami | ||
23 | |||
24 | Kirigami.ApplicationWindow { | ||
25 | id: app | ||
26 | |||
27 | //FIXME remove fixed pixel hight | ||
28 | //for now just convinience during testing | ||
29 | width: 1080 / 2.7 | ||
30 | height: (1920 - 40)/ 2.7 | ||
31 | |||
32 | visible: true | ||
33 | |||
34 | globalDrawer: Kirigami.GlobalDrawer { | ||
35 | title: "Kube Mail" | ||
36 | titleIcon: "kmail" | ||
37 | |||
38 | actions: [ | ||
39 | Kirigami.Action { | ||
40 | text: "Unread" | ||
41 | onTriggered: { | ||
42 | |||
43 | |||
44 | pageStack.initialPage = Qt.resolvedUrl("MailListPage.qml"); | ||
45 | } | ||
46 | }, | ||
47 | Kirigami.Action { | ||
48 | text: "Imporant" | ||
49 | }, | ||
50 | Kirigami.Action { | ||
51 | text: "Drafts" | ||
52 | }, | ||
53 | Kirigami.Action { | ||
54 | text: "All Mail" | ||
55 | } | ||
56 | ] | ||
57 | |||
58 | ListView { | ||
59 | id: listView | ||
60 | |||
61 | anchors.fill: parent | ||
62 | |||
63 | model: FolderListModel {} | ||
64 | |||
65 | delegate: Kirigami.BasicListItem { | ||
66 | |||
67 | label: model.name | ||
68 | |||
69 | enabled: true | ||
70 | } | ||
71 | } | ||
72 | } | ||
73 | |||
74 | contextDrawer: Kirigami.ContextDrawer { | ||
75 | id: contextDrawer | ||
76 | } | ||
77 | |||
78 | pageStack.initialPage: MailListPage { | ||
79 | title: "Inbox" | ||
80 | } | ||
81 | } | ||