mirror of
https://github.com/Qortal/Brooklyn.git
synced 2025-02-23 15:45:53 +00:00
54 lines
1.0 KiB
C
54 lines
1.0 KiB
C
|
/*
|
||
|
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;
|
||
|
};
|