You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
53 lines
1.0 KiB
53 lines
1.0 KiB
/* |
|
SPDX-FileCopyrightText: 2009 Aaron Seigo <aseigo@kde.org> |
|
|
|
SPDX-License-Identifier: LGPL-2.1-or-later |
|
*/ |
|
|
|
#pragma once |
|
|
|
#include <Plasma/Service> |
|
#include <Plasma/ServiceJob> |
|
|
|
class KModifierKeyInfo; |
|
|
|
class KeyService : public Plasma::Service |
|
{ |
|
Q_OBJECT |
|
|
|
public: |
|
KeyService(QObject *parent, KModifierKeyInfo *keyInfo, Qt::Key key); |
|
void lock(bool lock); |
|
void latch(bool lock); |
|
|
|
protected: |
|
Plasma::ServiceJob *createJob(const QString &operation, QMap<QString, QVariant> ¶meters) override; |
|
|
|
private: |
|
KModifierKeyInfo *m_keyInfo; |
|
Qt::Key m_key; |
|
}; |
|
|
|
class LockKeyJob : public Plasma::ServiceJob |
|
{ |
|
Q_OBJECT |
|
|
|
public: |
|
LockKeyJob(KeyService *service, const QMap<QString, QVariant> ¶meters); |
|
void start() override; |
|
|
|
private: |
|
KeyService *m_service; |
|
}; |
|
|
|
class LatchKeyJob : public Plasma::ServiceJob |
|
{ |
|
Q_OBJECT |
|
|
|
public: |
|
LatchKeyJob(KeyService *service, const QMap<QString, QVariant> ¶meters); |
|
void start() override; |
|
|
|
private: |
|
KeyService *m_service; |
|
};
|
|
|