diff options
author | Michael Bohlender <michael.bohlender@kdemail.net> | 2016-06-21 17:29:06 +0200 |
---|---|---|
committer | Michael Bohlender <michael.bohlender@kdemail.net> | 2016-06-21 17:29:06 +0200 |
commit | ed23447fe0a163b6a9dfc5c0eb5560257231086c (patch) | |
tree | f26b1ae698ec72b1245c60b54c1c057a1757f4f0 /components/package/contents/ui/Settings.qml | |
parent | c72539d2cf1dfa43a0a874ea4877d6047ba3dcb8 (diff) | |
download | kube-ed23447fe0a163b6a9dfc5c0eb5560257231086c.tar.gz kube-ed23447fe0a163b6a9dfc5c0eb5560257231086c.zip |
remove obsolete settings plugin
Diffstat (limited to 'components/package/contents/ui/Settings.qml')
-rw-r--r-- | components/package/contents/ui/Settings.qml | 151 |
1 files changed, 0 insertions, 151 deletions
diff --git a/components/package/contents/ui/Settings.qml b/components/package/contents/ui/Settings.qml deleted file mode 100644 index d37863f8..00000000 --- a/components/package/contents/ui/Settings.qml +++ /dev/null | |||
@@ -1,151 +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 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.4 | ||
20 | import QtQuick.Layouts 1.1 | ||
21 | |||
22 | import org.kde.kirigami 1.0 as Kirigami | ||
23 | |||
24 | import org.kube.framework.settings 1.0 as KubeSettings | ||
25 | import org.kube.framework.domain 1.0 as KubeFramework | ||
26 | import org.kube.framework.theme 1.0 | ||
27 | |||
28 | Rectangle { | ||
29 | id: root | ||
30 | |||
31 | color: ColorPalette.border | ||
32 | |||
33 | opacity: 0.9 | ||
34 | |||
35 | MouseArea { | ||
36 | anchors.fill: parent | ||
37 | onClicked: { | ||
38 | root.destroy() | ||
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 | } | ||
59 | |||
60 | KubeFramework.AccountsController { | ||
61 | id: accountsController | ||
62 | } | ||
63 | KubeFramework.AccountsModel { | ||
64 | id: accountsModel | ||
65 | } | ||
66 | |||
67 | SplitView { | ||
68 | anchors.fill: parent | ||
69 | |||
70 | ColumnLayout { | ||
71 | ScrollView { | ||
72 | id: accountsList | ||
73 | |||
74 | width: Unit.size * 55 | ||
75 | Layout.maximumWidth: Unit.size * 150 | ||
76 | Layout.minimumWidth: Unit.size * 30 | ||
77 | |||
78 | ListView { | ||
79 | id: listView | ||
80 | |||
81 | model: accountsModel | ||
82 | |||
83 | currentIndex: -1 | ||
84 | |||
85 | onCountChanged: { | ||
86 | listView.currentIndex = count - 1 | ||
87 | } | ||
88 | |||
89 | delegate: Kirigami.AbstractListItem { | ||
90 | enabled: true | ||
91 | supportsMouseEvents: true | ||
92 | checked: listView.currentIndex == index | ||
93 | |||
94 | onCheckedChanged: { | ||
95 | if (checked) { | ||
96 | console.warn("Current index changed ", accountFactory.accountId); | ||
97 | accountDetails.source = accountFactory.uiPath | ||
98 | accountDetails.item.accountId = accountFactory.accountId | ||
99 | accountDetails.item.icon = accountFactory.icon | ||
100 | accountDetails.item.accountName = accountFactory.name | ||
101 | } | ||
102 | } | ||
103 | |||
104 | onClicked: { | ||
105 | listView.currentIndex = model.index | ||
106 | } | ||
107 | |||
108 | contentItem: RowLayout { | ||
109 | |||
110 | KubeFramework.AccountFactory { | ||
111 | id: accountFactory | ||
112 | accountId: model.accountId | ||
113 | onAccountLoaded: { | ||
114 | if (listView.currentIndex == model.index) { | ||
115 | accountDetails.source = accountFactory.uiPath | ||
116 | accountDetails.item.accountId = accountFactory.accountId | ||
117 | accountDetails.item.icon = accountFactory.icon | ||
118 | accountDetails.item.accountName = accountFactory.name | ||
119 | } | ||
120 | } | ||
121 | } | ||
122 | |||
123 | Kirigami.Icon { | ||
124 | source: accountFactory.icon | ||
125 | } | ||
126 | |||
127 | Label { | ||
128 | text: model.name === "" ? accountFactory.name : model.name | ||
129 | } | ||
130 | } | ||
131 | } | ||
132 | } | ||
133 | |||
134 | } | ||
135 | Button { | ||
136 | id: button | ||
137 | text: "Create New" | ||
138 | onClicked: { | ||
139 | accountsController.createAccount("maildir"); | ||
140 | } | ||
141 | } | ||
142 | } | ||
143 | |||
144 | Loader { | ||
145 | id: accountDetails | ||
146 | |||
147 | Layout.fillWidth: true | ||
148 | } | ||
149 | } | ||
150 | } | ||
151 | } | ||