diff options
Diffstat (limited to 'applications/kube-mail/package/contents/ui/Composer.qml')
-rw-r--r-- | applications/kube-mail/package/contents/ui/Composer.qml | 221 |
1 files changed, 0 insertions, 221 deletions
diff --git a/applications/kube-mail/package/contents/ui/Composer.qml b/applications/kube-mail/package/contents/ui/Composer.qml deleted file mode 100644 index 1a6a4cc4..00000000 --- a/applications/kube-mail/package/contents/ui/Composer.qml +++ /dev/null | |||
@@ -1,221 +0,0 @@ | |||
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 | ||
20 | import QtQuick.Layouts 1.1 | ||
21 | import org.kde.plasma.components 2.0 as PlasmaComponents | ||
22 | |||
23 | import org.kde.kube.mail 1.0 as Mail | ||
24 | |||
25 | |||
26 | Item { | ||
27 | id: root | ||
28 | property variant originalMessage | ||
29 | |||
30 | function send() { | ||
31 | composer.send() | ||
32 | } | ||
33 | |||
34 | function saveAsDraft() { | ||
35 | composer.saveAsDraft() | ||
36 | } | ||
37 | |||
38 | function clear() { | ||
39 | composer.clear(); | ||
40 | } | ||
41 | |||
42 | Mail.Retriever { | ||
43 | id: retriever | ||
44 | propertyName: "mimeMessage" | ||
45 | model: Mail.MailListModel { | ||
46 | id: mailListModel | ||
47 | mail: root.originalMessage | ||
48 | } | ||
49 | } | ||
50 | |||
51 | Mail.Composer { | ||
52 | id: composer | ||
53 | originalMessage: retriever.value | ||
54 | } | ||
55 | |||
56 | ColumnLayout { | ||
57 | |||
58 | anchors.fill: parent | ||
59 | |||
60 | GridLayout { | ||
61 | |||
62 | columns: 2 | ||
63 | |||
64 | Label { | ||
65 | text: "From" | ||
66 | } | ||
67 | |||
68 | ComboBox { | ||
69 | model: composer.identityModel | ||
70 | |||
71 | Layout.fillWidth: true | ||
72 | |||
73 | currentIndex: composer.fromIndex | ||
74 | |||
75 | onCurrentIndexChanged: { | ||
76 | composer.fromIndex = currentIndex | ||
77 | } | ||
78 | } | ||
79 | |||
80 | Label { | ||
81 | text: "To" | ||
82 | } | ||
83 | |||
84 | RowLayout { | ||
85 | Layout.fillWidth: true | ||
86 | |||
87 | TextField { | ||
88 | id: to | ||
89 | |||
90 | Layout.fillWidth: true | ||
91 | |||
92 | text: composer.to | ||
93 | |||
94 | onTextChanged: { | ||
95 | composer.to = text; | ||
96 | } | ||
97 | } | ||
98 | |||
99 | PlasmaComponents.Button { | ||
100 | id: ccButton | ||
101 | |||
102 | text: "Cc" | ||
103 | |||
104 | onClicked: { | ||
105 | cc.visible = true | ||
106 | ccButton.visible = false | ||
107 | } | ||
108 | } | ||
109 | |||
110 | PlasmaComponents.Button { | ||
111 | id: bccButton | ||
112 | |||
113 | text: "Bcc" | ||
114 | |||
115 | onClicked: { | ||
116 | bcc.visible = true | ||
117 | bccButton.visible = false | ||
118 | } | ||
119 | } | ||
120 | } | ||
121 | |||
122 | Label { | ||
123 | text: "Cc" | ||
124 | |||
125 | visible: cc.visible | ||
126 | } | ||
127 | |||
128 | TextField { | ||
129 | id: cc | ||
130 | |||
131 | Layout.fillWidth: true | ||
132 | |||
133 | visible: false | ||
134 | |||
135 | text: composer.cc | ||
136 | |||
137 | onTextChanged: { | ||
138 | composer.cc = text; | ||
139 | } | ||
140 | } | ||
141 | |||
142 | Label { | ||
143 | text: "Bcc" | ||
144 | |||
145 | visible: bcc.visible | ||
146 | } | ||
147 | |||
148 | TextField { | ||
149 | id: bcc | ||
150 | |||
151 | Layout.fillWidth: true | ||
152 | |||
153 | visible : false | ||
154 | |||
155 | text: composer.bcc | ||
156 | |||
157 | onTextChanged: { | ||
158 | composer.bcc = text; | ||
159 | } | ||
160 | } | ||
161 | } | ||
162 | |||
163 | TextField { | ||
164 | id: subject | ||
165 | |||
166 | Layout.fillWidth: true | ||
167 | |||
168 | placeholderText: "Enter Subject" | ||
169 | |||
170 | text: composer.subject | ||
171 | |||
172 | onTextChanged: { | ||
173 | composer.subject = text; | ||
174 | } | ||
175 | } | ||
176 | |||
177 | Item { | ||
178 | |||
179 | Layout.fillWidth: true | ||
180 | |||
181 | height: subject.height * 1.5 | ||
182 | |||
183 | PlasmaComponents.Button { | ||
184 | |||
185 | anchors { | ||
186 | bottom: parent.bottom | ||
187 | } | ||
188 | |||
189 | text: "Save as Draft" | ||
190 | |||
191 | onClicked: { | ||
192 | composer.saveAsDraft() | ||
193 | } | ||
194 | } | ||
195 | |||
196 | PlasmaComponents.Button { | ||
197 | |||
198 | anchors { | ||
199 | bottom: parent.bottom | ||
200 | right: parent.right | ||
201 | } | ||
202 | |||
203 | text: "Attach" | ||
204 | } | ||
205 | } | ||
206 | |||
207 | TextArea { | ||
208 | id: content | ||
209 | |||
210 | text: composer.body | ||
211 | |||
212 | onTextChanged: { | ||
213 | composer.body = text; | ||
214 | } | ||
215 | |||
216 | Layout.fillWidth: true | ||
217 | Layout.fillHeight: true | ||
218 | |||
219 | } | ||
220 | } | ||
221 | } | ||