You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
52 lines
1.1 KiB
52 lines
1.1 KiB
import QtQuick 2.2 |
|
|
|
Item |
|
{ |
|
signal loginFailed() |
|
signal loginSucceeded() |
|
|
|
function powerOff() { |
|
console.log("SDDM - POWERING OFF"); |
|
} |
|
function reboot() { |
|
console.log("SDDM - REBOOTING"); |
|
} |
|
function suspend() { |
|
console.log("SDDM - SUSPEND"); |
|
} |
|
function hibernate() { |
|
console.log("SDDM - HIBERNATE"); |
|
} |
|
function hybridSleep() { |
|
console.log("SDDM - HYBRID SLEEP"); |
|
} |
|
|
|
|
|
function login(user, password, sessionIndex) { |
|
console.log("SDDM - logging in as ", user, password, sessionIndex) |
|
|
|
//modify as appropriate for testing |
|
var success = false |
|
|
|
if (success) { |
|
loginSucceeded(); |
|
} else { |
|
tryLogin.start(); |
|
} |
|
|
|
} |
|
|
|
Timer { |
|
id: tryLogin |
|
interval: 1000 |
|
onTriggered: loginFailed(); |
|
} |
|
|
|
property bool canPowerOff: true |
|
property bool canReboot: true |
|
property bool canSuspend: true |
|
property bool canHibernate: true |
|
property bool canHybridSleep: true |
|
property string hostname: "MyHostname" |
|
|
|
}
|
|
|