diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2017-04-04 19:19:41 +0200 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2017-04-04 19:19:41 +0200 |
commit | d9295fc8f19e4005f8454e7f193f80316550ac0c (patch) | |
tree | f27c370d54bced09212b9c4a12b827d1cebb6110 /framework/qml/MailViewer.qml | |
parent | d002eae7f8b443dd1bad914444c296088c2b6e85 (diff) | |
download | kube-d9295fc8f19e4005f8454e7f193f80316550ac0c.tar.gz kube-d9295fc8f19e4005f8454e7f193f80316550ac0c.zip |
One framework plugin to rule them all
Diffstat (limited to 'framework/qml/MailViewer.qml')
-rw-r--r-- | framework/qml/MailViewer.qml | 76 |
1 files changed, 76 insertions, 0 deletions
diff --git a/framework/qml/MailViewer.qml b/framework/qml/MailViewer.qml new file mode 100644 index 00000000..4ee170bd --- /dev/null +++ b/framework/qml/MailViewer.qml | |||
@@ -0,0 +1,76 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2016 Michael Bohlender, <michael.bohlender@kdemail.net> | ||
3 | * | ||
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 | ||
6 | * the Free Software Foundation; either version 2 of the License, or | ||
7 | * (at your option) any later version. | ||
8 | * | ||
9 | * This program is distributed in the hope that it will be useful, | ||
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | * GNU General Public License for more details. | ||
13 | * | ||
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., | ||
16 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||
17 | */ | ||
18 | |||
19 | import QtQuick 2.4 | ||
20 | import QtQuick.Controls 1.4 as Controls1 | ||
21 | import QtQuick.Layouts 1.1 | ||
22 | |||
23 | import org.kube.framework.domain 1.0 as KubeFramework | ||
24 | import org.kube.components.mailviewer 1.0 as MV | ||
25 | |||
26 | Item { | ||
27 | id: root | ||
28 | property variant message; | ||
29 | property string html; | ||
30 | property int desiredHeight: mailViewer.height + 20 | ||
31 | property variant attachments | ||
32 | |||
33 | clip: true | ||
34 | |||
35 | MV.MailViewer { | ||
36 | id: mailViewer | ||
37 | debug: false | ||
38 | width: parent.width | ||
39 | } | ||
40 | |||
41 | Controls1.TreeView { | ||
42 | id: mailStructure | ||
43 | anchors.top: messageParser.attachments.rowCount() > 0 ? attachments.bottom : mailViewer.bottom | ||
44 | visible: mailViewer.debug | ||
45 | width: parent.width | ||
46 | height: 400 | ||
47 | Controls1.TableViewColumn { | ||
48 | role: "type" | ||
49 | title: "Type" | ||
50 | width: 300 | ||
51 | } | ||
52 | Controls1.TableViewColumn { | ||
53 | role: "embeded" | ||
54 | title: "Embeded" | ||
55 | width: 60 | ||
56 | } | ||
57 | Controls1.TableViewColumn { | ||
58 | role: "securityLevel" | ||
59 | title: "SecurityLevel" | ||
60 | width: 60 | ||
61 | } | ||
62 | Controls1.TableViewColumn { | ||
63 | role: "content" | ||
64 | title: "Content" | ||
65 | width: 200 | ||
66 | } | ||
67 | model: messageParser.newTree | ||
68 | } | ||
69 | |||
70 | KubeFramework.MessageParser { | ||
71 | id: messageParser | ||
72 | message: root.message | ||
73 | } | ||
74 | attachments: messageParser.attachments | ||
75 | html: messageParser.html | ||
76 | } | ||