Plasma5Support
keystate.cpp
17 qWarning("KeyStatesEngine is deprecated. Use KeyState from org.kde.plasma.private.keyboardindicator instead.");
47 data.insert(QString::fromLatin1(kli18n("Pressed").untranslatedText()), m_keyInfo.isKeyPressed(it.key()));
48 data.insert(QString::fromLatin1(kli18n("Latched").untranslatedText()), m_keyInfo.isKeyLatched(it.key()));
49 data.insert(QString::fromLatin1(kli18n("Locked").untranslatedText()), m_keyInfo.isKeyLocked(it.key()));
57 data.insert(QString::fromLatin1(kli18n("Pressed").untranslatedText()), m_keyInfo.isButtonPressed(it2.key()));
64 connect(&m_keyInfo, &KModifierKeyInfo::buttonPressed, this, &KeyStatesEngine::mouseButtonPressed);
84 setData(QString::fromLatin1(m_mods.value(key).untranslatedText()), QString::fromLatin1(kli18n("Pressed").untranslatedText()), state);
91 setData(QString::fromLatin1(m_mods.value(key).untranslatedText()), QString::fromLatin1(kli18n("Latched").untranslatedText()), state);
98 setData(QString::fromLatin1(m_mods.value(key).untranslatedText()), QString::fromLatin1(kli18n("Locked").untranslatedText()), state);
105 setData(QString::fromLatin1(m_buttons.value(button).untranslatedText()), QString::fromLatin1(kli18n("Pressed").untranslatedText()), state);
113 data.insert(QString::fromLatin1(kli18n("Pressed").untranslatedText()), m_keyInfo.isKeyPressed(key));
114 data.insert(QString::fromLatin1(kli18n("Latched").untranslatedText()), m_keyInfo.isKeyLatched(key));
115 data.insert(QString::fromLatin1(kli18n("Locked").untranslatedText()), m_keyInfo.isKeyLocked(key));
void keyPressed(Qt::Key key, bool pressed)
void keyAdded(Qt::Key key)
void keyRemoved(Qt::Key key)
void keyLocked(Qt::Key key, bool locked)
bool knowsKey(Qt::Key key) const
void keyLatched(Qt::Key key, bool latched)
bool isButtonPressed(Qt::MouseButton button) const
bool isKeyLatched(Qt::Key key) const
bool isKeyPressed(Qt::Key key) const
bool isKeyLocked(Qt::Key key) const
void buttonPressed(Qt::MouseButton button, bool pressed)
#define K_PLUGIN_CLASS_WITH_JSON(classname, jsonFile)
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
virtual Q_INVOKABLE Service * serviceForSource(const QString &source)
Definition dataengine.cpp:58
void setData(const QString &source, const QVariant &value)
Sets a value for a data source.
Definition dataengine.cpp:121
This class provides a generic API for write access to settings or services.
Definition service.h:78
const QList< QKeySequence > & end()
QCA_EXPORT void init()
const_iterator constBegin() const const
const_iterator constEnd() const const
bool contains(const Key &key) const const
T value(const Key &key, const T &defaultValue) const const
QMetaObject::Connection connect(const QObject *sender, PointerToMemberFunction signal, Functor functor)
QString fromLatin1(QByteArrayView str)
Key_Shift
LeftButton
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 16:59:38 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 16:59:38 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.