diff options
author | Sandro Knauß <sknauss@kde.org> | 2016-10-10 13:01:15 +0200 |
---|---|---|
committer | Sandro Knauß <sknauss@kde.org> | 2016-10-10 13:01:15 +0200 |
commit | 6b6f20ffbe06402abcc7d4721ad1f647c3fc4c46 (patch) | |
tree | 6e2762d879c64373519b0506e9a66ddc27f04830 /components/mailviewer/qml/MailPart.qml | |
parent | 349e404b539c1f9d1feb54658e2e6fbbd2165462 (diff) | |
parent | 5fa8608e9877eab40336a60ed8ed979aaf3cfbd0 (diff) | |
download | kube-6b6f20ffbe06402abcc7d4721ad1f647c3fc4c46.tar.gz kube-6b6f20ffbe06402abcc7d4721ad1f647c3fc4c46.zip |
Merge branch 'develop' into dev/mimetreeinterface
Diffstat (limited to 'components/mailviewer/qml/MailPart.qml')
-rw-r--r-- | components/mailviewer/qml/MailPart.qml | 82 |
1 files changed, 82 insertions, 0 deletions
diff --git a/components/mailviewer/qml/MailPart.qml b/components/mailviewer/qml/MailPart.qml new file mode 100644 index 00000000..966337cd --- /dev/null +++ b/components/mailviewer/qml/MailPart.qml | |||
@@ -0,0 +1,82 @@ | |||
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 | |||
21 | Item { | ||
22 | id: root | ||
23 | |||
24 | height: partColumn.height + 40 | ||
25 | width: delegateRoot.width | ||
26 | |||
27 | Column { | ||
28 | id: partColumn | ||
29 | |||
30 | anchors { | ||
31 | top: parent.top | ||
32 | left: parent.left | ||
33 | right: parent.right | ||
34 | margins: 20 | ||
35 | } | ||
36 | |||
37 | spacing: 10 | ||
38 | |||
39 | Repeater { | ||
40 | model: content | ||
41 | |||
42 | delegate: Column { | ||
43 | id: delegateRoot | ||
44 | |||
45 | width: partColumn.width | ||
46 | |||
47 | Loader { | ||
48 | id: loader | ||
49 | } | ||
50 | |||
51 | Component.onCompleted: { | ||
52 | |||
53 | switch (model.type) { | ||
54 | case "encrypted": | ||
55 | loader.source = "EncryptedPart.qml"; | ||
56 | break; | ||
57 | case "embeded": | ||
58 | loader.source = "EmbededPart.qml"; | ||
59 | break; | ||
60 | case "frame": | ||
61 | loader.source = "Frame.qml" | ||
62 | break; | ||
63 | case "plaintext": | ||
64 | loader.source = "TextPart.qml"; | ||
65 | break; | ||
66 | case "html": | ||
67 | loader.source = "HtmlPart.qml"; | ||
68 | break; | ||
69 | } | ||
70 | } | ||
71 | } | ||
72 | } | ||
73 | |||
74 | |||
75 | Item { | ||
76 | id: footer | ||
77 | |||
78 | height: 5 | ||
79 | width: 10 | ||
80 | } | ||
81 | } | ||
82 | } | ||