Changeset View
Changeset View
Standalone View
Standalone View
lookandfeel/contents/logout/Logout.qml
Show First 20 Lines • Show All 44 Lines • ▼ Show 20 Line(s) | 33 | PlasmaCore.ColorScope { | |||
---|---|---|---|---|---|
45 | signal lockScreenRequested() | 45 | signal lockScreenRequested() | ||
46 | 46 | | |||
47 | property alias backgroundColor: backgroundRect.color | 47 | property alias backgroundColor: backgroundRect.color | ||
48 | 48 | | |||
49 | function sleepRequested() { | 49 | function sleepRequested() { | ||
50 | root.suspendRequested(2); | 50 | root.suspendRequested(2); | ||
51 | } | 51 | } | ||
52 | 52 | | |||
53 | function hibernateRequested() { | ||||
54 | root.suspendRequested(4); | ||||
55 | } | ||||
56 | | ||||
53 | property real timeout: 30 | 57 | property real timeout: 30 | ||
54 | property real remainingTime: root.timeout | 58 | property real remainingTime: root.timeout | ||
55 | property var currentAction: { | 59 | property var currentAction: { | ||
56 | switch (sdtype) { | 60 | switch (sdtype) { | ||
57 | case ShutdownType.ShutdownTypeReboot: | 61 | case ShutdownType.ShutdownTypeReboot: | ||
58 | return root.rebootRequested; | 62 | return root.rebootRequested; | ||
59 | case ShutdownType.ShutdownTypeHalt: | 63 | case ShutdownType.ShutdownTypeHalt: | ||
60 | return root.haltRequested; | 64 | return root.haltRequested; | ||
▲ Show 20 Lines • Show All 93 Lines • ▼ Show 20 Line(s) | 157 | RowLayout { | |||
154 | spacing: units.largeSpacing * 2 | 158 | spacing: units.largeSpacing * 2 | ||
155 | Layout.alignment: Qt.AlignHCenter | 159 | Layout.alignment: Qt.AlignHCenter | ||
156 | LogoutButton { | 160 | LogoutButton { | ||
157 | id: suspendButton | 161 | id: suspendButton | ||
158 | iconSource: "system-suspend" | 162 | iconSource: "system-suspend" | ||
159 | text: i18nd("plasma_lookandfeel_org.kde.lookandfeel", "Suspend") | 163 | text: i18nd("plasma_lookandfeel_org.kde.lookandfeel", "Suspend") | ||
160 | action: root.sleepRequested | 164 | action: root.sleepRequested | ||
161 | KeyNavigation.left: logoutButton | 165 | KeyNavigation.left: logoutButton | ||
162 | KeyNavigation.right: rebootButton | 166 | KeyNavigation.right: hibernateButton | ||
163 | visible: spdMethods.SuspendState | 167 | visible: spdMethods.SuspendState | ||
164 | } | 168 | } | ||
165 | LogoutButton { | 169 | LogoutButton { | ||
170 | id: hibernateButton | ||||
171 | iconSource: "system-suspend-hibernate" | ||||
172 | text: i18nd("plasma_lookandfeel_org.kde.lookandfeel", "Hibernate") | ||||
173 | action: root.hibernateRequested | ||||
174 | KeyNavigation.left: suspendButton | ||||
175 | KeyNavigation.right: rebootButton | ||||
176 | visible: spdMethods.HibernateState | ||||
177 | } | ||||
178 | LogoutButton { | ||||
166 | id: rebootButton | 179 | id: rebootButton | ||
167 | iconSource: "system-reboot" | 180 | iconSource: "system-reboot" | ||
168 | text: i18nd("plasma_lookandfeel_org.kde.lookandfeel", "Reboot") | 181 | text: i18nd("plasma_lookandfeel_org.kde.lookandfeel", "Reboot") | ||
169 | action: root.rebootRequested | 182 | action: root.rebootRequested | ||
170 | KeyNavigation.left: suspendButton | 183 | KeyNavigation.left: hibernateButton | ||
171 | KeyNavigation.right: shutdownButton | 184 | KeyNavigation.right: shutdownButton | ||
172 | focus: sdtype == ShutdownType.ShutdownTypeReboot | 185 | focus: sdtype == ShutdownType.ShutdownTypeReboot | ||
173 | visible: maysd | 186 | visible: maysd | ||
174 | } | 187 | } | ||
175 | LogoutButton { | 188 | LogoutButton { | ||
176 | id: shutdownButton | 189 | id: shutdownButton | ||
177 | iconSource: "system-shutdown" | 190 | iconSource: "system-shutdown" | ||
178 | text: i18nd("plasma_lookandfeel_org.kde.lookandfeel", "Shutdown") | 191 | text: i18nd("plasma_lookandfeel_org.kde.lookandfeel", "Shutdown") | ||
▲ Show 20 Lines • Show All 54 Lines • Show Last 20 Lines |