diff options
author | Michael Bohlender <michael.bohlender@kdemail.net> | 2018-02-27 08:37:28 +0100 |
---|---|---|
committer | Michael Bohlender <michael.bohlender@kdemail.net> | 2018-02-27 08:37:28 +0100 |
commit | 8a8729a371373d5c841e058ab21f4fdd0169b40a (patch) | |
tree | c165a152efad484f842e4004e058c8c67446a0d8 | |
parent | 331f75d4da056ddb235be45a3784d2c19e545211 (diff) | |
download | kube-8a8729a371373d5c841e058ab21f4fdd0169b40a.tar.gz kube-8a8729a371373d5c841e058ab21f4fdd0169b40a.zip |
todo view scaffold
-rw-r--r-- | icons/breeze/icons/actions/16/mail-mark-task-inverted.svg | 13 | ||||
-rw-r--r-- | icons/breeze/icons/actions/16/mail-mark-task.svg | 13 | ||||
l--------- | icons/breeze/icons/actions/16/mail-task-inverted.svg | 1 | ||||
l--------- | icons/breeze/icons/actions/16/mail-task.svg | 1 | ||||
-rw-r--r-- | icons/breeze/icons/actions/22/mail-mark-task-inverted.svg | 14 | ||||
-rw-r--r-- | icons/breeze/icons/actions/22/mail-mark-task.svg | 14 | ||||
l--------- | icons/breeze/icons/actions/22/mail-task-inverted.svg | 1 | ||||
l--------- | icons/breeze/icons/actions/22/mail-task.svg | 1 | ||||
-rwxr-xr-x | icons/copybreeze.sh | 3 | ||||
-rw-r--r-- | views/todo/main.qml | 92 | ||||
-rw-r--r-- | views/todo/metadata.json | 4 | ||||
-rw-r--r-- | views/todo/qml/View.qml | 33 | ||||
-rw-r--r-- | views/todo/tests/tst_todo.qml | 36 |
13 files changed, 225 insertions, 1 deletions
diff --git a/icons/breeze/icons/actions/16/mail-mark-task-inverted.svg b/icons/breeze/icons/actions/16/mail-mark-task-inverted.svg new file mode 100644 index 00000000..c6017742 --- /dev/null +++ b/icons/breeze/icons/actions/16/mail-mark-task-inverted.svg | |||
@@ -0,0 +1,13 @@ | |||
1 | <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"> | ||
2 | <defs id="defs3051"> | ||
3 | <style type="text/css" id="current-color-scheme"> | ||
4 | .ColorScheme-Text { | ||
5 | color:#f2f2f2; | ||
6 | } | ||
7 | </style> | ||
8 | </defs> | ||
9 | <path style="fill:currentColor;fill-opacity:1;stroke:none" | ||
10 | d="M 2 2 L 2 5 L 5 5 L 5 2 L 2 2 z M 6 2 L 6 3 L 14 3 L 14 2 L 6 2 z M 6 4 L 6 5 L 10 5 L 10 4 L 6 4 z M 2 7 L 2 10 L 5 10 L 5 7 L 2 7 z M 6 7 L 6 8 L 13 8 L 13 7 L 6 7 z M 6 9 L 6 10 L 8 10 L 8 9 L 6 9 z M 13.335938 9 L 10.1875 12.609375 L 8.6621094 11.056641 L 8 11.732422 L 10.226562 14 L 14 9.6777344 L 13.335938 9 z " | ||
11 | class="ColorScheme-Text" | ||
12 | /> | ||
13 | </svg> | ||
diff --git a/icons/breeze/icons/actions/16/mail-mark-task.svg b/icons/breeze/icons/actions/16/mail-mark-task.svg new file mode 100644 index 00000000..5b4104a1 --- /dev/null +++ b/icons/breeze/icons/actions/16/mail-mark-task.svg | |||
@@ -0,0 +1,13 @@ | |||
1 | <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"> | ||
2 | <defs id="defs3051"> | ||
3 | <style type="text/css" id="current-color-scheme"> | ||
4 | .ColorScheme-Text { | ||
5 | color:#4d4d4d; | ||
6 | } | ||
7 | </style> | ||
8 | </defs> | ||
9 | <path style="fill:currentColor;fill-opacity:1;stroke:none" | ||
10 | d="M 2 2 L 2 5 L 5 5 L 5 2 L 2 2 z M 6 2 L 6 3 L 14 3 L 14 2 L 6 2 z M 6 4 L 6 5 L 10 5 L 10 4 L 6 4 z M 2 7 L 2 10 L 5 10 L 5 7 L 2 7 z M 6 7 L 6 8 L 13 8 L 13 7 L 6 7 z M 6 9 L 6 10 L 8 10 L 8 9 L 6 9 z M 13.335938 9 L 10.1875 12.609375 L 8.6621094 11.056641 L 8 11.732422 L 10.226562 14 L 14 9.6777344 L 13.335938 9 z " | ||
11 | class="ColorScheme-Text" | ||
12 | /> | ||
13 | </svg> | ||
diff --git a/icons/breeze/icons/actions/16/mail-task-inverted.svg b/icons/breeze/icons/actions/16/mail-task-inverted.svg new file mode 120000 index 00000000..a5be7a27 --- /dev/null +++ b/icons/breeze/icons/actions/16/mail-task-inverted.svg | |||
@@ -0,0 +1 @@ | |||
mail-mark-task-inverted.svg \ No newline at end of file | |||
diff --git a/icons/breeze/icons/actions/16/mail-task.svg b/icons/breeze/icons/actions/16/mail-task.svg new file mode 120000 index 00000000..c516e4b6 --- /dev/null +++ b/icons/breeze/icons/actions/16/mail-task.svg | |||
@@ -0,0 +1 @@ | |||
mail-mark-task.svg \ No newline at end of file | |||
diff --git a/icons/breeze/icons/actions/22/mail-mark-task-inverted.svg b/icons/breeze/icons/actions/22/mail-mark-task-inverted.svg new file mode 100644 index 00000000..0fc3b40b --- /dev/null +++ b/icons/breeze/icons/actions/22/mail-mark-task-inverted.svg | |||
@@ -0,0 +1,14 @@ | |||
1 | <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 22 22"> | ||
2 | <defs id="defs3051"> | ||
3 | <style type="text/css" id="current-color-scheme"> | ||
4 | .ColorScheme-Text { | ||
5 | color:#f2f2f2; | ||
6 | } | ||
7 | </style> | ||
8 | </defs> | ||
9 | <path | ||
10 | style="fill:currentColor;fill-opacity:1;stroke:none" | ||
11 | d="M 3 3 L 3 7 L 7 7 L 7 3 L 3 3 z M 8 3 L 8 4 L 20 4 L 20 3 L 8 3 z M 8 6 L 8 7 L 15 7 L 15 6 L 8 6 z M 3 9 L 3 13 L 7 13 L 7 9 L 3 9 z M 8 9 L 8 10 L 20 10 L 20 9 L 8 9 z M 8 12 L 8 13 L 12 13 L 12 12 L 8 12 z M 19.292969 12.613281 L 14.701172 17.205078 L 13.554688 16.058594 L 12.847656 16.765625 L 14.693359 18.613281 L 14.699219 18.605469 L 14.707031 18.613281 L 20 13.320312 L 19.292969 12.613281 z M 3 15 L 3 19 L 7 19 L 7 15 L 3 15 z " | ||
12 | class="ColorScheme-Text" | ||
13 | /> | ||
14 | </svg> | ||
diff --git a/icons/breeze/icons/actions/22/mail-mark-task.svg b/icons/breeze/icons/actions/22/mail-mark-task.svg new file mode 100644 index 00000000..53d2d2c2 --- /dev/null +++ b/icons/breeze/icons/actions/22/mail-mark-task.svg | |||
@@ -0,0 +1,14 @@ | |||
1 | <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 22 22"> | ||
2 | <defs id="defs3051"> | ||
3 | <style type="text/css" id="current-color-scheme"> | ||
4 | .ColorScheme-Text { | ||
5 | color:#4d4d4d; | ||
6 | } | ||
7 | </style> | ||
8 | </defs> | ||
9 | <path | ||
10 | style="fill:currentColor;fill-opacity:1;stroke:none" | ||
11 | d="M 3 3 L 3 7 L 7 7 L 7 3 L 3 3 z M 8 3 L 8 4 L 20 4 L 20 3 L 8 3 z M 8 6 L 8 7 L 15 7 L 15 6 L 8 6 z M 3 9 L 3 13 L 7 13 L 7 9 L 3 9 z M 8 9 L 8 10 L 20 10 L 20 9 L 8 9 z M 8 12 L 8 13 L 12 13 L 12 12 L 8 12 z M 19.292969 12.613281 L 14.701172 17.205078 L 13.554688 16.058594 L 12.847656 16.765625 L 14.693359 18.613281 L 14.699219 18.605469 L 14.707031 18.613281 L 20 13.320312 L 19.292969 12.613281 z M 3 15 L 3 19 L 7 19 L 7 15 L 3 15 z " | ||
12 | class="ColorScheme-Text" | ||
13 | /> | ||
14 | </svg> | ||
diff --git a/icons/breeze/icons/actions/22/mail-task-inverted.svg b/icons/breeze/icons/actions/22/mail-task-inverted.svg new file mode 120000 index 00000000..a5be7a27 --- /dev/null +++ b/icons/breeze/icons/actions/22/mail-task-inverted.svg | |||
@@ -0,0 +1 @@ | |||
mail-mark-task-inverted.svg \ No newline at end of file | |||
diff --git a/icons/breeze/icons/actions/22/mail-task.svg b/icons/breeze/icons/actions/22/mail-task.svg new file mode 120000 index 00000000..c516e4b6 --- /dev/null +++ b/icons/breeze/icons/actions/22/mail-task.svg | |||
@@ -0,0 +1 @@ | |||
mail-mark-task.svg \ No newline at end of file | |||
diff --git a/icons/copybreeze.sh b/icons/copybreeze.sh index 693a40c8..b7c85229 100755 --- a/icons/copybreeze.sh +++ b/icons/copybreeze.sh | |||
@@ -42,7 +42,8 @@ wantedIcons = [ | |||
42 | "format-text-italic-symbolic.svg", | 42 | "format-text-italic-symbolic.svg", |
43 | "format-text-underline-symbolic.svg", | 43 | "format-text-underline-symbolic.svg", |
44 | "kdocumentinfo.svg", | 44 | "kdocumentinfo.svg", |
45 | "group.svg" | 45 | "group.svg", |
46 | "mail-task.svg" | ||
46 | ] | 47 | ] |
47 | 48 | ||
48 | def ensure_dir(file_path): | 49 | def ensure_dir(file_path): |
diff --git a/views/todo/main.qml b/views/todo/main.qml new file mode 100644 index 00000000..4065b876 --- /dev/null +++ b/views/todo/main.qml | |||
@@ -0,0 +1,92 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2018 Christian Mollekopf, <mollekopf@kolabsys.com> | ||
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 2 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 along | ||
15 | * with this program; if not, write to the Free Software Foundation, Inc., | ||
16 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||
17 | */ | ||
18 | |||
19 | import QtQuick 2.7 | ||
20 | import QtQuick.Controls 2.0 | ||
21 | import QtQuick.Window 2.0 | ||
22 | |||
23 | import org.kube.framework 1.0 as Kube | ||
24 | import org.kube.test 1.0 | ||
25 | import "qml" | ||
26 | |||
27 | ApplicationWindow { | ||
28 | id: app | ||
29 | height: Screen.desktopAvailableHeight * 0.8 | ||
30 | width: Screen.desktopAvailableWidth * 0.8 | ||
31 | |||
32 | Component.onCompleted: { | ||
33 | var initialState = { | ||
34 | accounts: [{ | ||
35 | id: "account1", | ||
36 | name: "Test Account" | ||
37 | }], | ||
38 | identities: [{ | ||
39 | account: "account1", | ||
40 | name: "Test Identity", | ||
41 | address: "identity@example.org" | ||
42 | }], | ||
43 | resources: [{ | ||
44 | id: "resource1", | ||
45 | account: "account1", | ||
46 | type: "dummy" | ||
47 | }, | ||
48 | { | ||
49 | id: "resource2", | ||
50 | account: "account1", | ||
51 | type: "mailtransport" | ||
52 | }], | ||
53 | folders: [{ | ||
54 | id: "folder1", | ||
55 | resource: "resource1", | ||
56 | name: "Folder 1", | ||
57 | specialpurpose: ["inbox"], | ||
58 | mails: [{ | ||
59 | resource: "resource1", | ||
60 | messageId: "<msg1@test.com>", | ||
61 | date: "2017-07-24T15:46:29", | ||
62 | subject: "subject1", | ||
63 | body: "body", | ||
64 | to: ["to@example.org"], | ||
65 | cc: ["cc@example.org"], | ||
66 | bcc: ["bcc@example.org"], | ||
67 | }, | ||
68 | { | ||
69 | resource: "resource1", | ||
70 | inReplyTo: "<msg1@test.com>", | ||
71 | date: "2017-07-24T16:46:29", | ||
72 | subject: "subject2", | ||
73 | body: "body2", | ||
74 | to: ["to@example.org"], | ||
75 | }, | ||
76 | { | ||
77 | resource: "resource1", | ||
78 | date: "2017-07-24T18:46:29", | ||
79 | subject: "subject4", | ||
80 | body: "body4", | ||
81 | to: ["to@example.org"], | ||
82 | }, | ||
83 | ] | ||
84 | }], | ||
85 | } | ||
86 | TestStore.setup(initialState) | ||
87 | } | ||
88 | |||
89 | View { | ||
90 | anchors.fill: parent | ||
91 | } | ||
92 | } | ||
diff --git a/views/todo/metadata.json b/views/todo/metadata.json new file mode 100644 index 00000000..669f85a6 --- /dev/null +++ b/views/todo/metadata.json | |||
@@ -0,0 +1,4 @@ | |||
1 | { | ||
2 | "icon": "mail-task", | ||
3 | "tooltip": "Get things done!" | ||
4 | } | ||
diff --git a/views/todo/qml/View.qml b/views/todo/qml/View.qml new file mode 100644 index 00000000..ef3cc0bd --- /dev/null +++ b/views/todo/qml/View.qml | |||
@@ -0,0 +1,33 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2017 Christian Mollekopf, <mollekopf@kolabsys.com> | ||
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 2 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 along | ||
15 | * with this program; if not, write to the Free Software Foundation, Inc., | ||
16 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||
17 | */ | ||
18 | |||
19 | import QtQuick 2.4 | ||
20 | import QtQuick.Layouts 1.1 | ||
21 | import QtQuick.Controls 2.0 | ||
22 | import org.kube.framework 1.0 as Kube | ||
23 | |||
24 | FocusScope { | ||
25 | id: root | ||
26 | |||
27 | Kube.Label { | ||
28 | anchors { | ||
29 | centerIn: parent | ||
30 | } | ||
31 | text: "ToDo" | ||
32 | } | ||
33 | } | ||
diff --git a/views/todo/tests/tst_todo.qml b/views/todo/tests/tst_todo.qml new file mode 100644 index 00000000..46f7dba2 --- /dev/null +++ b/views/todo/tests/tst_todo.qml | |||
@@ -0,0 +1,36 @@ | |||
1 | /* | ||
2 | * Copyright 2017 Christian Mollekopf <mollekopf@kolabsys.com> | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify | ||
5 | * it under the terms of the GNU Library General Public License as | ||
6 | * published by the Free Software Foundation; either version 2, 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 Library General Public License for more details | ||
13 | * | ||
14 | * You should have received a copy of the GNU Library General Public | ||
15 | * License along with this program; if not, write to the | ||
16 | * Free Software Foundation, Inc., | ||
17 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||
18 | */ | ||
19 | |||
20 | import QtQuick 2.7 | ||
21 | import QtTest 1.0 | ||
22 | import "../qml" | ||
23 | |||
24 | TestCase { | ||
25 | width: 400 | ||
26 | height: 400 | ||
27 | name: "Todo" | ||
28 | |||
29 | View { | ||
30 | id: view | ||
31 | } | ||
32 | |||
33 | function test_start() { | ||
34 | verify(view) | ||
35 | } | ||
36 | } | ||