summaryrefslogtreecommitdiffstats
path: root/components/package/contents/ui/Settings.qml
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2016-03-09 15:13:00 +0100
committerChristian Mollekopf <chrigi_1@fastmail.fm>2016-03-09 15:14:19 +0100
commit2dac72ae43f627340694d89db68184cb07e68650 (patch)
tree5397a5b6216bd05f9f48a219f379d59d64c8bde4 /components/package/contents/ui/Settings.qml
parentda079fe211094621fbcb89614e58b84caa9a603b (diff)
downloadkube-2dac72ae43f627340694d89db68184cb07e68650.tar.gz
kube-2dac72ae43f627340694d89db68184cb07e68650.zip
Moved application to components
Diffstat (limited to 'components/package/contents/ui/Settings.qml')
-rw-r--r--components/package/contents/ui/Settings.qml74
1 files changed, 74 insertions, 0 deletions
diff --git a/components/package/contents/ui/Settings.qml b/components/package/contents/ui/Settings.qml
new file mode 100644
index 00000000..da44d331
--- /dev/null
+++ b/components/package/contents/ui/Settings.qml
@@ -0,0 +1,74 @@
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 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.4
20import QtQuick.Layouts 1.1
21
22import org.kde.kube.settings 1.0 as KubeSettings
23import org.kde.kube.accounts.maildir 1.0 as Maildir
24
25Rectangle {
26 id: root
27
28 visible: false
29
30 color: colorPalette.border
31
32 opacity: 0.9
33
34 MouseArea {
35 anchors.fill: parent
36
37 onClicked: {
38 root.visible = false
39 }
40 }
41
42 Rectangle {
43 anchors.centerIn: parent
44
45 height: root.height * 0.8
46 width: root.width * 0.8
47
48 color: colorPalette.background
49
50 MouseArea {
51 anchors.fill: parent
52 }
53
54 KubeSettings.Settings {
55 id: contextSettings
56 identifier: "applicationcontext"
57 property string currentAccountId: "current"
58 property var availableAccountTypes: ["maildir"]
59 property var accounts: ["current"]
60 }
61
62 Column {
63 spacing: 5
64 Repeater {
65 model: contextSettings.accounts
66 delegate: Maildir.AccountSettings { //This should be retrieved from the accounts plugin: KubeAccounts { identifier: modelData }.settingsUi
67 accountId: modelData
68 }
69 }
70 }
71
72 //TODO: Add possibility to add more accounts
73 }
74}