summaryrefslogtreecommitdiffstats
path: root/applications/kube-mail/package
diff options
context:
space:
mode:
Diffstat (limited to 'applications/kube-mail/package')
-rw-r--r--applications/kube-mail/package/contents/ui/Composer.qml87
-rw-r--r--applications/kube-mail/package/contents/ui/main.qml50
2 files changed, 108 insertions, 29 deletions
diff --git a/applications/kube-mail/package/contents/ui/Composer.qml b/applications/kube-mail/package/contents/ui/Composer.qml
new file mode 100644
index 00000000..d32ee7c6
--- /dev/null
+++ b/applications/kube-mail/package/contents/ui/Composer.qml
@@ -0,0 +1,87 @@
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//import org.kde.kube.mail 1.0 as Mail
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, see <http://www.gnu.org/licenses/>.
17 */
18
19import QtQuick 2.4
20import QtQuick.Controls 1.3
21import QtQuick.Layouts 1.1
22
23Item {
24 id: root
25
26 ColumnLayout {
27
28 anchors.fill: parent
29
30 GridLayout {
31
32 columns: 2
33
34 Label {
35 text: "To"
36 }
37
38 TextField {
39 id: to
40
41 Layout.fillWidth: true
42 }
43
44 Label {
45 text: "Cc"
46 }
47
48 TextField {
49 id: cc
50
51 Layout.fillWidth: true
52 }
53
54 Label {
55 text: "Bcc"
56 }
57
58 TextField {
59 id: bcc
60
61 Layout.fillWidth: true
62 }
63 }
64
65 TextField {
66 id: subject
67
68 Layout.fillWidth: true
69
70 placeholderText: "Subject"
71 }
72
73 TextArea {
74 id: content
75
76 Layout.fillWidth: true
77 Layout.fillHeight: true
78
79 }
80
81 RowLayout {
82 Button {
83 text: "Send"
84 }
85 }
86 }
87}
diff --git a/applications/kube-mail/package/contents/ui/main.qml b/applications/kube-mail/package/contents/ui/main.qml
index 33744157..ef37ae19 100644
--- a/applications/kube-mail/package/contents/ui/main.qml
+++ b/applications/kube-mail/package/contents/ui/main.qml
@@ -32,16 +32,16 @@ ApplicationWindow {
32 32
33 visible: true 33 visible: true
34 34
35 Action.ActionHandler { 35 // Action.ActionHandler {
36 actionId: "org.kde.kube.actions.mark-as-read" 36 // actionId: "org.kde.kube.actions.mark-as-read"
37 function isReady(context) { 37 // function isReady(context) {
38 return context.mail ? true : false; 38 // return context.mail ? true : false;
39 } 39 // }
40 40 //
41 function handler(context) { 41 // function handler(context) {
42 console.warn("Got message:", context.mail) 42 // console.warn("Got message:", context.mail)
43 } 43 // }
44 } 44 // }
45 45
46 Action.Context { 46 Action.Context {
47 id: "maillistcontext" 47 id: "maillistcontext"
@@ -55,6 +55,12 @@ ApplicationWindow {
55 context: maillistcontext 55 context: maillistcontext
56 } 56 }
57 57
58 Action.Action {
59 id: "deleteAction"
60 actionId: "org.kde.kube.actions.delete"
61 context: maillistcontext
62 }
63
58 //UI 64 //UI
59 toolBar: ToolBar { 65 toolBar: ToolBar {
60 66
@@ -62,48 +68,38 @@ ApplicationWindow {
62 anchors.fill: parent 68 anchors.fill: parent
63 69
64 PlasmaComponents.ToolButton { 70 PlasmaComponents.ToolButton {
65
66 height: parent.height 71 height: parent.height
67
68 iconName: "mail-message-new" 72 iconName: "mail-message-new"
69
70 text: "Compose" 73 text: "Compose"
74 enabled: false
71 } 75 }
72 76
73 PlasmaComponents.ToolButton { 77 PlasmaComponents.ToolButton {
74
75 height: parent.height 78 height: parent.height
76
77 iconName: "mail-mark-unread" 79 iconName: "mail-mark-unread"
78 text: "Mark Unread" 80 text: "Mark As Read"
79 enabled: markAsReadAction.ready 81 enabled: markAsReadAction.ready
80
81 onClicked: { 82 onClicked: {
82 markAsReadAction.execute() 83 markAsReadAction.execute()
83 } 84 }
84 } 85 }
85 86
86 PlasmaComponents.ToolButton { 87 PlasmaComponents.ToolButton {
87
88 height: parent.height 88 height: parent.height
89
90 iconName: "mail-mark-important" 89 iconName: "mail-mark-important"
91 text: "Mark Important" 90 text: "Mark Important"
92 91 enabled: false
93 onClicked: { 92 onClicked: {
94 mailList.markMailImportant(true)
95 } 93 }
96 } 94 }
97 95
98 PlasmaComponents.ToolButton { 96 PlasmaComponents.ToolButton {
99
100 height: parent.height 97 height: parent.height
101
102 iconName: "edit-delete" 98 iconName: "edit-delete"
103 text: "Delete Mail" 99 text: "Delete Mail"
104 100 enabled: deleteAction.ready
105 onClicked: { 101 onClicked: {
106 mailList.deleteMail() 102 deleteAction.execute()
107 } 103 }
108 } 104 }
109 } 105 }
@@ -114,7 +110,6 @@ ApplicationWindow {
114 110
115 FolderListView { 111 FolderListView {
116 id: folderListView 112 id: folderListView
117
118 width: unit.size * 55 113 width: unit.size * 55
119 Layout.maximumWidth: unit.size * 150 114 Layout.maximumWidth: unit.size * 150
120 Layout.minimumWidth: unit.size * 30 115 Layout.minimumWidth: unit.size * 30
@@ -123,7 +118,6 @@ ApplicationWindow {
123 MailListView { 118 MailListView {
124 id: mailListView 119 id: mailListView
125 parentFolder: folderListView.currentFolder 120 parentFolder: folderListView.currentFolder
126
127 width: unit.size * 80 121 width: unit.size * 80
128 Layout.maximumWidth: unit.size * 250 122 Layout.maximumWidth: unit.size * 250
129 Layout.minimumWidth: unit.size * 50 123 Layout.minimumWidth: unit.size * 50
@@ -132,7 +126,6 @@ ApplicationWindow {
132 SingleMailView { 126 SingleMailView {
133 id: mailView 127 id: mailView
134 mail: mailListView.currentMail 128 mail: mailListView.currentMail
135
136 Layout.fillWidth: true 129 Layout.fillWidth: true
137 } 130 }
138 131
@@ -141,7 +134,6 @@ ApplicationWindow {
141 //TODO find a better way to scale UI 134 //TODO find a better way to scale UI
142 Item { 135 Item {
143 id: unit 136 id: unit
144
145 property int size: 5 137 property int size: 5
146 } 138 }
147 139