diff options
Diffstat (limited to 'applications/kmail-quick')
13 files changed, 0 insertions, 883 deletions
diff --git a/applications/kmail-quick/CMakeLists.txt b/applications/kmail-quick/CMakeLists.txt deleted file mode 100644 index 9758e597..00000000 --- a/applications/kmail-quick/CMakeLists.txt +++ /dev/null | |||
@@ -1,33 +0,0 @@ | |||
1 | project(kmail-quick) | ||
2 | |||
3 | cmake_minimum_required(VERSION 2.8.10.1) | ||
4 | |||
5 | include(CPack) | ||
6 | include(FeatureSummary) | ||
7 | find_package(PkgConfig) | ||
8 | |||
9 | ################# set KDE specific information ################# | ||
10 | |||
11 | find_package(ECM 0.0.8 REQUIRED NO_MODULE) | ||
12 | |||
13 | # where to look first for cmake modules, before ${CMAKE_ROOT}/Modules/ is checked | ||
14 | set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR}) | ||
15 | |||
16 | include(KDEInstallDirs) | ||
17 | include(KDECMakeSettings) | ||
18 | include(KDECompilerSettings) | ||
19 | |||
20 | find_package(Qt5 REQUIRED NO_MODULE COMPONENTS Core Quick Test Gui) | ||
21 | |||
22 | set (QT_MIN_VERSION "5.4.0") | ||
23 | find_package(KF5 REQUIRED COMPONENTS Package) | ||
24 | |||
25 | # install UI package | ||
26 | kpackage_install_package(package org.kde.pim.kmail-quick pim) | ||
27 | |||
28 | # install executable | ||
29 | add_executable(${PROJECT_NAME} main.cpp) | ||
30 | qt5_use_modules(${PROJECT_NAME} Gui Quick) | ||
31 | target_link_libraries(${PROJECT_NAME} KF5::Package) | ||
32 | |||
33 | install(TARGETS ${PROJECT_NAME} DESTINATION bin) | ||
diff --git a/applications/kmail-quick/main.cpp b/applications/kmail-quick/main.cpp deleted file mode 100644 index 557ca64e..00000000 --- a/applications/kmail-quick/main.cpp +++ /dev/null | |||
@@ -1,14 +0,0 @@ | |||
1 | #include <QGuiApplication> | ||
2 | #include <QQmlApplicationEngine> | ||
3 | |||
4 | #include <QStandardPaths> | ||
5 | |||
6 | #include <QDebug> | ||
7 | |||
8 | int main(int argc, char *argv[]) | ||
9 | { | ||
10 | QGuiApplication app(argc, argv); | ||
11 | auto mainFile = QStandardPaths::locate(QStandardPaths::GenericDataLocation, "kpackage/pim/org.kde.pim.kmail-quick/contents/ui/main.qml", QStandardPaths::LocateFile); | ||
12 | QQmlApplicationEngine engine(QUrl::fromLocalFile(mainFile)); | ||
13 | return app.exec(); | ||
14 | } | ||
diff --git a/applications/kmail-quick/package/contents/ui/Avatar.qml b/applications/kmail-quick/package/contents/ui/Avatar.qml deleted file mode 100644 index 33d6733c..00000000 --- a/applications/kmail-quick/package/contents/ui/Avatar.qml +++ /dev/null | |||
@@ -1,55 +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 | |||
23 | Rectangle { | ||
24 | |||
25 | property string name; | ||
26 | |||
27 | //colors taken from https://techbase.kde.org/Projects/Usability/HIG/Color | ||
28 | function calcColor(x) | ||
29 | { | ||
30 | switch (x % 5) { | ||
31 | case 0: | ||
32 | return "#16a085" | ||
33 | case 1: | ||
34 | return "#27ae60" | ||
35 | case 2: | ||
36 | return "#2980b9" | ||
37 | case 3: | ||
38 | return "#8e44ad" | ||
39 | case 4: | ||
40 | return "#c0392b" | ||
41 | } | ||
42 | } | ||
43 | |||
44 | radius: 2 | ||
45 | |||
46 | color: calcColor(name.length) | ||
47 | |||
48 | Text { | ||
49 | anchors.centerIn: parent | ||
50 | |||
51 | text: name.charAt(0) | ||
52 | |||
53 | color: "#ecf0f1" | ||
54 | } | ||
55 | } | ||
diff --git a/applications/kmail-quick/package/contents/ui/ColorPalette.qml b/applications/kmail-quick/package/contents/ui/ColorPalette.qml deleted file mode 100644 index db85cac6..00000000 --- a/applications/kmail-quick/package/contents/ui/ColorPalette.qml +++ /dev/null | |||
@@ -1,26 +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 | } \ No newline at end of file | ||
diff --git a/applications/kmail-quick/package/contents/ui/FolderListView.qml b/applications/kmail-quick/package/contents/ui/FolderListView.qml deleted file mode 100644 index f0ce7da2..00000000 --- a/applications/kmail-quick/package/contents/ui/FolderListView.qml +++ /dev/null | |||
@@ -1,102 +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 | import org.kde.plasma.core 2.0 as PlasmaCore | ||
23 | import org.kde.plasma.components 2.0 as PlasmaComponents | ||
24 | |||
25 | import org.kde.akonadi2.mail 1.0 as Mail | ||
26 | |||
27 | Item { | ||
28 | id: root | ||
29 | |||
30 | Item { | ||
31 | id: searchBox | ||
32 | |||
33 | width: root.width | ||
34 | height: unit.size * 10 | ||
35 | |||
36 | TextField { | ||
37 | anchors. centerIn: parent | ||
38 | |||
39 | width: parent.width * 0.9 | ||
40 | |||
41 | placeholderText: "Search all email..." | ||
42 | } | ||
43 | } | ||
44 | |||
45 | ScrollView { | ||
46 | |||
47 | anchors { | ||
48 | top: searchBox.bottom | ||
49 | left: parent.left | ||
50 | right: parent.right | ||
51 | bottom: parent.bottom | ||
52 | } | ||
53 | |||
54 | ListView { | ||
55 | id: listView | ||
56 | |||
57 | currentIndex: -1 | ||
58 | |||
59 | clip: true | ||
60 | |||
61 | model: folderList.model //FolderModel {} | ||
62 | |||
63 | delegate: PlasmaComponents.ListItem { | ||
64 | |||
65 | width: root.width | ||
66 | height: unit.size * 10 | ||
67 | |||
68 | enabled: true | ||
69 | checked: listView.currentIndex == index | ||
70 | |||
71 | onClicked: { | ||
72 | mailList.loadMailFolder(model.id) | ||
73 | listView.currentIndex = model.index | ||
74 | } | ||
75 | |||
76 | PlasmaCore.IconItem { | ||
77 | id: iconItem | ||
78 | |||
79 | anchors { | ||
80 | verticalCenter: parent.verticalCenter | ||
81 | left: parent.left | ||
82 | leftMargin: unit.size * 3 | ||
83 | } | ||
84 | |||
85 | source: model.icon | ||
86 | } | ||
87 | |||
88 | Label { | ||
89 | id: label | ||
90 | |||
91 | anchors { | ||
92 | verticalCenter: parent.verticalCenter | ||
93 | left: iconItem.right | ||
94 | leftMargin: unit.size * 3 | ||
95 | } | ||
96 | |||
97 | text: model.name | ||
98 | } | ||
99 | } | ||
100 | } | ||
101 | } | ||
102 | } \ No newline at end of file | ||
diff --git a/applications/kmail-quick/package/contents/ui/FolderModel.qml b/applications/kmail-quick/package/contents/ui/FolderModel.qml deleted file mode 100644 index b20a1606..00000000 --- a/applications/kmail-quick/package/contents/ui/FolderModel.qml +++ /dev/null | |||
@@ -1,36 +0,0 @@ | |||
1 | import QtQuick 2.4 | ||
2 | |||
3 | ListModel { | ||
4 | ListElement { | ||
5 | icon: "mail-folder-inbox" | ||
6 | name: "Inbox" | ||
7 | } | ||
8 | ListElement { | ||
9 | icon: "mail-folder-sent" | ||
10 | name: "Sent" | ||
11 | } | ||
12 | ListElement { | ||
13 | icon: "user-trash" | ||
14 | name: "Trash" | ||
15 | } | ||
16 | ListElement { | ||
17 | icon: "document-edit" | ||
18 | name: "Drafts" | ||
19 | } | ||
20 | ListElement { | ||
21 | icon: "folder" | ||
22 | name: "cats" | ||
23 | } | ||
24 | ListElement { | ||
25 | icon: "folder" | ||
26 | name: "dogs" | ||
27 | } | ||
28 | ListElement { | ||
29 | icon: "folder" | ||
30 | name: "dragons" | ||
31 | } | ||
32 | ListElement { | ||
33 | icon: "folder" | ||
34 | name: "long tailed dragons" | ||
35 | } | ||
36 | } \ No newline at end of file | ||
diff --git a/applications/kmail-quick/package/contents/ui/ListItem.qml b/applications/kmail-quick/package/contents/ui/ListItem.qml deleted file mode 100644 index 5396645d..00000000 --- a/applications/kmail-quick/package/contents/ui/ListItem.qml +++ /dev/null | |||
@@ -1,63 +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 | Item { | ||
21 | id: delegateRoot | ||
22 | |||
23 | readonly property bool isCurrentItem: ListView.isCurrentItem | ||
24 | |||
25 | height: unit.width * 25 | ||
26 | width: parent.width | ||
27 | |||
28 | MouseArea { | ||
29 | id: mouseArea | ||
30 | |||
31 | anchors.fill: parent | ||
32 | } | ||
33 | |||
34 | Rectangle { | ||
35 | anchors.fill: parent | ||
36 | |||
37 | color: colorPalette.background | ||
38 | |||
39 | //clickColor | ||
40 | Rectangle { | ||
41 | id: clickColor | ||
42 | |||
43 | anchors.fill: parent | ||
44 | |||
45 | color: colorPalette.selected | ||
46 | opacity: 0.4 | ||
47 | |||
48 | visible: mouseArea.pressed | ||
49 | } | ||
50 | |||
51 | //border | ||
52 | Rectangle { | ||
53 | |||
54 | anchors.bottom: parent.bottom | ||
55 | |||
56 | height: 1 | ||
57 | width: parent.width | ||
58 | |||
59 | color: colorPalette.border | ||
60 | opacity: 0.2 | ||
61 | } | ||
62 | } | ||
63 | } \ No newline at end of file | ||
diff --git a/applications/kmail-quick/package/contents/ui/MailListModel.qml b/applications/kmail-quick/package/contents/ui/MailListModel.qml deleted file mode 100644 index bf0f70a2..00000000 --- a/applications/kmail-quick/package/contents/ui/MailListModel.qml +++ /dev/null | |||
@@ -1,149 +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 | ListModel { | ||
21 | ListElement { | ||
22 | sender: "mighty@mail.com" | ||
23 | senderName: "Mighty Monkey" | ||
24 | subject: "I feel weak without my bananas" | ||
25 | date: "19:21" | ||
26 | unread: true | ||
27 | } | ||
28 | ListElement { | ||
29 | sender: "benni@bandana.org" | ||
30 | senderName: "Ben Bandana" | ||
31 | subject: "Check this out" | ||
32 | date: "16:01" | ||
33 | unread: true | ||
34 | } | ||
35 | ListElement { | ||
36 | sender: "alice@mail.com" | ||
37 | senderName: "Alice Cheng" | ||
38 | subject: "Re: We need more food" | ||
39 | date: "12:55" | ||
40 | unread: false | ||
41 | } | ||
42 | ListElement { | ||
43 | sender: "bob@bandana.org" | ||
44 | senderName: "Bob Ross" | ||
45 | subject: "KDE Rocks" | ||
46 | date: "Sat" | ||
47 | unread: true | ||
48 | } | ||
49 | ListElement { | ||
50 | sender: "tiny@mail.com" | ||
51 | senderName: "Tiny" | ||
52 | subject: "Huge success!!" | ||
53 | date: "Sat" | ||
54 | unread: false | ||
55 | } | ||
56 | ListElement { | ||
57 | sender: "bob@bandana.org" | ||
58 | senderName: "Bob Ross" | ||
59 | subject: "KDE Rocks" | ||
60 | date: "Fr" | ||
61 | unread: false | ||
62 | } | ||
63 | ListElement { | ||
64 | sender: "Laura@mail.com" | ||
65 | senderName: "Laura B" | ||
66 | subject: ":)" | ||
67 | date: "Thu" | ||
68 | unread: false | ||
69 | } | ||
70 | ListElement { | ||
71 | sender: "Andreas@stars.org" | ||
72 | senderName: "Andreas Rockstar" | ||
73 | subject: "KDE Rocks" | ||
74 | date: "Wed" | ||
75 | unread: false | ||
76 | } | ||
77 | ListElement { | ||
78 | sender: "alice@mail.com" | ||
79 | senderName: "Alice Cheng" | ||
80 | subject: "Re: We need more food" | ||
81 | date: "Wed" | ||
82 | } | ||
83 | ListElement { | ||
84 | sender: "bob@bandana.org" | ||
85 | senderName: "Bob Ross" | ||
86 | subject: "KDE Rocks" | ||
87 | date: "Mon" | ||
88 | } | ||
89 | ListElement { | ||
90 | sender: "mighty@mail.com" | ||
91 | senderName: "Mighty Monkey" | ||
92 | subject: "I feel weak without my bananas" | ||
93 | date: "Nov 20" | ||
94 | } | ||
95 | ListElement { | ||
96 | sender: "benni@bandana.org" | ||
97 | senderName: "Ben Bandana" | ||
98 | subject: "Check this out" | ||
99 | date: "Nov 15" | ||
100 | } | ||
101 | ListElement { | ||
102 | sender: "alice@mail.com" | ||
103 | senderName: "Alice Cheng" | ||
104 | subject: "Re: We need more food" | ||
105 | date: "Sep 29" | ||
106 | } | ||
107 | ListElement { | ||
108 | sender: "bob@bandana.org" | ||
109 | senderName: "Bob Ross" | ||
110 | subject: "KDE Rocks" | ||
111 | date: "Sep 14" | ||
112 | } | ||
113 | ListElement { | ||
114 | sender: "tiny@mail.com" | ||
115 | senderName: "Tiny" | ||
116 | subject: "Huge success!!" | ||
117 | date: "Sep 14" | ||
118 | } | ||
119 | ListElement { | ||
120 | sender: "bob@bandana.org" | ||
121 | senderName: "Bob Ross" | ||
122 | subject: "KDE Rocks" | ||
123 | date: "Sep 5" | ||
124 | } | ||
125 | ListElement { | ||
126 | sender: "Laura@mail.com" | ||
127 | senderName: "Laura B" | ||
128 | subject: ":)" | ||
129 | date: "Sep 4" | ||
130 | } | ||
131 | ListElement { | ||
132 | sender: "Andreas@stars.org" | ||
133 | senderName: "Andreas Rockstar" | ||
134 | subject: "KDE Rocks" | ||
135 | date: "May 25" | ||
136 | } | ||
137 | ListElement { | ||
138 | sender: "alice@mail.com" | ||
139 | senderName: "Alice Cheng" | ||
140 | subject: "Re: We need more food" | ||
141 | date: "May 3" | ||
142 | } | ||
143 | ListElement { | ||
144 | sender: "bob@bandana.org" | ||
145 | senderName: "Bob Ross" | ||
146 | subject: "Board Task: Write draft email to people with KDE accounts commiting to Qt repositories" | ||
147 | date: "Dec 2014" | ||
148 | } | ||
149 | } \ No newline at end of file | ||
diff --git a/applications/kmail-quick/package/contents/ui/MailListView.qml b/applications/kmail-quick/package/contents/ui/MailListView.qml deleted file mode 100644 index f6ded917..00000000 --- a/applications/kmail-quick/package/contents/ui/MailListView.qml +++ /dev/null | |||
@@ -1,131 +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 | import org.kde.plasma.components 2.0 as PlasmaComponents | ||
23 | |||
24 | ScrollView { | ||
25 | id: root | ||
26 | ListView { | ||
27 | id: listView | ||
28 | |||
29 | model: mailList.model //MailListModel {} | ||
30 | |||
31 | delegate: PlasmaComponents.ListItem { | ||
32 | |||
33 | width: listView.width | ||
34 | height: unit.size * 12 | ||
35 | |||
36 | enabled: true | ||
37 | checked: listView.currentIndex == index | ||
38 | |||
39 | MouseArea { | ||
40 | anchors.fill: parent | ||
41 | |||
42 | onClicked: { | ||
43 | listView.currentIndex = model.index | ||
44 | singleMail.loadMail(model.id) | ||
45 | } | ||
46 | } | ||
47 | |||
48 | Rectangle { | ||
49 | id: unread | ||
50 | |||
51 | anchors.fill: parent | ||
52 | |||
53 | color: colorPalette.read | ||
54 | opacity: 0.1 | ||
55 | |||
56 | visible: model.unread == false | ||
57 | } | ||
58 | |||
59 | Avatar { | ||
60 | id: avatar | ||
61 | |||
62 | anchors { | ||
63 | verticalCenter: parent.verticalCenter | ||
64 | left: parent.left | ||
65 | leftMargin: unit.size * 2 | ||
66 | } | ||
67 | |||
68 | height: unit.size * 9 | ||
69 | width: height | ||
70 | |||
71 | name: model.senderName | ||
72 | } | ||
73 | |||
74 | Label { | ||
75 | id: senderName | ||
76 | |||
77 | anchors { | ||
78 | top: avatar.top | ||
79 | left: avatar.right | ||
80 | leftMargin: unit.size * 3 | ||
81 | } | ||
82 | |||
83 | text: model.senderName | ||
84 | |||
85 | font.weight: Font.DemiBold | ||
86 | } | ||
87 | |||
88 | Label { | ||
89 | id: sender | ||
90 | |||
91 | anchors { | ||
92 | top: avatar.top | ||
93 | left: senderName.right | ||
94 | leftMargin: unit.size | ||
95 | right: date.left | ||
96 | rightMargin: unit.size | ||
97 | } | ||
98 | |||
99 | text: "(" + model.sender +")" | ||
100 | |||
101 | clip: true | ||
102 | } | ||
103 | |||
104 | Label { | ||
105 | id: date | ||
106 | |||
107 | anchors { | ||
108 | top: avatar.top | ||
109 | right: parent.right | ||
110 | rightMargin: unit.size * 2 | ||
111 | } | ||
112 | |||
113 | text: model.date | ||
114 | |||
115 | font.weight: Font.Light | ||
116 | } | ||
117 | |||
118 | Label { | ||
119 | id: subject | ||
120 | |||
121 | anchors { | ||
122 | bottom: avatar.bottom | ||
123 | left: avatar.right | ||
124 | leftMargin: unit.size * 3 | ||
125 | } | ||
126 | |||
127 | text: model.subject | ||
128 | } | ||
129 | } | ||
130 | } | ||
131 | } \ No newline at end of file | ||
diff --git a/applications/kmail-quick/package/contents/ui/SingleMailView.qml b/applications/kmail-quick/package/contents/ui/SingleMailView.qml deleted file mode 100644 index e307ccfd..00000000 --- a/applications/kmail-quick/package/contents/ui/SingleMailView.qml +++ /dev/null | |||
@@ -1,64 +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 | Rectangle { | ||
26 | id: background | ||
27 | |||
28 | anchors.fill: parent | ||
29 | |||
30 | color: colorPalette.background | ||
31 | } | ||
32 | |||
33 | Repeater { | ||
34 | anchors.fill: parent | ||
35 | |||
36 | model: singleMail.model | ||
37 | |||
38 | delegate: Item { | ||
39 | height: root.height | ||
40 | width: root.widht | ||
41 | |||
42 | ColumnLayout { | ||
43 | |||
44 | Label { | ||
45 | text: model.id | ||
46 | } | ||
47 | Label { | ||
48 | text: model.sender | ||
49 | } | ||
50 | Label { | ||
51 | text: model.senderName | ||
52 | } | ||
53 | |||
54 | Label { | ||
55 | text: model.subject | ||
56 | } | ||
57 | |||
58 | Label { | ||
59 | text: model.mimeMessage | ||
60 | } | ||
61 | } | ||
62 | } | ||
63 | } | ||
64 | } \ No newline at end of file | ||
diff --git a/applications/kmail-quick/package/contents/ui/example.qml b/applications/kmail-quick/package/contents/ui/example.qml deleted file mode 100644 index a968bc72..00000000 --- a/applications/kmail-quick/package/contents/ui/example.qml +++ /dev/null | |||
@@ -1,64 +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 | import org.kde.akonadi2.mail 1.0 | ||
23 | |||
24 | Item { | ||
25 | id: root | ||
26 | |||
27 | MailList { | ||
28 | id: mailList | ||
29 | |||
30 | query: "Some Query" | ||
31 | |||
32 | } | ||
33 | |||
34 | Button { | ||
35 | id: button | ||
36 | |||
37 | anchors { | ||
38 | top: parent.top | ||
39 | right: parent.right | ||
40 | left: parent.left | ||
41 | } | ||
42 | |||
43 | text: "add mail" | ||
44 | |||
45 | onClicked: mailList.addMail("test test test"); | ||
46 | } | ||
47 | |||
48 | ListView { | ||
49 | |||
50 | anchors { | ||
51 | top: button.bottom | ||
52 | left: parent.left | ||
53 | right: parent.right | ||
54 | bottom: parent.bottom | ||
55 | } | ||
56 | |||
57 | model: mailList.model | ||
58 | |||
59 | delegate: Label { | ||
60 | |||
61 | text: model.subject | ||
62 | } | ||
63 | } | ||
64 | } \ No newline at end of file | ||
diff --git a/applications/kmail-quick/package/contents/ui/main.qml b/applications/kmail-quick/package/contents/ui/main.qml deleted file mode 100644 index 88d2edde..00000000 --- a/applications/kmail-quick/package/contents/ui/main.qml +++ /dev/null | |||
@@ -1,138 +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 | import org.kde.plasma.components 2.0 as PlasmaComponents | ||
22 | |||
23 | import org.kde.akonadi2.mail 1.0 as Mail | ||
24 | |||
25 | ApplicationWindow { | ||
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 | |||
diff --git a/applications/kmail-quick/package/metadata.desktop b/applications/kmail-quick/package/metadata.desktop deleted file mode 100644 index d02fa46a..00000000 --- a/applications/kmail-quick/package/metadata.desktop +++ /dev/null | |||
@@ -1,8 +0,0 @@ | |||
1 | [Desktop Entry] | ||
2 | Name=KMail Quick | ||
3 | X-KDE-PluginInfo-Name=org.kde.pim.kmail-quick | ||
4 | Exec=kpackagelauncherqml -a org.kde.pim.kmail-quick | ||
5 | X-Plasma-MainScript=ui/main.qml | ||
6 | X-KDE-ServiceTypes=KPackage/GenericQML | ||
7 | Icon=kmail2 | ||
8 | Type=Service \ No newline at end of file | ||