summaryrefslogtreecommitdiffstats
path: root/components/mailviewer/qml/TextContent.qml
diff options
context:
space:
mode:
authorSandro Knauß <sknauss@kde.org>2016-10-19 14:28:08 +0200
committerSandro Knauß <sknauss@kde.org>2016-10-19 14:28:08 +0200
commit6833c46a9522be3c55cefe79676293a0a571cbf5 (patch)
tree6a91b7e00cff34aec70341c24921fd9a1dd095ea /components/mailviewer/qml/TextContent.qml
parentbe38c2ebaa77b116028cbe34f777e3d8e5cbc776 (diff)
downloadkube-6833c46a9522be3c55cefe79676293a0a571cbf5.tar.gz
kube-6833c46a9522be3c55cefe79676293a0a571cbf5.zip
use treemodel in qml
Diffstat (limited to 'components/mailviewer/qml/TextContent.qml')
-rw-r--r--components/mailviewer/qml/TextContent.qml47
1 files changed, 47 insertions, 0 deletions
diff --git a/components/mailviewer/qml/TextContent.qml b/components/mailviewer/qml/TextContent.qml
new file mode 100644
index 00000000..2e0167d4
--- /dev/null
+++ b/components/mailviewer/qml/TextContent.qml
@@ -0,0 +1,47 @@
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
19import QtQuick 2.4
20Item {
21 id: textItem
22 property bool debug: true
23 width: partColumn.width
24 height: textColumn.height
25 Column {
26 id: textColumn
27 anchors {
28 top: parent.top
29 left: parent.left
30 }
31 width: parent.width
32 spacing: 5
33 Text {
34 width: parent.width
35 visible: textItem.debug
36 text: model.type
37 }
38 Text {
39 width: parent.width
40
41 text: model.content
42 wrapMode: Text.WordWrap
43
44 color: model.embeded ? "grey" : "black"
45 }
46 }
47}