summaryrefslogtreecommitdiffstats
path: root/components/package/contents/ui/MailViewer.qml
diff options
context:
space:
mode:
authorSandro Knauß <sknauss@kde.org>2016-11-08 16:11:02 +0100
committerSandro Knauß <sknauss@kde.org>2016-11-08 16:23:47 +0100
commit026278f1cf0c692b8ba134c84c26da5bb8274d67 (patch)
tree22cf5baaab7fab53bfd0a07625a6612f01936bfe /components/package/contents/ui/MailViewer.qml
parent2561117ed2f5ca07d8dc63f45c22989cb0fa147d (diff)
downloadkube-026278f1cf0c692b8ba134c84c26da5bb8274d67.tar.gz
kube-026278f1cf0c692b8ba134c84c26da5bb8274d67.zip
Add AttachmentModel for viewer
Diffstat (limited to 'components/package/contents/ui/MailViewer.qml')
-rw-r--r--components/package/contents/ui/MailViewer.qml41
1 files changed, 38 insertions, 3 deletions
diff --git a/components/package/contents/ui/MailViewer.qml b/components/package/contents/ui/MailViewer.qml
index 2c45a49f..01163277 100644
--- a/components/package/contents/ui/MailViewer.qml
+++ b/components/package/contents/ui/MailViewer.qml
@@ -28,7 +28,7 @@ Item {
28 id: root 28 id: root
29 property variant message; 29 property variant message;
30 property string html; 30 property string html;
31 property int desiredHeight: topPartLoader.height + newMailViewer.height + 5 31 property int desiredHeight: topPartLoader.height + newMailViewer.height + attachments.height + mailStructure.height + 5
32 32
33 clip: true 33 clip: true
34 34
@@ -55,9 +55,46 @@ Item {
55 width: topPartLoader.contentWidth >= parent.width ? topPartLoader.contentWidth : parent.width 55 width: topPartLoader.contentWidth >= parent.width ? topPartLoader.contentWidth : parent.width
56 } 56 }
57 57
58 //END old mail viewer
59
60 TreeView {
61 id: attachments
62 anchors.top: newMailViewer.bottom
63 visible: messageParser.attachments.rowCount() > 0
64 width: parent.width
65 height: 200
66 TableViewColumn {
67 role: "name"
68 title: "Filename"
69 width: 300
70 }
71 TableViewColumn {
72 role: "type"
73 title: "Type"
74 width: 60
75 }
76 TableViewColumn {
77 role: "size"
78 title: "Size"
79 width: 60
80 }
81 TableViewColumn {
82 role: "encrypted"
83 title: "Encrypted"
84 width: 60
85 }
86 TableViewColumn {
87 role: "signed"
88 title: "Signed"
89 width: 60
90 }
91 model: messageParser.attachments
92 }
93
58 TreeView { 94 TreeView {
59 id: mailStructure 95 id: mailStructure
60 visible: false 96 visible: false
97 anchors.top: messageParser.attachments.rowCount() > 0 ? attachments.bottom : newMailViewer.bottom
61 width: parent.width 98 width: parent.width
62 height: 400 99 height: 400
63 TableViewColumn { 100 TableViewColumn {
@@ -80,10 +117,8 @@ Item {
80 title: "Content" 117 title: "Content"
81 width: 200 118 width: 200
82 } 119 }
83 //model: messageParser.partTree
84 model: messageParser.newTree 120 model: messageParser.newTree
85 } 121 }
86 //END old mail viewer
87 122
88 KubeFramework.MessageParser { 123 KubeFramework.MessageParser {
89 id: messageParser 124 id: messageParser