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/>.
18
import Ubuntu.Components 0.1
19
import LightDM 0.1 as LightDM
20
import "../Components"
26
property bool promptless: loginLoader.status == Loader.Ready && LightDM.Greeter.promptless
27
property bool ready: wallpaper.status == Image.Ready
28
property alias leftTeaserPressed: leftTeaser.pressed
30
signal selected(int uid)
31
signal unlocked(int uid)
36
source: shell.background
54
topMargin: units.gu(2)
55
horizontalCenter: parent.horizontalCenter
62
anchors.rightMargin: parent.width / 2
67
objectName: "loginLoader"
70
leftMargin: Math.min(parent.width * 0.16, units.gu(20))
71
verticalCenter: parent.verticalCenter
76
source: greeter.multiUser ? "LoginList.qml" : ""
79
item.currentIndex = greeterContentLoader.currentIndex
83
target: loginLoader.item
85
value: greeterContentLoader.model
89
target: loginLoader.item
99
onCurrentIndexChanged: {
100
if (greeterContentLoader.currentIndex !== loginLoader.item.currentIndex) {
101
greeterContentLoader.currentIndex = loginLoader.item.currentIndex;
109
height: narrowMode ? parent.height : 0.75 * parent.height
110
model: greeterContentLoader.infographicModel
112
Component.onCompleted: infographics.updateUsername(greeterContentLoader.currentIndex)
116
onSelected: infographics.updateUsername(uid)
119
function updateUsername(uid) {
120
greeterContentLoader.infographicModel.username = greeterContentLoader.model.data(uid, LightDM.UserRoles.NameRole)
124
verticalCenter: parent.verticalCenter
125
left: narrowMode ? root.left : loginLoader.right