Warning, /plasma/plasma-sdk/plasmoidviewer/qmlpackages/shell/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 QtControls
0009 import QtQuick.Layouts 1.0
0010 
0011 import org.kde.kquickcontrols 2.0
0012 import org.kde.kirigami 2.14 as Kirigami
0013 import org.kde.plasma.plasmoid 2.0
0014 
0015 Kirigami.ScrollablePage {
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         QtControls.Label {
0027             Layout.fillWidth: true
0028             text: i18nd("plasma_shell_org.kde.plasma.desktop", "This shortcut will activate the applet as though it had been clicked.")
0029             wrapMode: Text.WordWrap
0030         }
0031         KeySequenceItem {
0032             id: button
0033             keySequence: Plasmoid.globalShortcut
0034             onKeySequenceChanged: {
0035                 if (keySequence != Plasmoid.globalShortcut) {
0036                     root.configurationChanged();
0037                 }
0038             }
0039         }
0040     }
0041 }