diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2017-06-12 22:11:52 +0200 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2017-06-12 22:11:52 +0200 |
commit | 0ef55c3bf02f8730ab821c3409c71e67bd382ecc (patch) | |
tree | bbe8478e476bccd7f2dd9f99b1796848510f40d5 /components | |
parent | c8372a71b128eeb4f0440736e36c372d61b5a9a2 (diff) | |
download | kube-0ef55c3bf02f8730ab821c3409c71e67bd382ecc.tar.gz kube-0ef55c3bf02f8730ab821c3409c71e67bd382ecc.zip |
Working but ugly editor for recipients in composer
What remains to be done is:
* proper delegates
* removal of recipeients
* at some point d&d of recipients
* Perhaps something that encapsulates the whole list and the model in a
nicer way
Diffstat (limited to 'components')
-rw-r--r-- | components/kube/contents/ui/ComposerView.qml | 92 |
1 files changed, 48 insertions, 44 deletions
diff --git a/components/kube/contents/ui/ComposerView.qml b/components/kube/contents/ui/ComposerView.qml index 576a1590..49a59024 100644 --- a/components/kube/contents/ui/ComposerView.qml +++ b/components/kube/contents/ui/ComposerView.qml | |||
@@ -287,55 +287,59 @@ Kube.View { | |||
287 | height: parent.height | 287 | height: parent.height |
288 | 288 | ||
289 | ColumnLayout { | 289 | ColumnLayout { |
290 | anchors { | 290 | anchors { |
291 | top: parent.top | 291 | top: parent.top |
292 | bottom: bottomButtons.top | 292 | bottom: bottomButtons.top |
293 | left: parent.left | 293 | left: parent.left |
294 | right: parent.right | 294 | right: parent.right |
295 | margins: Kube.Units.largeSpacing | 295 | margins: Kube.Units.largeSpacing |
296 | } | 296 | } |
297 | 297 | ||
298 | Kube.Label { | 298 | Kube.Label { |
299 | text: "Sending Email to:" | 299 | text: "Sending Email to:" |
300 | } | 300 | } |
301 | Kube.AutocompleteLineEdit { | ||
302 | id: to | ||
303 | Layout.fillWidth: true | ||
304 | text: composerController.to | ||
305 | onTextChanged: composerController.to = text | ||
306 | model: composerController.recipientCompleter.model | ||
307 | onSearchTermChanged: composerController.recipientCompleter.searchString = searchTerm | ||
308 | } | ||
309 | 301 | ||
310 | Kube.Label { | 302 | AddresseeListEditor { |
311 | text: "Sending Copy to (CC):" | 303 | id: to |
312 | } | 304 | Layout.preferredHeight: to.implicitHeight |
313 | Kube.AutocompleteLineEdit { | 305 | Layout.fillWidth: true |
314 | id: cc | 306 | completer: composerController.recipientCompleter |
315 | Layout.fillWidth: true | 307 | model: composerController.toModel |
316 | text: composerController.cc | 308 | onAdded: composerController.addTo(text) |
317 | onTextChanged: composerController.cc = text | 309 | onRemoved: composerController.removeTo(text) |
318 | model: composerController.recipientCompleter.model | 310 | } |
319 | onSearchTermChanged: composerController.recipientCompleter.searchString = searchTerm | ||
320 | } | ||
321 | 311 | ||
322 | Kube.Label { | 312 | Kube.Label { |
323 | text: "Sending Secret Copy to (Bcc):" | 313 | text: "Sending Copy to (CC):" |
324 | } | 314 | } |
325 | Kube.AutocompleteLineEdit { | 315 | AddresseeListEditor { |
326 | id: bcc | 316 | id: cc |
327 | Layout.fillWidth: true | 317 | Layout.preferredHeight: cc.implicitHeight |
328 | text: composerController.bcc | 318 | Layout.fillWidth: true |
329 | onTextChanged: composerController.bcc = text; | 319 | completer: composerController.recipientCompleter |
330 | model: composerController.recipientCompleter.model | 320 | model: composerController.ccModel |
331 | onSearchTermChanged: composerController.recipientCompleter.searchString = searchTerm | 321 | onAdded: composerController.addCc(text) |
332 | } | 322 | onRemoved: composerController.removeCc(text) |
323 | } | ||
333 | 324 | ||
334 | Item { | 325 | Kube.Label { |
335 | width: parent.width | 326 | text: "Sending Secret Copy to (Bcc):" |
336 | Layout.fillHeight: true | 327 | } |
328 | AddresseeListEditor { | ||
329 | id: bcc | ||
330 | Layout.preferredHeight: bcc.implicitHeight | ||
331 | Layout.fillWidth: true | ||
332 | completer: composerController.recipientCompleter | ||
333 | model: composerController.bccModel | ||
334 | onAdded: composerController.addBcc(text) | ||
335 | onRemoved: composerController.removeBcc(text) | ||
336 | } | ||
337 | |||
338 | Item { | ||
339 | width: parent.width | ||
340 | Layout.fillHeight: true | ||
341 | } | ||
337 | } | 342 | } |
338 | } | ||
339 | 343 | ||
340 | 344 | ||
341 | Item { | 345 | Item { |