KGlobalAccel

kglobalaccel_interface.cpp
1 /*
2  This file is part of the KDE libraries
3  SPDX-FileCopyrightText: 2015 Martin Gräßlin <[email protected]>
4 
5  SPDX-License-Identifier: LGPL-2.0-or-later
6 */
7 
8 #include "kglobalaccel_interface.h"
9 #include "globalshortcutsregistry.h"
10 
11 class KGlobalAccelInterface::Private
12 {
13 public:
14  Private(GlobalShortcutsRegistry *owner)
15  : owner(owner)
16  {
17  }
19 };
20 
21 KGlobalAccelInterface::KGlobalAccelInterface(QObject *owner)
22  : QObject(owner)
23  , d(new Private(qobject_cast<GlobalShortcutsRegistry *>(owner)))
24 {
25 }
26 
27 KGlobalAccelInterface::~KGlobalAccelInterface()
28 {
29 }
30 
31 void KGlobalAccelInterface::setRegistry(GlobalShortcutsRegistry *registry)
32 {
33  setParent(registry);
34  d->owner = registry;
35 }
36 
38 {
39 }
40 
42 {
43  return d->owner->keyPressed(keyQt);
44 }
45 
46 void KGlobalAccelInterface::grabKeys()
47 {
48  d->owner->grabKeys();
49 }
50 
51 void KGlobalAccelInterface::ungrabKeys()
52 {
53  d->owner->ungrabKeys();
54 }
virtual void syncWindowingSystem()
Allows implementing plugins to synchronize with the windowing system.
Global Shortcut Registry.
bool keyPressed(int keyQt)
called by the implementation to inform us about key presses
void setParent(QObject *parent)
T qobject_cast(QObject *object)
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.