summaryrefslogtreecommitdiffstats
path: root/components/package/contents
diff options
context:
space:
mode:
Diffstat (limited to 'components/package/contents')
-rw-r--r--components/package/contents/ui/AccountSwitcher.qml19
-rw-r--r--components/package/contents/ui/NewAccountDialog.qml144
2 files changed, 157 insertions, 6 deletions
diff --git a/components/package/contents/ui/AccountSwitcher.qml b/components/package/contents/ui/AccountSwitcher.qml
index bfdc4f7a..79eba65b 100644
--- a/components/package/contents/ui/AccountSwitcher.qml
+++ b/components/package/contents/ui/AccountSwitcher.qml
@@ -22,12 +22,7 @@ import QtQuick.Layouts 1.1
22import org.kde.kirigami 1.0 as Kirigami 22import org.kde.kirigami 1.0 as Kirigami
23 23
24import org.kube.framework.domain 1.0 as KubeFramework 24import org.kube.framework.domain 1.0 as KubeFramework
25 25import org.kube.components 1.0 as KubeComponents
26/*
27 C omboBox { ** *
28 model: KubeFramework.AccountsModel { }
29 textRole: "name"
30 } */
31 26
32Button { 27Button {
33 id: accountSwitcher 28 id: accountSwitcher
@@ -78,6 +73,18 @@ Button {
78 } 73 }
79 74
80 text: "Create new Account" 75 text: "Create new Account"
76
77 onClicked: {
78 newAccountComponent.createObject(app)
79 }
80
81 Component {
82 id: newAccountComponent
83 KubeComponents.NewAccountDialog {
84 id: settings
85 anchors.fill: parent
86 }
87 }
81 } 88 }
82 89
83 Button { 90 Button {
diff --git a/components/package/contents/ui/NewAccountDialog.qml b/components/package/contents/ui/NewAccountDialog.qml
new file mode 100644
index 00000000..b2705c94
--- /dev/null
+++ b/components/package/contents/ui/NewAccountDialog.qml
@@ -0,0 +1,144 @@
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.kirigami 1.0 as Kirigami
23
24import org.kube.framework.settings 1.0 as KubeSettings
25import org.kube.framework.domain 1.0 as KubeFramework
26import org.kube.framework.theme 1.0
27
28Rectangle {
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 id: dialog
44 anchors.centerIn: parent
45
46 height: root.height * 0.8
47 width: root.width * 0.8
48
49 color: ColorPalette.background
50
51 MouseArea {
52 anchors.fill: parent
53 }
54
55 ToolBar {
56 id: toolBar
57 anchors {
58 top: parent.top
59 left: parent.left
60 right: parent.right
61 }
62
63 ToolButton {
64
65 anchors {
66 left: parent.left
67 verticalCenter: parent.verticalCenter
68 }
69
70 iconName: "go-previous"
71
72 onClicked: stack.pop()
73 }
74 }
75
76 StackView {
77 id: stack
78
79 anchors {
80 top: toolBar.bottom
81 left: parent.left
82 right: parent.right
83 bottom: parent.bottom
84 }
85
86 clip: true
87 initialItem: accountTypes
88
89 Component {
90 id: accountTypes
91
92 Item {
93 id: pageRoot
94
95 height: dialog.height
96 width: dialog.width
97
98 Column {
99 anchors.centerIn: parent
100
101 spacing: Kirigami.Units.largeSpacing
102
103 Button {
104 anchors.horizontalCenter: parent.horizontalCenter
105 width: pageRoot.width * 0.4
106
107 text: "kolabnow"
108 }
109
110 Button {
111 anchors.horizontalCenter: parent.horizontalCenter
112 width: pageRoot.width * 0.4
113
114 text: "imap"
115
116 onClicked: {
117 stack.push(test)
118 }
119 }
120
121 Button {
122 anchors.horizontalCenter: parent.horizontalCenter
123 width: pageRoot.width * 0.4
124
125 text: "maildir"
126 }
127 }
128 }
129 }
130
131 Component {
132 id: test
133
134 Rectangle {
135 color: "green"
136
137 height: dialog.height
138 width: dialog.width
139 }
140 }
141 }
142
143 }
144}