KDeclarative
10 property alias showClearButton: clearButton.visible
11 property alias modifierlessAllowed: _helper.modifierlessAllowed
12 property alias multiKeyShortcutsAllowed: _helper.multiKeyShortcutsAllowed
13 property var keySequence
26 property alias checkForConflictsAgainst: _helper.checkAgainstShortcutTypes
33 signal captureFinished()
39 function startCapturing() {
40 mainButton.checked =
true 43 KQuickControlsPrivate.KeySequenceHelper {
45 window: renderWindow(parent.Window.window)
47 if (isKeySequenceAvailable(keySequence)) {
48 root.keySequence = keySequence
50 mainButton.checked =
false;
51 root.captureFinished();
55 KQuickControlsPrivate.TranslationContext {
57 domain:
"kdeclarative5" 64 icon.name:
"configure" 72 const keys = _helper.isRecording ? _helper.currentKeySequence : parent.keySequence
74 if (keys == undefined || _helper.keySequenceIsEmpty(keys)) {
75 if (_helper.isRecording) {
76 text += _tr.i18nc(
"What the user inputs now will be taken as the new shortcut",
"Input")
78 text += _tr.i18nc(
"No shortcut defined",
"None");
81 text += _helper.keySequenceNativeText(keys)
83 return _helper.isRecording ? text.concat(
" ... ") : text.concat(
" ")
88 ToolTip.text: _tr.i18n(
"Click on the button, then enter the shortcut like you would in the program.\nExample for Ctrl+A: hold the Ctrl key and press A.")
93 mainButton.forceActiveFocus()
94 _helper.startRecording()
100 mainButton.checked =
false 107 Layout.fillHeight:
true 108 Layout.preferredWidth: height
109 onClicked: root.keySequence =
"" 112 icon.name:
Qt.application.layoutDirection ==
Qt.LeftToRight ?
"edit-clear-locationbar-rtl" :
"edit-clear-locationbar-ltr"
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Wed Jan 27 2021 22:38:28 by
doxygen 1.8.11 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.