Plasma5Support

keyservice.h
1/*
2 SPDX-FileCopyrightText: 2009 Aaron Seigo <aseigo@kde.org>
3
4 SPDX-License-Identifier: LGPL-2.1-or-later
5*/
6
7#pragma once
8
9#include <Plasma5Support/Service>
10#include <Plasma5Support/ServiceJob>
11
13
14class KeyService : public Plasma5Support::Service
15{
17
18public:
19 KeyService(QObject *parent, KModifierKeyInfo *keyInfo, Qt::Key key);
20 void lock(bool lock);
21 void latch(bool lock);
22
23protected:
24 Plasma5Support::ServiceJob *createJob(const QString &operation, QMap<QString, QVariant> &parameters) override;
25
26private:
27 KModifierKeyInfo *m_keyInfo;
28 Qt::Key m_key;
29};
30
31class LockKeyJob : public Plasma5Support::ServiceJob
32{
34
35public:
36 LockKeyJob(KeyService *service, const QMap<QString, QVariant> &parameters);
37 void start() override;
38
39private:
40 KeyService *m_service;
41};
42
43class LatchKeyJob : public Plasma5Support::ServiceJob
44{
46
47public:
48 LatchKeyJob(KeyService *service, const QMap<QString, QVariant> &parameters);
49 void start() override;
50
51private:
52 KeyService *m_service;
53};
This class provides jobs for use with Plasma5Support::Service.
Definition servicejob.h:39
QVariantMap parameters() const
This class provides a generic API for write access to settings or services.
Definition service.h:78
Q_OBJECTQ_OBJECT
QObject * parent() const const
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

KDE's Doxygen guidelines are available online.