diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2017-02-20 16:52:00 +0100 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2017-02-20 16:52:00 +0100 |
commit | a0c48081516f8fd6adae16c57a4f851bb139e36d (patch) | |
tree | 04528b7ccd2191a17f36f59b1aaaa9804c8cec9a /components/accounts/contents/ui/CreateImap.qml | |
parent | eb5dd31512b26d3240e2d07b29e976270f028297 (diff) | |
download | kube-a0c48081516f8fd6adae16c57a4f851bb139e36d.tar.gz kube-a0c48081516f8fd6adae16c57a4f851bb139e36d.zip |
Normalize the component package structure
Diffstat (limited to 'components/accounts/contents/ui/CreateImap.qml')
-rw-r--r-- | components/accounts/contents/ui/CreateImap.qml | 165 |
1 files changed, 165 insertions, 0 deletions
diff --git a/components/accounts/contents/ui/CreateImap.qml b/components/accounts/contents/ui/CreateImap.qml new file mode 100644 index 00000000..7f355409 --- /dev/null +++ b/components/accounts/contents/ui/CreateImap.qml | |||
@@ -0,0 +1,165 @@ | |||
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.7 | ||
20 | import QtQuick.Layouts 1.1 | ||
21 | import QtQuick.Controls 1.4 as Controls | ||
22 | import QtQuick.Controls 2.0 as Controls2 | ||
23 | import org.kde.kirigami 1.0 as Kirigami | ||
24 | |||
25 | Item { | ||
26 | |||
27 | Controls.ToolButton { | ||
28 | iconName: "go-previous" | ||
29 | |||
30 | tooltip: "go back" | ||
31 | |||
32 | onClicked: { | ||
33 | stack.pop() | ||
34 | } | ||
35 | } | ||
36 | |||
37 | //Item to avoid anchors conflict with stack | ||
38 | Item { | ||
39 | |||
40 | anchors { | ||
41 | fill: parent | ||
42 | margins: Kirigami.Units.largeSpacing * 2 | ||
43 | } | ||
44 | |||
45 | Kirigami.Heading { | ||
46 | id: heading | ||
47 | text: "Connect your IMAP account" | ||
48 | |||
49 | color: Kirigami.Theme.highlightColor | ||
50 | } | ||
51 | |||
52 | Kirigami.Label { | ||
53 | id: subHeadline | ||
54 | |||
55 | anchors { | ||
56 | left: heading.left | ||
57 | top: heading.bottom | ||
58 | } | ||
59 | |||
60 | width: parent.width | ||
61 | |||
62 | text: "To let Kube access your account, fill in email address, username, password and give the account a title that will be displayed inside Kube." | ||
63 | |||
64 | color: Kirigami.Theme.disabledTextColor | ||
65 | |||
66 | wrapMode: Text.Wrap | ||
67 | } | ||
68 | |||
69 | GridLayout { | ||
70 | anchors { | ||
71 | top:subHeadline.bottom | ||
72 | bottom: parent.bottom | ||
73 | left: parent.left | ||
74 | right: parent.right | ||
75 | topMargin: Kirigami.Units.largeSpacing * 2 | ||
76 | } | ||
77 | |||
78 | columns: 2 | ||
79 | columnSpacing: Kirigami.Units.largeSpacing | ||
80 | rowSpacing: Kirigami.Units.largeSpacing | ||
81 | |||
82 | Controls.Label { | ||
83 | text: "Title of Account" | ||
84 | Layout.alignment: Qt.AlignRight | ||
85 | } | ||
86 | Controls.TextField { | ||
87 | Layout.fillWidth: true | ||
88 | |||
89 | placeholderText: "E.g. \"Work\", \"Home\" that will be displayed in Kube as name" | ||
90 | } | ||
91 | |||
92 | Controls.Label { | ||
93 | text: "Email address" | ||
94 | Layout.alignment: Qt.AlignRight | ||
95 | } | ||
96 | |||
97 | Controls.TextField { | ||
98 | Layout.fillWidth: true | ||
99 | |||
100 | placeholderText: "Your email address" | ||
101 | } | ||
102 | |||
103 | Kirigami.Label { | ||
104 | text: "Password" | ||
105 | Layout.alignment: Qt.AlignRight | ||
106 | } | ||
107 | |||
108 | RowLayout { | ||
109 | Layout.fillWidth: true | ||
110 | |||
111 | Controls.TextField { | ||
112 | id: pwField | ||
113 | Layout.fillWidth: true | ||
114 | |||
115 | placeholderText: "Password of your email account" | ||
116 | echoMode: TextInput.Password | ||
117 | } | ||
118 | |||
119 | Controls.CheckBox { | ||
120 | text: "Show Password" | ||
121 | onClicked: { | ||
122 | if(pwField.echoMode == TextInput.Password) { | ||
123 | pwField.echoMode = TextInput.Normal; | ||
124 | } else { | ||
125 | pwField.echoMode = TextInput.Password; | ||
126 | } | ||
127 | } | ||
128 | } | ||
129 | } | ||
130 | |||
131 | Item { | ||
132 | Layout.fillHeight: true | ||
133 | } | ||
134 | |||
135 | Kirigami.Label { | ||
136 | text: "" | ||
137 | } | ||
138 | |||
139 | Kirigami.Label { | ||
140 | text: "" | ||
141 | } | ||
142 | |||
143 | Item { | ||
144 | Layout.fillWidth: true | ||
145 | |||
146 | Controls.Button { | ||
147 | text: "Discard" | ||
148 | |||
149 | onClicked: { | ||
150 | popup.close() | ||
151 | } | ||
152 | } | ||
153 | |||
154 | Controls.Button { | ||
155 | anchors.right: parent.right | ||
156 | |||
157 | text: "Next" | ||
158 | |||
159 | onClicked: { | ||
160 | } | ||
161 | } | ||
162 | } | ||
163 | } | ||
164 | } | ||
165 | } | ||