KXmlGui
kkeysequencewidget.cpp
33static bool shortcutsConflictWith(const QList<QKeySequence> &shortcuts, const QKeySequence &needle)
71 bool promptstealStandardShortcut(KStandardShortcut::StandardShortcut std, const QKeySequence &seq);
78 bool promptStealGlobalShortcut(const std::vector<KeyConflictInfo> &shortcuts, const QKeySequence &sequence);
131 , checkAgainstShortcutTypes(KKeySequenceWidget::LocalShortcuts | KKeySequenceWidget::GlobalShortcuts)
146 "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."));
165bool KKeySequenceWidgetPrivate::promptStealLocalShortcut(const QList<QAction *> &actions, const QKeySequence &seq)
169 QString title = i18ncp("%1 is the number of conflicts", "Shortcut Conflict", "Shortcut Conflicts", listSize);
188 return KMessageBox::warningContinueCancel(q, message, title, KGuiItem(i18nc("@action:button", "Reassign"))) == KMessageBox::Continue;
269bool KKeySequenceWidgetPrivate::promptStealGlobalShortcut(const std::vector<KeyConflictInfo> &clashing, const QKeySequence &sequence)
283 QString message = i18ncp("%1 is the number of conflicts (hidden), %2 is the key sequence of the shortcut that is problematic",
295 return KMessageBox::warningContinueCancel(q, message, title, KGuiItem(i18nc("@action:button", "Reassign"))) == KMessageBox::Continue;
302 // on windows F12 is reserved by the debugger at all times, so we can't use it for a global shortcut
303 if (KKeySequenceWidget::GlobalShortcuts && keySequence.toString().contains(QLatin1String("F12"))) {
347bool KKeySequenceWidgetPrivate::promptstealStandardShortcut(KStandardShortcut::StandardShortcut std, const QKeySequence &seq)
357 return KMessageBox::warningContinueCancel(q, message, title, KGuiItem(i18nc("@action:button", "Reassign"))) == KMessageBox::Continue;
493void KKeySequenceWidget::setCheckActionCollections(const QList<KActionCollection *> &actionCollections)
static bool isShortcutsConfigurable(QAction *action)
Returns true if the given action's shortcuts may be configured by the user.
Definition kactioncollection.cpp:478
static QList< KGlobalShortcutInfo > globalShortcutsByKey(const QKeySequence &seq, MatchType type=Equal)
static void stealShortcutSystemwide(const QKeySequence &seq)
static bool isGlobalShortcutAvailable(const QKeySequence &seq, const QString &component=QString())
Q_INVOKABLE void startRecording()
bool multiKeyShortcutsAllowed
bool modifierOnlyAllowed
QKeySequence currentKeySequence
bool isRecording
bool modifierlessAllowed
void setModifierlessAllowed(bool allow)
This only applies to user input, not to setKeySequence().
Definition kkeysequencewidget.cpp:458
bool isKeySequenceAvailable(const QKeySequence &seq) const
Checks whether the key sequence seq is available to grab.
Definition kkeysequencewidget.cpp:463
void setModifierOnlyAllowed(bool allow)
Whether to allow modifier-only key sequences.
Definition kkeysequencewidget.cpp:483
void setClearButtonShown(bool show)
Set whether a small button to set an empty key sequence should be displayed next to the main input wi...
Definition kkeysequencewidget.cpp:488
void setMultiKeyShortcutsAllowed(bool)
Allow multikey shortcuts?
Definition kkeysequencewidget.cpp:448
void keySequenceChanged(const QKeySequence &seq)
This signal is emitted when the current key sequence has changed, be it by user input or programmatic...
bool isModifierlessAllowed()
Definition kkeysequencewidget.cpp:473
void setComponentName(const QString &componentName)
If the component using this widget supports shortcuts contexts, it has to set its component name so w...
Definition kkeysequencewidget.cpp:438
void applyStealShortcut()
Actually remove the shortcut that the user wanted to steal, from the action that was using it.
Definition kkeysequencewidget.cpp:531
void setKeySequence(const QKeySequence &seq, Validation val=NoValidate)
Set the key sequence.
Definition kkeysequencewidget.cpp:511
void setCheckActionCollections(const QList< KActionCollection * > &actionCollections)
Set a list of action collections to check against for conflictuous shortcut.
Definition kkeysequencewidget.cpp:493
void stealShortcut(const QKeySequence &seq, QAction *action)
This signal is emitted after the user agreed to steal a shortcut from an action.
void setCheckForConflictsAgainst(ShortcutTypes types)
Configure if the widget should check for conflicts with existing shortcuts.
Definition kkeysequencewidget.cpp:453
static QString removeAcceleratorMarker(const QString &label)
QString i18nc(const char *context, const char *text, const TYPE &arg...)
QString i18n(const char *text, const TYPE &arg...)
QString i18ncp(const char *context, const char *singular, const char *plural, const TYPE &arg...)
ButtonCode warningContinueCancel(QWidget *parent, const QString &text, const QString &title=QString(), const KGuiItem &buttonContinue=KStandardGuiItem::cont(), const KGuiItem &buttonCancel=KStandardGuiItem::cancel(), const QString &dontAskAgainName=QString(), Options options=Notify)
Continue
void error(QWidget *parent, const QString &text, const QString &title, const KGuiItem &buttonOk, Options options=Notify)
const QList< QKeySequence > & find()
QString label(StandardShortcut id)
StandardShortcut
void clicked(bool checked)
void setDown(bool)
void setIcon(const QIcon &icon)
void setText(const QString &text)
text
void addWidget(QWidget *widget, int stretch, Qt::Alignment alignment)
DynamicPropertyChange
Type type() const const
QIcon fromTheme(const QString &name)
NativeText
NoMatch
bool isEmpty() const const
SequenceMatch matches(const QKeySequence &seq) const const
QString toString(SequenceFormat format) const const
void setContentsMargins(const QMargins &margins)
void append(QList< T > &&value)
void clear()
bool isEmpty() const const
qsizetype size() const const
Q_EMITQ_EMIT
QMetaObject::Connection connect(const QObject *sender, PointerToMemberFunction signal, Functor functor)
QVariant property(const char *name) const const
bool setProperty(const char *name, QVariant &&value)
iterator insert(const T &value)
QString & append(QChar ch)
qsizetype size() const const
qsizetype size() const const
StrongFocus
void keySequence(QWidget *widget, const QKeySequence &keySequence)
virtual bool event(QEvent *event) override
void setFocusPolicy(Qt::FocusPolicy policy)
void setFocusProxy(QWidget *w)
void show()
void setToolTip(const QString &)
virtual void setVisible(bool visible)
QWidget * window() const const
QWindow * windowHandle() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:19:32 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:19:32 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.