@@ -0,0 +1,99 @@
2+ * Copyright (C) 2015 Canonical, Ltd.
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; version 3.
8+ * This program is distributed in the hope that it will be useful,
9+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+ * GNU General Public License for more details.
13+ * You should have received a copy of the GNU General Public License
14+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
18+import Ubuntu.Components 1.3
19+import ".." as LocalComponents
22+ * See the main passwd-type page for an explanation of why we don't actually
23+ * directly set the password here.
26+LocalComponents.Page {
28+ objectName: "passcodeDesktopPage"
29+ title: i18n.tr("Lock Screen Passcode")
30+ forwardButtonSourceComponent: forwardButton
32+ property alias password: passwordField.text
36+ anchors.fill: content
37+ anchors.leftMargin: leftMargin
38+ anchors.rightMargin: rightMargin
39+ anchors.topMargin: customMargin
44+ objectName: "infoLabel"
50+ font.weight: Font.Light
52+ text: i18n.tr("Enter 4 numbers to setup your passcode")
58+ verticalItemAlignment: Grid.AlignVCenter
61+ text: i18n.tr("Choose passcode")
64+ LocalComponents.WizardTextField {
66+ objectName: "passwordField"
67+ echoMode: TextInput.Password
68+ inputMethodHints: Qt.ImhDigitsOnly
69+ validator: RegExpValidator { regExp: /^\d{4}$/ }
74+ text: i18n.tr("Confirm passcode")
77+ LocalComponents.WizardTextField {
79+ objectName: "password2Field"
80+ echoMode: TextInput.Password
81+ inputMethodHints: Qt.ImhDigitsOnly
82+ validator: RegExpValidator { regExp: /^\d{4}$/ }
90+ LocalComponents.StackButton {
91+ text: i18n.tr("Next")
92+ enabled: password != "" && password == password2Field.text
94+ root.password = password;