2 * Copyright (C) 2013 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/>.
18import Ubuntu.Components 0.1
24 // Determine if a numeric or alphanumeric pad is used.
25 property bool alphaNumeric: false
28 property string placeholderText: ""
30 // In case the Lockscreen can show a greeter message, this is the username
31 property string username: ""
33 // As the numeric PIN pad doesn't have a OK button by design, we need to auto-confirm on a certain length.
34 // This is ignored by the alphaNumeric lockscreen as that one is confirmed with pressing enter on the OSK.
35 property int pinLength: 4
37 property url background: ""
39 signal entered(string passphrase)
41 signal emergencyCall()
44 if (required && pinPadLoader.item) {
45 pinPadLoader.item.clear(false);
50 // This causes the loader below to destry and recreate the source
51 pinPadLoader.resetting = true;
52 pinPadLoader.resetting = false;
55 function clear(showAnimation) {
56 pinPadLoader.item.clear(showAnimation);
60 // In case background fails to load or is undefined
68 objectName: "lockscreenBackground"
71 topMargin: backgroundTopMargin
73 source: root.required ? root.background : ""
74 fillMode: Image.PreserveAspectCrop
83 objectName: "pinPadLoader"
87 verticalCenter: parent.verticalCenter
88 verticalCenterOffset: root.alphaNumeric ? -units.gu(10) : -units.gu(4)
90 property bool resetting: false
92 source: (!resetting && root.required) ? (root.alphaNumeric ? "PassphraseLockscreen.qml" : "PinLockscreen.qml") : ""
95 target: pinPadLoader.item
98 root.entered(passphrase);
107 target: pinPadLoader.item
108 property: "pinLength"
109 value: root.pinLength
112 target: pinPadLoader.item
113 property: "placeholderText"
114 value: root.placeholderText
117 target: pinPadLoader.item
126 bottom: parent.bottom
127 bottomMargin: units.gu(4)
130 height: childrenRect.height
134 objectName: "emergencyCallIcon"
137 anchors.horizontalCenter: parent.horizontalCenter
138 name: "phone-app-call-symbolic"
144 onClicked: root.emergencyCall()
149 text: i18n.tr("Emergency Call")
153 anchors.horizontalCenter: parent.horizontalCenter
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list