summaryrefslogtreecommitdiffstats
path: root/applications/kube-mail-mobile/SingleMailView.qml
diff options
context:
space:
mode:
Diffstat (limited to 'applications/kube-mail-mobile/SingleMailView.qml')
-rw-r--r--applications/kube-mail-mobile/SingleMailView.qml171
1 files changed, 0 insertions, 171 deletions
diff --git a/applications/kube-mail-mobile/SingleMailView.qml b/applications/kube-mail-mobile/SingleMailView.qml
deleted file mode 100644
index ae184c4a..00000000
--- a/applications/kube-mail-mobile/SingleMailView.qml
+++ /dev/null
@@ -1,171 +0,0 @@
1/*
2 * Copyright (C) 2015 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 3 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
15 * along with this program; if not, see <http://www.gnu.org/licenses/>.
16 */
17
18import QtQuick 2.4
19import QtQuick.Controls 1.3
20import QtQuick.Layouts 1.1
21
22Item {
23 id: root
24
25 property StackView stack;
26 property string mailId;
27
28 //toolbar
29 ToolBar {
30 id: toolBar
31
32 RowLayout {
33
34 width: parent.width
35
36 spacing: unit.width * 8
37
38 ToolButton {
39 iconName: "go-previous"
40
41 onClicked: stack.pop()
42 }
43
44 //FIXME
45 Row {
46 anchors.horizontalCenter: parent.horizontalCenter
47
48 spacing: unit.width * 8
49
50 ToolButton {
51 iconName: "mail-mark-unread-new"
52 }
53 ToolButton {
54 iconName: "mail-mark-important"
55 }
56 ToolButton {
57 iconName: "user-trash"
58 }
59 }
60
61 ToolButton {
62
63 anchors.right: parent.right
64
65 iconName: "mail-reply-sender"
66
67 onClicked: stack.push({"item": Qt.resolvedUrl("ComposerView.qml"), properties: {stack: stack}})
68 }
69 }
70 }
71
72 //main content
73 Item {
74
75 anchors {
76 top: toolBar.bottom
77 right: parent.right
78 left: parent.left
79 bottom: parent.bottom
80 }
81
82 Item {
83 id: model
84 property string subject: "We need more Food"
85 property string sender: "Alice Trump"
86 property string senderAddress: "alice@wonderland.net"
87 property string cc: "vdg@kde.org; ross@ccmail.com"
88 property string time: "2 days ago"
89 property string body: "Hi Bob, \n \n Ut nibh massa, volutpat quis diam quis, tincidunt consectetur massa. Nulla eu ultricies justo, eu aliquam lacus. Maecenas at interdum est, at luctus nibh. Quisque scelerisque consequat lectus vitae egestas. Maecenas molestie risus id enim consequat dapibus. Ut dapibus hendrerit est, ut aliquam ex fringilla commodo. Donec rutrum consectetur dapibus. Fusce hendrerit pulvinar lacinia. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent semper sit amet elit ut volutpat. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae. \n \n Cheers, \n \n Alice"
90 }
91
92 Rectangle {
93 id: background
94
95 anchors.fill: parent
96
97 color: colorPalette.background
98 }
99
100 Item {
101 anchors {
102 fill: parent
103 margins: unit.width * 10
104 }
105
106 Column {
107 id: content
108
109 width: parent.width
110
111 spacing: unit.width * 5
112
113
114 Label {
115 text: model.subject
116
117 font.pixelSize: 22 // Fixme
118 }
119
120 //FIXME use propper avatar or avatar replacement
121 //Rectangle {
122
123 Item {
124 height: avatar.height
125 width: parent.width
126
127 Avatar {
128 id: avatar
129
130 width: unit.width * 15
131 height: unit.width * 15
132
133 name: model.sender
134 }
135
136 Label {
137
138 anchors {
139 left: avatar.right
140 top: avatar.top
141 leftMargin: unit.width * 3
142 }
143
144 text: model.senderAddress
145 }
146
147 Label {
148 anchors {
149 left: avatar.right
150 bottom: avatar.bottom
151 leftMargin: unit.width * 3
152 }
153
154 text: "CC: " + model.cc
155
156 }
157 }
158
159 Label {
160
161 width: parent.width
162
163 wrapMode: Text.WordWrap
164
165 text: model.body
166
167 }
168 }
169 }
170 }
171}