Warning, /plasma/plasma-workspace/applets/lock_logout/contents/ui/ConfigGeneral.qml is written in an unsupported language. File is not indexed.
0001 /* 0002 SPDX-FileCopyrightText: 2013 Sebastian Kügler <sebas@kde.org> 0003 SPDX-FileCopyrightText: 2015 Kai Uwe Broulik <kde@privat.broulik.de> 0004 0005 SPDX-License-Identifier: GPL-2.0-or-later 0006 */ 0007 0008 import QtQuick 2.0 0009 import QtQuick.Controls 2.5 as QtControls 0010 import org.kde.kirigami 2.5 as Kirigami 0011 import org.kde.plasma.private.sessions 2.0 0012 import org.kde.kcmutils as KCM 0013 0014 KCM.SimpleKCM { 0015 readonly property int checkedOptions: logout.checked + shutdown.checked + reboot.checked + lock.checked + switchUser.checked + hibernate.checked + sleep.checked 0016 0017 property alias cfg_show_requestLogout: logout.checked 0018 property alias cfg_show_requestShutDown: shutdown.checked 0019 property alias cfg_show_requestReboot: reboot.checked 0020 0021 property alias cfg_show_lockScreen: lock.checked 0022 property alias cfg_show_switchUser: switchUser.checked 0023 property alias cfg_show_suspendToDisk: hibernate.checked 0024 property alias cfg_show_suspendToRam: sleep.checked 0025 0026 Kirigami.FormLayout { 0027 SessionManagement { 0028 id: session 0029 } 0030 0031 QtControls.CheckBox { 0032 id: logout 0033 Kirigami.FormData.label: i18nc("Heading for a list of actions (leave, lock, switch user, hibernate, suspend)", "Show actions:") 0034 text: i18n("Log Out") 0035 icon.name: "system-log-out" 0036 // ensure user cannot have all options unchecked 0037 enabled: session.canLogout && (checkedOptions > 1 || !checked) 0038 } 0039 QtControls.CheckBox { 0040 id: shutdown 0041 text: i18n("Shut Down") 0042 icon.name: "system-shutdown" 0043 enabled: session.canShutdown && (checkedOptions > 1 || !checked) 0044 } 0045 QtControls.CheckBox { 0046 id: reboot 0047 text: i18n("Restart") 0048 icon.name: "system-reboot" 0049 enabled: session.canReboot && (checkedOptions > 1 || !checked) 0050 } 0051 QtControls.CheckBox { 0052 id: lock 0053 text: i18n("Lock") 0054 icon.name: "system-lock-screen" 0055 enabled: session.canLock && (checkedOptions > 1 || !checked) 0056 } 0057 QtControls.CheckBox { 0058 id: switchUser 0059 text: i18n("Switch User") 0060 icon.name: "system-switch-user" 0061 enabled: checkedOptions > 1 || !checked 0062 } 0063 QtControls.CheckBox { 0064 id: hibernate 0065 text: i18n("Hibernate") 0066 icon.name: "system-suspend-hibernate" 0067 enabled: session.canHibernate && (checkedOptions > 1 || !checked) 0068 } 0069 QtControls.CheckBox { 0070 id: sleep 0071 text: i18nc("Suspend to RAM", "Sleep") 0072 icon.name: "system-suspend" 0073 enabled: session.canSuspend && (checkedOptions > 1 || !checked) 0074 } 0075 } 0076 }