diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2017-07-21 23:44:55 +0200 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2017-07-21 23:45:14 +0200 |
commit | 9c54548b2bca96a2fda4da3d15429756774abb26 (patch) | |
tree | 510833be568099c49c6012a11c7bf0d8c1b64bd4 /framework/qml/FocusComposer.qml | |
parent | 32ce4c2d5e58c77d3a0a8f82e6145e7c64e8bfa4 (diff) | |
download | kube-9c54548b2bca96a2fda4da3d15429756774abb26.tar.gz kube-9c54548b2bca96a2fda4da3d15429756774abb26.zip |
Housekeeping: Avatar.qml and FocusComposer.qml are no longer used
Diffstat (limited to 'framework/qml/FocusComposer.qml')
-rw-r--r-- | framework/qml/FocusComposer.qml | 252 |
1 files changed, 0 insertions, 252 deletions
diff --git a/framework/qml/FocusComposer.qml b/framework/qml/FocusComposer.qml deleted file mode 100644 index d328b1dd..00000000 --- a/framework/qml/FocusComposer.qml +++ /dev/null | |||
@@ -1,252 +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 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 as Controls2 | ||
22 | |||
23 | import org.kube.framework 1.0 as Kube | ||
24 | |||
25 | |||
26 | Item { | ||
27 | id: root | ||
28 | |||
29 | signal done | ||
30 | property bool loadAsDraft: false | ||
31 | property variant message: {} | ||
32 | |||
33 | //actions | ||
34 | property variant sendAction: composerController.sendAction | ||
35 | property variant saveAsDraftAction: composerController.saveAsDraftAction | ||
36 | |||
37 | //Controller | ||
38 | Kube.ComposerController { | ||
39 | id: composerController | ||
40 | onDone: root.done() | ||
41 | } | ||
42 | |||
43 | |||
44 | Component.onCompleted: { | ||
45 | if (root.message) { | ||
46 | composerController.loadMessage(root.message, root.loadAsDraft) | ||
47 | } | ||
48 | } | ||
49 | |||
50 | Item { | ||
51 | |||
52 | anchors.centerIn: parent | ||
53 | |||
54 | width: parent.width - Kube.Units.largeSpacing * 2 | ||
55 | height: parent.height - Kube.Units.largeSpacing * 2 | ||
56 | |||
57 | ColumnLayout { | ||
58 | |||
59 | anchors { | ||
60 | fill: parent | ||
61 | } | ||
62 | |||
63 | ColumnLayout { | ||
64 | |||
65 | anchors.fill: parent | ||
66 | |||
67 | GridLayout { | ||
68 | |||
69 | columns: 2 | ||
70 | |||
71 | Kube.Label { | ||
72 | Layout.alignment: Qt.AlignVCenter | Qt.AlignRight | ||
73 | text: text: qsTr("To") | ||
74 | } | ||
75 | |||
76 | AutocompleteLineEdit { | ||
77 | id: to | ||
78 | |||
79 | Layout.fillWidth: true | ||
80 | |||
81 | text: composerController.to | ||
82 | onTextChanged: { | ||
83 | composerController.to = text; | ||
84 | } | ||
85 | |||
86 | model: composerController.recipientCompleter.model | ||
87 | onSearchTermChanged: { | ||
88 | composerController.recipientCompleter.searchString = searchTerm | ||
89 | } | ||
90 | } | ||
91 | |||
92 | |||
93 | Kube.Label { | ||
94 | Layout.alignment: Qt.AlignVCenter | Qt.AlignRight | ||
95 | text: qsTr("Cc") | ||
96 | visible: cc.visible | ||
97 | } | ||
98 | |||
99 | AutocompleteLineEdit { | ||
100 | id: cc | ||
101 | |||
102 | Layout.fillWidth: true | ||
103 | |||
104 | visible: false | ||
105 | |||
106 | text: composerController.cc | ||
107 | |||
108 | onTextChanged: { | ||
109 | composerController.cc = text; | ||
110 | } | ||
111 | |||
112 | model: composerController.recipientCompleter.model | ||
113 | onSearchTermChanged: { | ||
114 | composerController.recipientCompleter.searchString = searchTerm | ||
115 | } | ||
116 | } | ||
117 | |||
118 | Kube.Label { | ||
119 | Layout.alignment: Qt.AlignVCenter | Qt.AlignRight | ||
120 | text: qsTr("Bcc") | ||
121 | visible: bcc.visible | ||
122 | } | ||
123 | |||
124 | AutocompleteLineEdit { | ||
125 | id: bcc | ||
126 | |||
127 | Layout.fillWidth: true | ||
128 | |||
129 | visible : false | ||
130 | |||
131 | text: composerController.bcc | ||
132 | |||
133 | onTextChanged: { | ||
134 | composerController.bcc = text; | ||
135 | } | ||
136 | |||
137 | model: composerController.recipientCompleter.model | ||
138 | onSearchTermChanged: { | ||
139 | composerController.recipientCompleter.searchString = searchTerm | ||
140 | } | ||
141 | } | ||
142 | |||
143 | Kube.Label { | ||
144 | text: qsTr("From") | ||
145 | } | ||
146 | |||
147 | RowLayout { | ||
148 | |||
149 | Kube.ComboBox { | ||
150 | id: identityCombo | ||
151 | model: composerController.identitySelector.model | ||
152 | textRole: "displayName" | ||
153 | |||
154 | Layout.fillWidth: true | ||
155 | |||
156 | onCurrentIndexChanged: { | ||
157 | composerController.identitySelector.currentIndex = currentIndex | ||
158 | } | ||
159 | } | ||
160 | |||
161 | Kube.Button { | ||
162 | id: ccButton | ||
163 | |||
164 | text: qsTr("Cc") | ||
165 | onClicked: { | ||
166 | cc.visible = true | ||
167 | ccButton.visible = false | ||
168 | } | ||
169 | } | ||
170 | |||
171 | Kube.Button { | ||
172 | id: bccButton | ||
173 | |||
174 | text: qsTr("Bcc") | ||
175 | |||
176 | onClicked: { | ||
177 | bcc.visible = true | ||
178 | bccButton.visible = false | ||
179 | } | ||
180 | } | ||
181 | } | ||
182 | } | ||
183 | |||
184 | Kube.TextField { | ||
185 | id: subject | ||
186 | |||
187 | Layout.fillWidth: true | ||
188 | |||
189 | placeholderText: "Enter Subject..." | ||
190 | |||
191 | text: composerController.subject | ||
192 | |||
193 | onTextChanged: { | ||
194 | composerController.subject = text; | ||
195 | } | ||
196 | } | ||
197 | |||
198 | Controls2.TextArea { | ||
199 | id: content | ||
200 | |||
201 | text: composerController.body | ||
202 | |||
203 | onTextChanged: { | ||
204 | composerController.body = text; | ||
205 | } | ||
206 | |||
207 | Layout.fillWidth: true | ||
208 | Layout.fillHeight: true | ||
209 | } | ||
210 | |||
211 | RowLayout { | ||
212 | id: bottomBar | ||
213 | |||
214 | width: parent.width | ||
215 | |||
216 | Kube.Button { | ||
217 | text: qsTr("Discard") | ||
218 | |||
219 | onClicked: { | ||
220 | root.done() | ||
221 | } | ||
222 | } | ||
223 | |||
224 | Item { | ||
225 | Layout.fillWidth: true | ||
226 | } | ||
227 | |||
228 | |||
229 | Kube.Button { | ||
230 | id: saveDraftButton | ||
231 | |||
232 | text: qsTr("Save as Draft") | ||
233 | //TODO enabled: saveAsDraftAction.enabled | ||
234 | onClicked: { | ||
235 | saveAsDraftAction.execute() | ||
236 | } | ||
237 | } | ||
238 | |||
239 | Kube.PositiveButton { | ||
240 | width: saveDraftButton.width | ||
241 | |||
242 | text: qsTr("Send") | ||
243 | enabled: sendAction.enabled | ||
244 | onClicked: { | ||
245 | sendAction.execute() | ||
246 | } | ||
247 | } | ||
248 | } | ||
249 | } | ||
250 | } | ||
251 | } | ||
252 | } | ||