diff options
author | Michael Bohlender <michael.bohlender@kdemail.net> | 2016-10-30 15:37:21 +0100 |
---|---|---|
committer | Michael Bohlender <michael.bohlender@kdemail.net> | 2016-10-30 15:37:21 +0100 |
commit | e4040f1c10bfd5df379fd2d3c2b278e099b9e72f (patch) | |
tree | dc15673a620b6f46e4db13ed03a908c56520a644 /components/package/contents/ui/MailViewer.qml | |
parent | 53d5b584392cd4c7e703d2d4f132074aa965e5de (diff) | |
download | kube-e4040f1c10bfd5df379fd2d3c2b278e099b9e72f.tar.gz kube-e4040f1c10bfd5df379fd2d3c2b278e099b9e72f.zip |
clean up components/mailviewer
Diffstat (limited to 'components/package/contents/ui/MailViewer.qml')
-rw-r--r-- | components/package/contents/ui/MailViewer.qml | 147 |
1 files changed, 69 insertions, 78 deletions
diff --git a/components/package/contents/ui/MailViewer.qml b/components/package/contents/ui/MailViewer.qml index f8e0a33b..95b03b1b 100644 --- a/components/package/contents/ui/MailViewer.qml +++ b/components/package/contents/ui/MailViewer.qml | |||
@@ -1,20 +1,20 @@ | |||
1 | /* | 1 | /* |
2 | Copyright (C) 2016 Michael Bohlender, <michael.bohlender@kdemail.net> | 2 | * Copyright (C) 2016 Michael Bohlender, <michael.bohlender@kdemail.net> |
3 | 3 | * | |
4 | This program is free software; you can redistribute it and/or modify | 4 | * This program is free software; you can redistribute it and/or modify |
5 | it under the terms of the GNU General Public License as published by | 5 | * it under the terms of the GNU General Public License as published by |
6 | the Free Software Foundation; either version 2 of the License, or | 6 | * the Free Software Foundation; either version 2 of the License, or |
7 | (at your option) any later version. | 7 | * (at your option) any later version. |
8 | 8 | * | |
9 | This program is distributed in the hope that it will be useful, | 9 | * This program is distributed in the hope that it will be useful, |
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
12 | GNU General Public License for more details. | 12 | * GNU General Public License for more details. |
13 | 13 | * | |
14 | You should have received a copy of the GNU General Public License along | 14 | * You should have received a copy of the GNU General Public License along |
15 | with this program; if not, write to the Free Software Foundation, Inc., | 15 | * with this program; if not, write to the Free Software Foundation, Inc., |
16 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | 16 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
17 | */ | 17 | */ |
18 | 18 | ||
19 | import QtQuick 2.4 | 19 | import QtQuick 2.4 |
20 | import QtQuick.Controls 1.3 | 20 | import QtQuick.Controls 1.3 |
@@ -28,70 +28,61 @@ 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 bool enablePartTreeView : true; | 31 | property int desiredHeight: topPartLoader.height + newMailViewer.height + 50; |
32 | property int desiredHeight: enablePartTreeView ? topPartLoader.height + newMailViewer.height + mailStructure.height + 50 : topPartLoader.height + newMailViewer.height + 50; | 32 | |
33 | clip: true | ||
34 | |||
35 | MV.MailViewer { | ||
36 | id: newMailViewer | ||
37 | debug: false | ||
38 | width: parent.width | ||
39 | } | ||
40 | |||
41 | //BEGIN old mail viewer | ||
42 | MessagePartTree { | ||
43 | id: topPartLoader | ||
44 | anchors.top: newMailViewer.bottom | ||
45 | |||
46 | Text { | ||
47 | text: "old mailviewer" | ||
48 | color: "blue" | ||
49 | } | ||
50 | |||
51 | visible: false | ||
52 | // width: parent.width | ||
53 | height: topPartLoader.contentHeight | ||
54 | width: topPartLoader.contentWidth >= parent.width ? topPartLoader.contentWidth : parent.width | ||
55 | } | ||
33 | 56 | ||
34 | Rectangle { | 57 | TreeView { |
35 | id: rootRectangle | 58 | id: mailStructure |
36 | anchors.fill: parent | 59 | visible: false |
37 | anchors.margins: 0 | 60 | width: parent.width |
38 | ScrollView { | 61 | height: 400 |
39 | id: scrollView | 62 | TableViewColumn { |
40 | anchors.fill: parent | 63 | role: "type" |
41 | anchors.margins: 0 | 64 | title: "Type" |
42 | verticalScrollBarPolicy: Qt.ScrollBarAlwaysOff | 65 | width: 300 |
43 | Column { | 66 | } |
44 | spacing: 2 | 67 | TableViewColumn { |
45 | Text { | 68 | role: "embeded" |
46 | text: "New Mailviewer:" | 69 | title: "Embeded" |
47 | color: "blue" | 70 | width: 60 |
48 | } | 71 | } |
49 | MV.MailViewer { | 72 | TableViewColumn { |
50 | id: newMailViewer | 73 | role: "securityLevel" |
51 | debug: false | 74 | title: "SecurityLevel" |
52 | width: rootRectangle.width | 75 | width: 60 |
53 | } | 76 | } |
54 | Text { | 77 | TableViewColumn { |
55 | text: "Old Mailviewer:" | 78 | role: "content" |
56 | color: "blue" | 79 | title: "Content" |
57 | } | 80 | width: 200 |
58 | MessagePartTree { | 81 | } |
59 | id: topPartLoader | 82 | //model: messageParser.partTree |
60 | // width: rootRectangle.width | 83 | model: messageParser.newTree |
61 | height: topPartLoader.contentHeight | ||
62 | width: topPartLoader.contentWidth >= rootRectangle.width ? topPartLoader.contentWidth : rootRectangle.width | ||
63 | } | ||
64 | TreeView { | ||
65 | id: mailStructure | ||
66 | visible: enablePartTreeView | ||
67 | width: rootRectangle.width | ||
68 | height: 400 | ||
69 | TableViewColumn { | ||
70 | role: "type" | ||
71 | title: "Type" | ||
72 | width: 300 | ||
73 | } | ||
74 | TableViewColumn { | ||
75 | role: "embeded" | ||
76 | title: "Embeded" | ||
77 | width: 60 | ||
78 | } | ||
79 | TableViewColumn { | ||
80 | role: "securityLevel" | ||
81 | title: "SecurityLevel" | ||
82 | width: 60 | ||
83 | } | ||
84 | TableViewColumn { | ||
85 | role: "content" | ||
86 | title: "Content" | ||
87 | width: 200 | ||
88 | } | ||
89 | //model: messageParser.partTree | ||
90 | model: messageParser.newTree | ||
91 | } | ||
92 | } | ||
93 | } | ||
94 | } | 84 | } |
85 | //END old mail viewer | ||
95 | 86 | ||
96 | KubeFramework.MessageParser { | 87 | KubeFramework.MessageParser { |
97 | id: messageParser | 88 | id: messageParser |