diff options
author | Sandro Knauß <sknauss@kde.org> | 2016-10-11 16:18:50 +0200 |
---|---|---|
committer | Sandro Knauß <sknauss@kde.org> | 2016-10-11 16:18:50 +0200 |
commit | 1974c19eadd497e355ac985a00d0571f3e6c7712 (patch) | |
tree | 051b61cfe222150dc114e5da04fdd072ceffb3b7 /components/mailviewer/qml/dummyapp.qml | |
parent | 6b6f20ffbe06402abcc7d4721ad1f647c3fc4c46 (diff) | |
download | kube-1974c19eadd497e355ac985a00d0571f3e6c7712.tar.gz kube-1974c19eadd497e355ac985a00d0571f3e6c7712.zip |
create model for new mailviewer
Diffstat (limited to 'components/mailviewer/qml/dummyapp.qml')
-rw-r--r-- | components/mailviewer/qml/dummyapp.qml | 90 |
1 files changed, 0 insertions, 90 deletions
diff --git a/components/mailviewer/qml/dummyapp.qml b/components/mailviewer/qml/dummyapp.qml deleted file mode 100644 index a186f0f1..00000000 --- a/components/mailviewer/qml/dummyapp.qml +++ /dev/null | |||
@@ -1,90 +0,0 @@ | |||
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 | Rectangle { | ||
22 | id: app | ||
23 | |||
24 | width: 1200 | ||
25 | height: 700 | ||
26 | |||
27 | Rectangle { | ||
28 | anchors.fill: parent | ||
29 | |||
30 | color: "black" | ||
31 | |||
32 | opacity: 0.8 | ||
33 | |||
34 | } | ||
35 | |||
36 | Rectangle { | ||
37 | |||
38 | anchors.centerIn: parent | ||
39 | |||
40 | height: mainColumn.height + 50 | ||
41 | width: parent.width * 0.9 | ||
42 | |||
43 | Column { | ||
44 | id: mainColumn | ||
45 | |||
46 | anchors.centerIn: parent | ||
47 | |||
48 | width: parent.width - 50 | ||
49 | |||
50 | spacing: 10 | ||
51 | |||
52 | Repeater { | ||
53 | model: MailModel {} | ||
54 | |||
55 | delegate: Column { | ||
56 | id: delegateRoot | ||
57 | |||
58 | width: mainColumn.width | ||
59 | |||
60 | Loader { | ||
61 | id: loader | ||
62 | } | ||
63 | |||
64 | Component.onCompleted: { | ||
65 | switch (model.type) { | ||
66 | case "red": | ||
67 | loader.source = "Rect2.qml"; | ||
68 | break; | ||
69 | case "green": | ||
70 | loader.source = "Rect1.qml"; | ||
71 | break; | ||
72 | case "encrypted": | ||
73 | loader.source = "EncryptedPart.qml"; | ||
74 | break; | ||
75 | case "frame": | ||
76 | loader.source = "Frame.qml"; | ||
77 | break; | ||
78 | case "plaintext": | ||
79 | loader.source = "TextPart.qml"; | ||
80 | break; | ||
81 | case "html": | ||
82 | loader.source = "HtmlPart.qml"; | ||
83 | break; | ||
84 | } | ||
85 | } | ||
86 | } | ||
87 | } | ||
88 | } | ||
89 | } | ||
90 | } | ||