diff options
author | Michael Bohlender <michael.bohlender@kdemail.net> | 2017-01-05 15:28:43 +0100 |
---|---|---|
committer | Michael Bohlender <michael.bohlender@kdemail.net> | 2017-01-05 15:28:43 +0100 |
commit | 2ea57b9a9c5db3fa340cb62d40a9732af31143e0 (patch) | |
tree | f4da2825c9610c51cd378c92fa8fc08d58864458 /components/package/contents/ui | |
parent | 5b521141a0576a6f12a8a1f990198a97a4d60aa6 (diff) | |
download | kube-2ea57b9a9c5db3fa340cb62d40a9732af31143e0.tar.gz kube-2ea57b9a9c5db3fa340cb62d40a9732af31143e0.zip |
adjust accountswitcher to accountsplugin, remove old newaccountdialog, enable accountwizard
Diffstat (limited to 'components/package/contents/ui')
-rw-r--r-- | components/package/contents/ui/AccountSwitcher.qml | 15 | ||||
-rw-r--r-- | components/package/contents/ui/NewAccountDialog.qml | 170 |
2 files changed, 4 insertions, 181 deletions
diff --git a/components/package/contents/ui/AccountSwitcher.qml b/components/package/contents/ui/AccountSwitcher.qml index 6c899c50..41b3478c 100644 --- a/components/package/contents/ui/AccountSwitcher.qml +++ b/components/package/contents/ui/AccountSwitcher.qml | |||
@@ -24,6 +24,7 @@ import QtQml 2.2 as QtQml | |||
24 | import org.kde.kirigami 1.0 as Kirigami | 24 | import org.kde.kirigami 1.0 as Kirigami |
25 | 25 | ||
26 | import org.kube.framework.domain 1.0 as KubeFramework | 26 | import org.kube.framework.domain 1.0 as KubeFramework |
27 | import org.kube.framework.accounts 1.0 as KubeAccounts | ||
27 | import org.kube.components 1.0 as KubeComponents | 28 | import org.kube.components 1.0 as KubeComponents |
28 | 29 | ||
29 | Controls2.Button { | 30 | Controls2.Button { |
@@ -81,17 +82,9 @@ Controls2.Button { | |||
81 | text: "Create new Account" | 82 | text: "Create new Account" |
82 | 83 | ||
83 | onClicked: { | 84 | onClicked: { |
84 | newAccountComponent.createObject(app) | 85 | accountWizard.open() |
85 | popup.close() | 86 | popup.close() |
86 | } | 87 | } |
87 | |||
88 | Component { | ||
89 | id: newAccountComponent | ||
90 | KubeComponents.NewAccountDialog { | ||
91 | id: settings | ||
92 | anchors.fill: parent | ||
93 | } | ||
94 | } | ||
95 | } | 88 | } |
96 | 89 | ||
97 | Controls2.Button { | 90 | Controls2.Button { |
@@ -123,7 +116,7 @@ Controls2.Button { | |||
123 | 116 | ||
124 | clip: true | 117 | clip: true |
125 | 118 | ||
126 | model: KubeFramework.AccountsModel { } | 119 | model: KubeAccounts.AccountsModel { } |
127 | 120 | ||
128 | delegate: Kirigami.AbstractListItem { | 121 | delegate: Kirigami.AbstractListItem { |
129 | id: accountDelegate | 122 | id: accountDelegate |
@@ -158,7 +151,7 @@ Controls2.Button { | |||
158 | 151 | ||
159 | Layout.fillHeight: true | 152 | Layout.fillHeight: true |
160 | 153 | ||
161 | KubeFramework.AccountFactory { | 154 | KubeAccounts.AccountFactory { |
162 | id: accountFactory | 155 | id: accountFactory |
163 | accountId: model.accountId | 156 | accountId: model.accountId |
164 | } | 157 | } |
diff --git a/components/package/contents/ui/NewAccountDialog.qml b/components/package/contents/ui/NewAccountDialog.qml deleted file mode 100644 index de168de7..00000000 --- a/components/package/contents/ui/NewAccountDialog.qml +++ /dev/null | |||
@@ -1,170 +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 | import QtQuick.Controls 1.4 | ||
21 | import QtQuick.Layouts 1.1 | ||
22 | |||
23 | import org.kde.kirigami 1.0 as Kirigami | ||
24 | |||
25 | import org.kube.framework.settings 1.0 as KubeSettings | ||
26 | import org.kube.framework.domain 1.0 as KubeFramework | ||
27 | import org.kube.components 1.0 as KubeComponents | ||
28 | |||
29 | KubeComponents.OverlayDialog { | ||
30 | id: root | ||
31 | |||
32 | KubeFramework.AccountsController { | ||
33 | id: accountsController | ||
34 | } | ||
35 | |||
36 | Item { | ||
37 | id: dialog | ||
38 | |||
39 | anchors.centerIn: parent | ||
40 | |||
41 | height: parent.height * 0.8 | ||
42 | width: parent.width * 0.8 | ||
43 | |||
44 | ToolBar { | ||
45 | id: toolBar | ||
46 | anchors { | ||
47 | top: parent.top | ||
48 | left: parent.left | ||
49 | right: parent.right | ||
50 | } | ||
51 | |||
52 | ToolButton { | ||
53 | |||
54 | anchors { | ||
55 | left: parent.left | ||
56 | verticalCenter: parent.verticalCenter | ||
57 | } | ||
58 | |||
59 | visible: stack.depth > 1 | ||
60 | iconName: "go-previous" | ||
61 | |||
62 | onClicked: stack.pop() | ||
63 | } | ||
64 | } | ||
65 | |||
66 | StackView { | ||
67 | id: stack | ||
68 | |||
69 | anchors { | ||
70 | top: toolBar.bottom | ||
71 | left: parent.left | ||
72 | right: parent.right | ||
73 | bottom: parent.bottom | ||
74 | } | ||
75 | |||
76 | clip: true | ||
77 | initialItem: accountTypes | ||
78 | |||
79 | Component { | ||
80 | id: accountTypes | ||
81 | |||
82 | Item { | ||
83 | id: pageRoot | ||
84 | |||
85 | height: dialog.height | ||
86 | width: dialog.width | ||
87 | |||
88 | Column { | ||
89 | anchors.centerIn: parent | ||
90 | |||
91 | spacing: Kirigami.Units.largeSpacing | ||
92 | |||
93 | Button { | ||
94 | anchors.horizontalCenter: parent.horizontalCenter | ||
95 | width: pageRoot.width * 0.4 | ||
96 | |||
97 | text: "kolabnow" | ||
98 | |||
99 | onClicked: { | ||
100 | accountsController.createAccount("kolabnow"); | ||
101 | root.closeDialog() | ||
102 | //stack.push(imap) | ||
103 | } | ||
104 | } | ||
105 | |||
106 | Button { | ||
107 | anchors.horizontalCenter: parent.horizontalCenter | ||
108 | width: pageRoot.width * 0.4 | ||
109 | |||
110 | text: "imap" | ||
111 | |||
112 | onClicked: { | ||
113 | accountsController.createAccount("imap"); | ||
114 | root.closeDialog() | ||
115 | //stack.push(imap) | ||
116 | } | ||
117 | } | ||
118 | |||
119 | Button { | ||
120 | anchors.horizontalCenter: parent.horizontalCenter | ||
121 | width: pageRoot.width * 0.4 | ||
122 | |||
123 | text: "maildir" | ||
124 | |||
125 | onClicked: { | ||
126 | accountsController.createAccount("maildir"); | ||
127 | root.closeDialog() | ||
128 | //stack.push(maildir) | ||
129 | } | ||
130 | } | ||
131 | } | ||
132 | } | ||
133 | } | ||
134 | |||
135 | Component { | ||
136 | id: imap | ||
137 | |||
138 | Rectangle { | ||
139 | color: "green" | ||
140 | |||
141 | height: dialog.height | ||
142 | width: dialog.width | ||
143 | } | ||
144 | } | ||
145 | |||
146 | Component { | ||
147 | id: maildir | ||
148 | |||
149 | Rectangle { | ||
150 | color: "blue" | ||
151 | |||
152 | height: dialog.height | ||
153 | width: dialog.width | ||
154 | } | ||
155 | } | ||
156 | |||
157 | Component { | ||
158 | id: kolabnow | ||
159 | |||
160 | Rectangle { | ||
161 | color: "yellow" | ||
162 | |||
163 | height: dialog.height | ||
164 | width: dialog.width | ||
165 | } | ||
166 | } | ||
167 | |||
168 | } | ||
169 | } | ||
170 | } | ||