Warning, /plasma/plasma-desktop/desktoppackage/contents/configuration/ConfigurationShortcuts.qml is written in an unsupported language. File is not indexed.

0001 /*
0002     SPDX-FileCopyrightText: 2013 Marco Martin <mart@kde.org>
0003 
0004     SPDX-License-Identifier: GPL-2.0-or-later
0005 */
0006 
0007 import QtQuick 2.0
0008 import QtQuick.Controls 2.3 as QQC2
0009 import QtQuick.Layouts 1.0
0010 import org.kde.kquickcontrols 2.0
0011 import org.kde.kirigami 2.14 as Kirigami
0012 import org.kde.plasma.plasmoid 2.0
0013 import org.kde.kcmutils as KCM
0014 
0015 KCM.SimpleKCM {
0016     id: root
0017 
0018     title: i18n("Shortcuts")
0019 
0020     signal configurationChanged
0021     function saveConfig() {
0022         Plasmoid.globalShortcut = button.keySequence
0023     }
0024 
0025     ColumnLayout {
0026         spacing: Kirigami.Units.smallSpacing
0027 
0028         QQC2.Label {
0029             Layout.fillWidth: true
0030             text: i18nd("plasma_shell_org.kde.plasma.desktop", "This shortcut will activate the applet as though it had been clicked.")
0031             textFormat: Text.PlainText
0032             wrapMode: Text.WordWrap
0033         }
0034 
0035         KeySequenceItem {
0036             id: button
0037             keySequence: Plasmoid.globalShortcut
0038             modifierOnlyAllowed: true
0039             onCaptureFinished: {
0040                 if (keySequence !== Plasmoid.globalShortcut) {
0041                     root.configurationChanged();
0042                 }
0043             }
0044         }
0045     }
0046 }