KConfig 5.109.0
kstandardshortcutwatcher.h
1/*
2 SPDX-FileCopyrightText: 2022 David Redondo <kde@david-redondo.de>
3
4 SPDX-License-Identifier: LGPL-2.0-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
5*/
6
7#ifndef KSTANDARDSHORTCUTWATCHER_H
8#define KSTANDARDSHORTCUTWATCHER_H
9
10#include "kstandardshortcut.h"
11
12#include <QObject>
13
14#include <memory>
15
16#include <kconfiggui_export.h>
17
18namespace KStandardShortcut
19{
20class StandardShortcutWatcherPrivate;
21
27class KCONFIGGUI_EXPORT StandardShortcutWatcher : public QObject
28{
29 Q_OBJECT
30public:
32Q_SIGNALS:
36 void shortcutChanged(KStandardShortcut::StandardShortcut id, const QList<QKeySequence> &shortcut);
37
38private:
39 KCONFIGGUI_NO_EXPORT explicit StandardShortcutWatcher(QObject *parent = nullptr);
40
41 friend KCONFIGGUI_EXPORT StandardShortcutWatcher *shortcutWatcher();
42 std::unique_ptr<StandardShortcutWatcherPrivate> d;
43};
44
53}
54
55#endif
Watches for changes made to standard shortcuts and notifies about those changes.
Definition kstandardshortcutwatcher.h:28
void shortcutChanged(KStandardShortcut::StandardShortcut id, const QList< QKeySequence > &shortcut)
The standardshortcut id was changed to shortcut.
friend StandardShortcutWatcher * shortcutWatcher()
Returns the global KStandardShortcutWatcher instance of this program.
Convenient methods for access to the common accelerator keys in the key configuration.
StandardShortcutWatcher * shortcutWatcher()
Returns the global KStandardShortcutWatcher instance of this program.
StandardShortcut
Defines the identifier of all standard accelerators.
Definition kstandardshortcut.h:44