summaryrefslogtreecommitdiffstats
path: root/components/accounts/CreateMaildir.qml
diff options
context:
space:
mode:
authorMichael Bohlender <michael.bohlender@kdemail.net>2016-11-17 12:13:58 +0100
committerMichael Bohlender <michael.bohlender@kdemail.net>2016-11-17 12:13:58 +0100
commit55a8383f159be85471c5e31a3c0b572503ebb8b0 (patch)
treeca07870e229f1ef9a04992626a030cd4b51052d1 /components/accounts/CreateMaildir.qml
parentcbbb5c0c1dba6b8e49c64849f08ac015d1f57592 (diff)
downloadkube-55a8383f159be85471c5e31a3c0b572503ebb8b0.tar.gz
kube-55a8383f159be85471c5e31a3c0b572503ebb8b0.zip
initial revamped create account wizzard
Diffstat (limited to 'components/accounts/CreateMaildir.qml')
-rw-r--r--components/accounts/CreateMaildir.qml174
1 files changed, 174 insertions, 0 deletions
diff --git a/components/accounts/CreateMaildir.qml b/components/accounts/CreateMaildir.qml
new file mode 100644
index 00000000..63a63221
--- /dev/null
+++ b/components/accounts/CreateMaildir.qml
@@ -0,0 +1,174 @@
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
19import QtQuick 2.7
20import QtQuick.Layouts 1.1
21import QtQuick.Controls 1.4 as Controls
22import QtQuick.Controls 2.0 as Controls2
23import org.kde.kirigami 1.0 as Kirigami
24import QtQuick.Dialogs 1.0
25
26Item {
27
28 Controls.ToolButton {
29 iconName: "go-previous"
30
31 tooltip: "go back"
32
33 onClicked: {
34 stack.pop()
35 }
36 }
37
38 //Item to avoid anchors conflict with stack
39 Item {
40
41 anchors {
42 fill: parent
43 margins: Kirigami.Units.largeSpacing * 2
44 }
45
46
47 Kirigami.Heading {
48 id: heading
49 text: "Add your Maildir archive"
50
51 color: Kirigami.Theme.highlightColor
52 }
53
54 Kirigami.Label {
55 id: subHeadline
56
57 anchors {
58 left: heading.left
59 top: heading.bottom
60 }
61
62 width: parent.width
63
64 text: "To let Kube access your maildir archive, add the path to your archive and give the account a title that will be displayed inside Kube"
65
66 color: Kirigami.Theme.disabledTextColor
67 wrapMode: Text.Wrap
68 }
69
70
71 GridLayout {
72 anchors {
73 top:subHeadline.bottom
74 bottom: parent.bottom
75 left: parent.left
76 right: parent.right
77 topMargin: Kirigami.Units.largeSpacing * 2
78 }
79
80 columns: 2
81 columnSpacing: Kirigami.Units.largeSpacing
82 rowSpacing: Kirigami.Units.largeSpacing
83
84 Kirigami.Label {
85 text: "Title of account"
86 Layout.alignment: Qt.AlignRight
87 }
88 Controls.TextField {
89 Layout.fillWidth: true
90 }
91
92 Kirigami.Label {
93 text: "Path"
94 Layout.alignment: Qt.AlignRight
95 }
96 RowLayout {
97 Layout.fillWidth: true
98
99 Controls.TextField {
100 id: path
101 Layout.fillWidth: true
102
103 enabled: false
104 }
105
106 Controls.Button {
107 iconName: "folder"
108
109 onClicked: {
110 fileDialogComponent.createObject(parent)
111 }
112
113 Component {
114 id: fileDialogComponent
115 FileDialog {
116 id: fileDialog
117
118 visible: true
119 title: "Choose the maildir folder"
120
121 selectFolder: true
122
123 onAccepted: {
124 path.text = fileDialog.fileUrl
125 }
126 }
127 }
128 }
129 }
130
131 Kirigami.Label {
132 text: ""
133 }
134 Controls.CheckBox {
135 text: "Read only"
136 }
137
138 Kirigami.Label {
139 text: ""
140 Layout.fillHeight: true
141 }
142 Kirigami.Label {
143 text: ""
144 }
145
146 Kirigami.Label {
147 text: ""
148 }
149 Item {
150 Layout.fillWidth: true
151
152 Controls.Button {
153 text: "Discard"
154
155 onClicked: {
156 popup.close()
157 }
158 }
159
160 Controls.Button {
161 id: saveButton
162
163 anchors.right: parent.right
164
165 text: "Save"
166
167 onClicked: {
168 }
169 }
170 }
171 }
172 }
173}
174