diff options
Diffstat (limited to 'applications')
4 files changed, 24 insertions, 24 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 | |||
22 | import org.kde.plasma.core 2.0 as PlasmaCore | 22 | import org.kde.plasma.core 2.0 as PlasmaCore |
23 | import org.kde.plasma.components 2.0 as PlasmaComponents | 23 | import org.kde.plasma.components 2.0 as PlasmaComponents |
24 | 24 | ||
25 | import org.kde.akonadi2.mail 1.0 as Mail | 25 | import org.kde.kube.mail 1.0 as Mail |
26 | 26 | ||
27 | Item { | 27 | Item { |
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 | } |
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 | ||
22 | import org.kde.plasma.components 2.0 as PlasmaComponents | 22 | import org.kde.plasma.components 2.0 as PlasmaComponents |
23 | 23 | ||
24 | import org.kde.kube.mail 1.0 as Mail | ||
25 | |||
24 | ScrollView { | 26 | ScrollView { |
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 | } |
diff --git a/applications/kube-mail/package/contents/ui/SingleMailView.qml b/applications/kube-mail/package/contents/ui/SingleMailView.qml index e307ccfd..caec88dd 100644 --- a/applications/kube-mail/package/contents/ui/SingleMailView.qml +++ b/applications/kube-mail/package/contents/ui/SingleMailView.qml | |||
@@ -19,8 +19,11 @@ import QtQuick 2.4 | |||
19 | import QtQuick.Controls 1.3 | 19 | import QtQuick.Controls 1.3 |
20 | import QtQuick.Layouts 1.1 | 20 | import QtQuick.Layouts 1.1 |
21 | 21 | ||
22 | import org.kde.kube.mail 1.0 as Mail | ||
23 | |||
22 | Item { | 24 | Item { |
23 | id: root | 25 | id: root |
26 | property variant mail; | ||
24 | 27 | ||
25 | Rectangle { | 28 | Rectangle { |
26 | id: background | 29 | id: background |
@@ -33,7 +36,9 @@ Item { | |||
33 | Repeater { | 36 | Repeater { |
34 | anchors.fill: parent | 37 | anchors.fill: parent |
35 | 38 | ||
36 | model: singleMail.model | 39 | model: Mail.MailListModel { |
40 | mail: root.mail | ||
41 | } | ||
37 | 42 | ||
38 | delegate: Item { | 43 | delegate: Item { |
39 | height: root.height | 44 | height: root.height |
@@ -61,4 +66,4 @@ Item { | |||
61 | } | 66 | } |
62 | } | 67 | } |
63 | } | 68 | } |
64 | } \ No newline at end of file | 69 | } |
diff --git a/applications/kube-mail/package/contents/ui/main.qml b/applications/kube-mail/package/contents/ui/main.qml index 88d2edde..200328f3 100644 --- a/applications/kube-mail/package/contents/ui/main.qml +++ b/applications/kube-mail/package/contents/ui/main.qml | |||
@@ -20,8 +20,6 @@ import QtQuick.Controls 1.3 | |||
20 | import QtQuick.Layouts 1.1 | 20 | import QtQuick.Layouts 1.1 |
21 | import org.kde.plasma.components 2.0 as PlasmaComponents | 21 | import org.kde.plasma.components 2.0 as PlasmaComponents |
22 | 22 | ||
23 | import org.kde.akonadi2.mail 1.0 as Mail | ||
24 | |||
25 | ApplicationWindow { | 23 | ApplicationWindow { |
26 | id: app | 24 | id: app |
27 | 25 | ||
@@ -32,19 +30,6 @@ ApplicationWindow { | |||
32 | 30 | ||
33 | visible: true | 31 | visible: true |
34 | 32 | ||
35 | //Controller: | ||
36 | Mail.FolderList { | ||
37 | id: folderList | ||
38 | } | ||
39 | |||
40 | Mail.MailList { | ||
41 | id: mailList | ||
42 | } | ||
43 | |||
44 | Mail.SingleMail{ | ||
45 | id: singleMail | ||
46 | } | ||
47 | |||
48 | //UI | 33 | //UI |
49 | toolBar: ToolBar { | 34 | toolBar: ToolBar { |
50 | 35 | ||
@@ -111,6 +96,7 @@ ApplicationWindow { | |||
111 | 96 | ||
112 | MailListView { | 97 | MailListView { |
113 | id: mailListView | 98 | id: mailListView |
99 | parentFolder: folderListView.currentFolder | ||
114 | 100 | ||
115 | width: unit.size * 80 | 101 | width: unit.size * 80 |
116 | Layout.maximumWidth: unit.size * 250 | 102 | Layout.maximumWidth: unit.size * 250 |
@@ -119,6 +105,7 @@ ApplicationWindow { | |||
119 | 105 | ||
120 | SingleMailView { | 106 | SingleMailView { |
121 | id: mailView | 107 | id: mailView |
108 | mail: mailListView.currentMail | ||
122 | 109 | ||
123 | Layout.fillWidth: true | 110 | Layout.fillWidth: true |
124 | } | 111 | } |