summaryrefslogtreecommitdiffstats
path: root/applications/kube-mail/package/contents/ui/FolderListView.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/FolderListView.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/FolderListView.qml')
-rw-r--r--applications/kube-mail/package/contents/ui/FolderListView.qml9
1 files changed, 5 insertions, 4 deletions
diff --git a/applications/kube-mail/package/contents/ui/FolderListView.qml b/applications/kube-mail/package/contents/ui/FolderListView.qml
index f0ce7da2..1639fe70 100644
--- a/applications/kube-mail/package/contents/ui/FolderListView.qml
+++ b/applications/kube-mail/package/contents/ui/FolderListView.qml
@@ -22,10 +22,11 @@ import QtQuick.Layouts 1.1
22import org.kde.plasma.core 2.0 as PlasmaCore 22import org.kde.plasma.core 2.0 as PlasmaCore
23import org.kde.plasma.components 2.0 as PlasmaComponents 23import org.kde.plasma.components 2.0 as PlasmaComponents
24 24
25import org.kde.akonadi2.mail 1.0 as Mail 25import org.kde.kube.mail 1.0 as Mail
26 26
27Item { 27Item {
28 id: root 28 id: root
29 property variant currentFolder
29 30
30 Item { 31 Item {
31 id: searchBox 32 id: searchBox
@@ -58,7 +59,7 @@ Item {
58 59
59 clip: true 60 clip: true
60 61
61 model: folderList.model //FolderModel {} 62 model: Mail.FolderListModel {}
62 63
63 delegate: PlasmaComponents.ListItem { 64 delegate: PlasmaComponents.ListItem {
64 65
@@ -69,8 +70,8 @@ Item {
69 checked: listView.currentIndex == index 70 checked: listView.currentIndex == index
70 71
71 onClicked: { 72 onClicked: {
72 mailList.loadMailFolder(model.id)
73 listView.currentIndex = model.index 73 listView.currentIndex = model.index
74 root.currentFolder = model.domainObject
74 } 75 }
75 76
76 PlasmaCore.IconItem { 77 PlasmaCore.IconItem {
@@ -99,4 +100,4 @@ Item {
99 } 100 }
100 } 101 }
101 } 102 }
102} \ No newline at end of file 103}