diff options
author | Michael Bohlender <michael.bohlender@kdemail.net> | 2015-12-17 21:17:52 +0100 |
---|---|---|
committer | Michael Bohlender <michael.bohlender@kdemail.net> | 2015-12-17 21:17:52 +0100 |
commit | ea443f175ece1cd86cf56458a6bd2faedcfb8426 (patch) | |
tree | 274af094821d00d639491a5b38a42a2ca54ed078 | |
parent | 7b5dd9662ef7c4cb005587a356e471b3767cffce (diff) | |
download | kube-ea443f175ece1cd86cf56458a6bd2faedcfb8426.tar.gz kube-ea443f175ece1cd86cf56458a6bd2faedcfb8426.zip |
display loaded mail from singleMail controller in app
-rw-r--r-- | applications/kmail-quick/package/contents/ui/MailListView.qml | 1 | ||||
-rw-r--r-- | applications/kmail-quick/package/contents/ui/SingleMailView.qml | 48 |
2 files changed, 35 insertions, 14 deletions
diff --git a/applications/kmail-quick/package/contents/ui/MailListView.qml b/applications/kmail-quick/package/contents/ui/MailListView.qml index f8b9b046..f6ded917 100644 --- a/applications/kmail-quick/package/contents/ui/MailListView.qml +++ b/applications/kmail-quick/package/contents/ui/MailListView.qml | |||
@@ -41,6 +41,7 @@ ScrollView { | |||
41 | 41 | ||
42 | onClicked: { | 42 | onClicked: { |
43 | listView.currentIndex = model.index | 43 | listView.currentIndex = model.index |
44 | singleMail.loadMail(model.id) | ||
44 | } | 45 | } |
45 | } | 46 | } |
46 | 47 | ||
diff --git a/applications/kmail-quick/package/contents/ui/SingleMailView.qml b/applications/kmail-quick/package/contents/ui/SingleMailView.qml index 29c979f1..80c6ddb7 100644 --- a/applications/kmail-quick/package/contents/ui/SingleMailView.qml +++ b/applications/kmail-quick/package/contents/ui/SingleMailView.qml | |||
@@ -18,22 +18,42 @@ | |||
18 | import QtQuick 2.4 | 18 | 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 | import QtWebKit 3.0 | ||
22 | 21 | ||
23 | ScrollView { | 22 | Item { |
24 | WebView { | 23 | id: root |
25 | url: "http://kolabnow.com" | 24 | |
25 | Rectangle { | ||
26 | id: background | ||
27 | |||
28 | anchors.fill: parent | ||
29 | |||
30 | color: colorPalette.background | ||
31 | } | ||
32 | |||
33 | Repeater { | ||
26 | anchors.fill: parent | 34 | anchors.fill: parent |
27 | onNavigationRequested: { | 35 | |
28 | request.action = WebView.IgnoreRequest; | 36 | model: singleMail.model |
29 | 37 | ||
30 | // detect URL scheme prefix, most likely an external link | 38 | delegate: Item { |
31 | var schemaRE = /^\w+:/; | 39 | height: root.height |
32 | if (schemaRE.test(request.url)) { | 40 | width: root.widht |
33 | request.action = WebView.AcceptRequest; | 41 | |
34 | } else { | 42 | ColumnLayout { |
35 | request.action = WebView.IgnoreRequest; | 43 | |
36 | // delegate request.url here | 44 | Label { |
45 | text: model.id | ||
46 | } | ||
47 | Label { | ||
48 | text: model.sender | ||
49 | } | ||
50 | Label { | ||
51 | text: model.senderName | ||
52 | } | ||
53 | |||
54 | Label { | ||
55 | text: model.subject | ||
56 | } | ||
37 | } | 57 | } |
38 | } | 58 | } |
39 | } | 59 | } |