Changeset View
Changeset View
Standalone View
Standalone View
lookandfeel/contents/logout/Logout.qml
Show All 20 Lines | |||||
21 | import QtQuick.Layouts 1.2 | 21 | import QtQuick.Layouts 1.2 | ||
22 | import QtQuick.Controls 1.1 as Controls | 22 | import QtQuick.Controls 1.1 as Controls | ||
23 | 23 | | |||
24 | import org.kde.plasma.core 2.0 as PlasmaCore | 24 | import org.kde.plasma.core 2.0 as PlasmaCore | ||
25 | import org.kde.plasma.components 2.0 as PlasmaComponents | 25 | import org.kde.plasma.components 2.0 as PlasmaComponents | ||
26 | import org.kde.kcoreaddons 1.0 as KCoreAddons | 26 | import org.kde.kcoreaddons 1.0 as KCoreAddons | ||
27 | 27 | | |||
28 | import "../components" | 28 | import "../components" | ||
29 | import "timer.js" as AutoTriggerTimer | ||||
29 | 30 | | |||
30 | PlasmaCore.ColorScope { | 31 | PlasmaCore.ColorScope { | ||
31 | id: root | 32 | id: root | ||
32 | colorGroup: PlasmaCore.Theme.ComplementaryColorGroup | 33 | colorGroup: PlasmaCore.Theme.ComplementaryColorGroup | ||
33 | height: screenGeometry.height | 34 | height: screenGeometry.height | ||
34 | width: screenGeometry.width | 35 | width: screenGeometry.width | ||
35 | 36 | | |||
36 | signal logoutRequested() | 37 | signal logoutRequested() | ||
Show All 39 Lines | |||||
76 | } | 77 | } | ||
77 | 78 | | |||
78 | Timer { | 79 | Timer { | ||
79 | id: countDownTimer | 80 | id: countDownTimer | ||
80 | running: true | 81 | running: true | ||
81 | repeat: true | 82 | repeat: true | ||
82 | interval: 1000 | 83 | interval: 1000 | ||
83 | onTriggered: remainingTime-- | 84 | onTriggered: remainingTime-- | ||
85 | Component.onCompleted: { | ||||
86 | AutoTriggerTimer.addCancelAutoTriggerCallback(function() { | ||||
87 | countDownTimer.running = false; | ||||
88 | }); | ||||
89 | } | ||||
84 | } | 90 | } | ||
85 | 91 | | |||
86 | function isLightColor(color) { | 92 | function isLightColor(color) { | ||
87 | return Math.max(color.r, color.g, color.b) > 0.5 | 93 | return Math.max(color.r, color.g, color.b) > 0.5 | ||
88 | } | 94 | } | ||
89 | 95 | | |||
90 | Rectangle { | 96 | Rectangle { | ||
91 | id: backgroundRect | 97 | id: backgroundRect | ||
▲ Show 20 Lines • Show All 113 Lines • Show Last 20 Lines |