KConfig

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
22/**
23 * Watches for changes made to standard shortcuts and notifies about those changes.
24 * @see KStandardShortcut::shortcutWatcher
25 * @since 5.91
26 */
27class KCONFIGGUI_EXPORT StandardShortcutWatcher : public QObject
28{
29 Q_OBJECT
30public:
32Q_SIGNALS:
33 /**
34 * The standardshortcut @p id was changed to @p shortcut
35 */
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
45/**
46 * Returns the global KStandardShortcutWatcher instance of this program.
47 * In addition to the notifying about changes it also keeps the information returned by the
48 * functions in @p KStandardShortcut up to date.
49 * The object is created by the first call to this function.
50 * @since 5.91
51 */
52KCONFIGGUI_EXPORT StandardShortcutWatcher *shortcutWatcher();
53}
54
55#endif
Watches for changes made to standard shortcuts and notifies about those changes.
void shortcutChanged(KStandardShortcut::StandardShortcut id, const QList< QKeySequence > &shortcut)
The standardshortcut id was changed to shortcut.
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.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:18:27 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.