summaryrefslogtreecommitdiffstats
path: root/components/mailviewer/qml/MailPart.qml
diff options
context:
space:
mode:
authorSandro Knauß <sknauss@kde.org>2016-10-24 13:02:40 +0200
committerSandro Knauß <sknauss@kde.org>2016-10-24 13:02:40 +0200
commit6aa695939b63fc7370e5eb80ecf7528aea1bd5e1 (patch)
tree91e7951411f541d7b71d64f15a2a38c6bbd7c577 /components/mailviewer/qml/MailPart.qml
parent9be2b6515cf538673babda8764219b9af9691f6f (diff)
parenta93a649f34ffa794884019e05c57869bd3bd4672 (diff)
downloadkube-6aa695939b63fc7370e5eb80ecf7528aea1bd5e1.tar.gz
kube-6aa695939b63fc7370e5eb80ecf7528aea1bd5e1.zip
Merge branch 'dev/mimetreeinterface' into develop
Diffstat (limited to 'components/mailviewer/qml/MailPart.qml')
-rw-r--r--components/mailviewer/qml/MailPart.qml74
1 files changed, 19 insertions, 55 deletions
diff --git a/components/mailviewer/qml/MailPart.qml b/components/mailviewer/qml/MailPart.qml
index 966337cd..ad51a7ba 100644
--- a/components/mailviewer/qml/MailPart.qml
+++ b/components/mailviewer/qml/MailPart.qml
@@ -20,63 +20,27 @@ import QtQuick 2.4
20 20
21Item { 21Item {
22 id: root 22 id: root
23 property alias rootIndex: visualModel.rootIndex
24 property bool debug: true
25 height: partListView.height + 10
26 width: parent.width
27
28 MailDataModel {
29 id: visualModel
30 debug: root.debug
31 model: messageParser.newTree
32 }
23 33
24 height: partColumn.height + 40 34 ListView {
25 width: delegateRoot.width 35 id: partListView
26 36 model: visualModel
27 Column {
28 id: partColumn
29
30 anchors { 37 anchors {
31 top: parent.top 38 top: parent.top
32 left: parent.left 39 left: parent.left
33 right: parent.right 40 margins: 5
34 margins: 20
35 }
36
37 spacing: 10
38
39 Repeater {
40 model: content
41
42 delegate: Column {
43 id: delegateRoot
44
45 width: partColumn.width
46
47 Loader {
48 id: loader
49 }
50
51 Component.onCompleted: {
52
53 switch (model.type) {
54 case "encrypted":
55 loader.source = "EncryptedPart.qml";
56 break;
57 case "embeded":
58 loader.source = "EmbededPart.qml";
59 break;
60 case "frame":
61 loader.source = "Frame.qml"
62 break;
63 case "plaintext":
64 loader.source = "TextPart.qml";
65 break;
66 case "html":
67 loader.source = "HtmlPart.qml";
68 break;
69 }
70 }
71 }
72 }
73
74
75 Item {
76 id: footer
77
78 height: 5
79 width: 10
80 } 41 }
42 spacing: 5
43 height: contentHeight
44 width: parent.width - 10
81 } 45 }
82} 46}