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
23 property alias dragHandleLeftMargin: coverPage.dragHandleLeftMargin
24 property alias launcherOffset: coverPage.launcherOffset
25 property alias currentIndex: loginList.currentIndex
26 property int delayMinutes // TODO
27 property alias backgroundTopMargin: coverPage.backgroundTopMargin
28 property alias background: coverPage.background
30 property bool alphanumeric // unused
31 property alias userModel: loginList.model
32 property alias infographicModel: coverPage.infographicModel
33 readonly property bool fullyShown: coverPage.showProgress === 1
34 readonly property bool required: coverPage.required
35 readonly property bool animating: coverPage.showAnimation.running || coverPage.hideAnimation.running
37 // so that it can be replaced in tests with a mock object
38 property var inputMethod: Qt.inputMethod
40 signal selected(int index)
41 signal responded(string response)
43 signal emergencyCall() // unused
45 function showMessage(html) {
46 loginList.showMessage(html);
49 function showPrompt(text, isSecret, isDefaultPrompt) {
50 loginList.showPrompt(text, isSecret, isDefaultPrompt);
53 function showLastChance() {
61 function notifyAuthenticationSucceeded() {
65 function notifyAuthenticationFailed() {
66 loginList.showError();
73 function tryToUnlock(toTheRight) {
76 loginList.tryToUnlock();
79 var coverChanged = coverPage.shown;
81 coverPage.hideRight();
92 opacity: coverPage.showProgress * 0.8
97 objectName: "coverPage"
100 draggable: !root.locked
103 height: 0.75 * parent.height
104 anchors.leftMargin: loginList.x + loginList.width
107 onTease: root.tease()
109 onShowProgressChanged: {
110 if (showProgress === 0 && !root.locked) {
117 objectName: "loginList"
121 leftMargin: Math.min(parent.width * 0.16, units.gu(20))
125 height: inputMethod && inputMethod.visible ? parent.height - inputMethod.keyboardRectangle.height
127 Behavior on height { UbuntuNumberAnimation {} }
131 onSelected: root.selected(index)
132 onResponded: root.responded(response)