diff options
author | Sandro Knauß <sknauss@kde.org> | 2016-06-09 14:38:15 +0200 |
---|---|---|
committer | Sandro Knauß <sknauss@kde.org> | 2016-06-09 14:38:15 +0200 |
commit | 21357579ae75450453cf564472d06bdad8027bfa (patch) | |
tree | 54cd703c3879771a2ff259b82dcd4986b48dc71b /components/package/contents/ui/MailViewer.qml | |
parent | 900b42d71c51c397e6d27574e0ad5f7096568abe (diff) | |
download | kube-21357579ae75450453cf564472d06bdad8027bfa.tar.gz kube-21357579ae75450453cf564472d06bdad8027bfa.zip |
Add TreeView to browse MessageParts
it helps a lot for debugging issues with the mailrendering
Diffstat (limited to 'components/package/contents/ui/MailViewer.qml')
-rw-r--r-- | components/package/contents/ui/MailViewer.qml | 36 |
1 files changed, 30 insertions, 6 deletions
diff --git a/components/package/contents/ui/MailViewer.qml b/components/package/contents/ui/MailViewer.qml index 124aa05b..97095c94 100644 --- a/components/package/contents/ui/MailViewer.qml +++ b/components/package/contents/ui/MailViewer.qml | |||
@@ -1,5 +1,6 @@ | |||
1 | import QtQuick 2.4 | 1 | import QtQuick 2.4 |
2 | import QtQuick.Controls 1.3 | 2 | import QtQuick.Controls 1.3 |
3 | import QtQuick.Controls 1.4 | ||
3 | import QtQuick.Layouts 1.1 | 4 | import QtQuick.Layouts 1.1 |
4 | 5 | ||
5 | import org.kube.framework.domain 1.0 as KubeFramework | 6 | import org.kube.framework.domain 1.0 as KubeFramework |
@@ -8,7 +9,7 @@ Item { | |||
8 | id: root | 9 | id: root |
9 | property variant message; | 10 | property variant message; |
10 | property string html; | 11 | property string html; |
11 | property int desiredHeight: topPartLoader.height; | 12 | property int desiredHeight: topPartLoader.height+450; |
12 | 13 | ||
13 | Rectangle { | 14 | Rectangle { |
14 | id: rootRectangle | 15 | id: rootRectangle |
@@ -20,12 +21,35 @@ Item { | |||
20 | anchors.margins: 0 | 21 | anchors.margins: 0 |
21 | horizontalScrollBarPolicy: Qt.ScrollBarAlwaysOff | 22 | horizontalScrollBarPolicy: Qt.ScrollBarAlwaysOff |
22 | verticalScrollBarPolicy: Qt.ScrollBarAlwaysOff | 23 | verticalScrollBarPolicy: Qt.ScrollBarAlwaysOff |
23 | MessagePartTree { | 24 | Column { |
24 | id: topPartLoader | 25 | spacing:2 |
25 | width: rootRectangle.width | 26 | MessagePartTree { |
26 | height: topPartLoader.desiredHeight | 27 | id: topPartLoader |
28 | width: rootRectangle.width | ||
29 | height: topPartLoader.desiredHeight | ||
30 | } | ||
31 | TreeView { | ||
32 | width: 500 | ||
33 | height: 400 | ||
34 | TableViewColumn { | ||
35 | role: "type" | ||
36 | title: "Type" | ||
37 | width: 300 | ||
38 | } | ||
39 | TableViewColumn { | ||
40 | role: "isHidden" | ||
41 | title: "Hidden" | ||
42 | width: 60 | ||
43 | } | ||
44 | TableViewColumn { | ||
45 | role: "text" | ||
46 | title: "Text" | ||
47 | width: 600 | ||
48 | } | ||
49 | model: messageParser.partTree | ||
50 | } | ||
27 | } | 51 | } |
28 | } | 52 | } |
29 | } | 53 | } |
30 | 54 | ||
31 | KubeFramework.MessageParser { | 55 | KubeFramework.MessageParser { |