Plasma5Support

keystate.h
1/*
2 SPDX-FileCopyrightText: 2009 Aaron Seigo <aseigo@kde.org>
3
4 SPDX-License-Identifier: LGPL-2.0-or-later
5*/
6
7#pragma once
8
9#include <Plasma5Support/DataEngine>
10
11#include <KLazyLocalizedString>
12#include <kmodifierkeyinfo.h>
13
14/**
15 * This engine provides the current state of the keyboard modifiers
16 * and mouse buttons, primarily useful for accessibility feature support.
17 */
19{
21
22public:
24 ~KeyStatesEngine() override;
25
26 void init();
27 Plasma5Support::Service *serviceForSource(const QString &source) override;
28
29protected:
30 // bool sourceRequestEvent(const QString &name);
31 // bool updateSourceEvent(const QString &source);
32
33protected Q_SLOTS:
34 void keyPressed(Qt::Key key, bool state);
35 void keyLatched(Qt::Key key, bool state);
36 void keyLocked(Qt::Key key, bool state);
37 void mouseButtonPressed(Qt::MouseButton button, bool state);
38 void keyAdded(Qt::Key key);
39 void keyRemoved(Qt::Key key);
40
41private:
42 KModifierKeyInfo m_keyInfo;
45};
This engine provides the current state of the keyboard modifiers and mouse buttons,...
Definition keystate.h:19
Plasma5Support::Service * serviceForSource(const QString &source) override
Definition keystate.cpp:69
Data provider for plasmoids (Plasma plugins)
Definition dataengine.h:45
This class provides a generic API for write access to settings or services.
Definition service.h:78
Q_OBJECTQ_OBJECT
Q_SLOTSQ_SLOTS
QObject * parent() const const
MouseButton
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:08:57 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.