diff options
author | Aaron Seigo <aseigo@kde.org> | 2015-12-31 19:03:58 +0100 |
---|---|---|
committer | Aaron Seigo <aseigo@kde.org> | 2015-12-31 19:03:58 +0100 |
commit | ad39a0aa4852b09318a1a0e557dd7eaed12c4e95 (patch) | |
tree | 2b140b9ed6376c8f54566f5a73f281fdcdaeaa6e /applications/kube-mail/package/contents/ui/FolderListView.qml | |
parent | a19884338f0cecb2c98215ddef54e3be09bf258b (diff) | |
download | kube-ad39a0aa4852b09318a1a0e557dd7eaed12c4e95.tar.gz kube-ad39a0aa4852b09318a1a0e557dd7eaed12c4e95.zip |
kmail-quick -> kube-mail
Diffstat (limited to 'applications/kube-mail/package/contents/ui/FolderListView.qml')
-rw-r--r-- | applications/kube-mail/package/contents/ui/FolderListView.qml | 102 |
1 files changed, 102 insertions, 0 deletions
diff --git a/applications/kube-mail/package/contents/ui/FolderListView.qml b/applications/kube-mail/package/contents/ui/FolderListView.qml new file mode 100644 index 00000000..f0ce7da2 --- /dev/null +++ b/applications/kube-mail/package/contents/ui/FolderListView.qml | |||
@@ -0,0 +1,102 @@ | |||
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 | |||
18 | import QtQuick 2.4 | ||
19 | import QtQuick.Controls 1.3 | ||
20 | import QtQuick.Layouts 1.1 | ||
21 | |||
22 | import org.kde.plasma.core 2.0 as PlasmaCore | ||
23 | import org.kde.plasma.components 2.0 as PlasmaComponents | ||
24 | |||
25 | import org.kde.akonadi2.mail 1.0 as Mail | ||
26 | |||
27 | Item { | ||
28 | id: root | ||
29 | |||
30 | Item { | ||
31 | id: searchBox | ||
32 | |||
33 | width: root.width | ||
34 | height: unit.size * 10 | ||
35 | |||
36 | TextField { | ||
37 | anchors. centerIn: parent | ||
38 | |||
39 | width: parent.width * 0.9 | ||
40 | |||
41 | placeholderText: "Search all email..." | ||
42 | } | ||
43 | } | ||
44 | |||
45 | ScrollView { | ||
46 | |||
47 | anchors { | ||
48 | top: searchBox.bottom | ||
49 | left: parent.left | ||
50 | right: parent.right | ||
51 | bottom: parent.bottom | ||
52 | } | ||
53 | |||
54 | ListView { | ||
55 | id: listView | ||
56 | |||
57 | currentIndex: -1 | ||
58 | |||
59 | clip: true | ||
60 | |||
61 | model: folderList.model //FolderModel {} | ||
62 | |||
63 | delegate: PlasmaComponents.ListItem { | ||
64 | |||
65 | width: root.width | ||
66 | height: unit.size * 10 | ||
67 | |||
68 | enabled: true | ||
69 | checked: listView.currentIndex == index | ||
70 | |||
71 | onClicked: { | ||
72 | mailList.loadMailFolder(model.id) | ||
73 | listView.currentIndex = model.index | ||
74 | } | ||
75 | |||
76 | PlasmaCore.IconItem { | ||
77 | id: iconItem | ||
78 | |||
79 | anchors { | ||
80 | verticalCenter: parent.verticalCenter | ||
81 | left: parent.left | ||
82 | leftMargin: unit.size * 3 | ||
83 | } | ||
84 | |||
85 | source: model.icon | ||
86 | } | ||
87 | |||
88 | Label { | ||
89 | id: label | ||
90 | |||
91 | anchors { | ||
92 | verticalCenter: parent.verticalCenter | ||
93 | left: iconItem.right | ||
94 | leftMargin: unit.size * 3 | ||
95 | } | ||
96 | |||
97 | text: model.name | ||
98 | } | ||
99 | } | ||
100 | } | ||
101 | } | ||
102 | } \ No newline at end of file | ||