KGlobalAccel

kglobalaccel_win.h
1 /*
2  This file is part of the KDE libraries
3  SPDX-FileCopyrightText: 2001, 2002 Ellis Whitehead <[email protected]>
4 
5  SPDX-License-Identifier: LGPL-2.0-or-later
6 */
7 
8 #ifndef _KGLOBALACCEL_WIN_H
9 #define _KGLOBALACCEL_WIN_H
10 
11 #include <QWidget>
12 
14 /**
15  * @internal
16  *
17  * The KGlobalAccel private class handles grabbing of global keys,
18  * and notification of when these keys are pressed.
19  */
20 class KGlobalAccelImpl : public QWidget
21 {
22  Q_OBJECT
23 
24 public:
26 
27 public:
28  /**
29  * This function registers or unregisters a certain key for global capture,
30  * depending on \b grab.
31  *
32  * Before destruction, every grabbed key will be released, so this
33  * object does not need to do any tracking.
34  *
35  * \param key the Qt keycode to grab or release.
36  * \param grab true to grab they key, false to release the key.
37  *
38  * \return true if successful, otherwise false.
39  */
40  bool grabKey(int key, bool grab);
41 
42  /// Enable/disable all shortcuts. There will not be any grabbed shortcuts at this point.
43  void setEnabled(bool);
44 
45 private:
46  bool winEvent(MSG *message, long *result);
47 
48  GlobalShortcutsRegistry *m_owner;
49  bool m_enabled;
50 };
51 
52 #endif // _KGLOBALACCEL_WIN_H
void setEnabled(bool)
Enable/disable all shortcuts. There will not be any grabbed shortcuts at this point.
Global Shortcut Registry.
QPixmap grab(const QRect &rectangle)
Q_OBJECTQ_OBJECT
bool grabKey(int key, bool grab)
This function registers or unregisters a certain key for global capture, depending on grab...
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Sun May 16 2021 22:53:45 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.