summaryrefslogtreecommitdiffstats
path: root/applications/kube-mail/package/contents/ui/MailListView.qml
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2016-01-03 20:31:10 +0100
committerChristian Mollekopf <chrigi_1@fastmail.fm>2016-01-03 20:31:10 +0100
commitdd09ca9ef4bb9780b953d6dd2999dbefe50bd1ff (patch)
treedfcef3671c7f36d762f74b4226477fe6978688f2 /applications/kube-mail/package/contents/ui/MailListView.qml
parentdea41f0345188d776522e5b91ba25d25c418e581 (diff)
downloadkube-dd09ca9ef4bb9780b953d6dd2999dbefe50bd1ff.tar.gz
kube-dd09ca9ef4bb9780b953d6dd2999dbefe50bd1ff.zip
Instead of using controllers, directly use the models
...and connect components via properties
Diffstat (limited to 'applications/kube-mail/package/contents/ui/MailListView.qml')
-rw-r--r--applications/kube-mail/package/contents/ui/MailListView.qml13
1 files changed, 10 insertions, 3 deletions
diff --git a/applications/kube-mail/package/contents/ui/MailListView.qml b/applications/kube-mail/package/contents/ui/MailListView.qml
index f6ded917..5fb4678c 100644
--- a/applications/kube-mail/package/contents/ui/MailListView.qml
+++ b/applications/kube-mail/package/contents/ui/MailListView.qml
@@ -21,12 +21,19 @@ import QtQuick.Layouts 1.1
21 21
22import org.kde.plasma.components 2.0 as PlasmaComponents 22import org.kde.plasma.components 2.0 as PlasmaComponents
23 23
24import org.kde.kube.mail 1.0 as Mail
25
24ScrollView { 26ScrollView {
25 id: root 27 id: root
28 property variant parentFolder
29 property variant currentMail
30
26 ListView { 31 ListView {
27 id: listView 32 id: listView
28 33
29 model: mailList.model //MailListModel {} 34 model: Mail.MailListModel {
35 parentFolder: root.parentFolder
36 }
30 37
31 delegate: PlasmaComponents.ListItem { 38 delegate: PlasmaComponents.ListItem {
32 39
@@ -41,7 +48,7 @@ ScrollView {
41 48
42 onClicked: { 49 onClicked: {
43 listView.currentIndex = model.index 50 listView.currentIndex = model.index
44 singleMail.loadMail(model.id) 51 root.currentMail = model.domainObject
45 } 52 }
46 } 53 }
47 54
@@ -128,4 +135,4 @@ ScrollView {
128 } 135 }
129 } 136 }
130 } 137 }
131} \ No newline at end of file 138}