summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Bohlender <michael.bohlender@kdemail.net>2015-12-17 21:17:52 +0100
committerMichael Bohlender <michael.bohlender@kdemail.net>2015-12-17 21:17:52 +0100
commitea443f175ece1cd86cf56458a6bd2faedcfb8426 (patch)
tree274af094821d00d639491a5b38a42a2ca54ed078
parent7b5dd9662ef7c4cb005587a356e471b3767cffce (diff)
downloadkube-ea443f175ece1cd86cf56458a6bd2faedcfb8426.tar.gz
kube-ea443f175ece1cd86cf56458a6bd2faedcfb8426.zip
display loaded mail from singleMail controller in app
-rw-r--r--applications/kmail-quick/package/contents/ui/MailListView.qml1
-rw-r--r--applications/kmail-quick/package/contents/ui/SingleMailView.qml48
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 @@
18import QtQuick 2.4 18import QtQuick 2.4
19import QtQuick.Controls 1.3 19import QtQuick.Controls 1.3
20import QtQuick.Layouts 1.1 20import QtQuick.Layouts 1.1
21import QtWebKit 3.0
22 21
23ScrollView { 22Item {
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 }