KWin
Loading...
Searching...
No Matches
fakeinputdevice.cpp
Go to the documentation of this file.
1/*
2 SPDX-FileCopyrightText: 2021 Vlad Zahorodnii <vlad.zahorodnii@kde.org>
3
4 SPDX-License-Identifier: GPL-2.0-or-later
5*/
6
7#include "fakeinputdevice.h"
8
9namespace KWin
10{
11static int s_lastDeviceId = 0;
12
14 : InputDevice(parent)
15 , m_name(QStringLiteral("Fake Input Device %1").arg(++s_lastDeviceId))
16{
17}
18
20{
21 return m_authenticated;
22}
23
24void FakeInputDevice::setAuthenticated(bool authenticated)
25{
26 m_authenticated = authenticated;
27}
28
30{
31 return QString();
32}
33
34QString FakeInputDevice::name() const
35{
36 return m_name;
37}
38
40{
41 return true;
42}
43
45{
46}
47
49{
50 return LEDs();
51}
52
54{
55}
56
58{
59 return true;
60}
61
63{
64 return true;
65}
66
68{
69 return false;
70}
71
73{
74 return true;
75}
76
78{
79 return false;
80}
81
83{
84 return false;
85}
86
88{
89 return false;
90}
91
93{
94 return false;
95}
96
97} // namespace KWin
98
99#include "moc_fakeinputdevice.cpp"
bool isPointer() const override
bool isKeyboard() const override
bool isTouchpad() const override
bool isTouch() const override
QString sysName() const override
bool isTabletPad() const override
bool isEnabled() const override
void setLeds(LEDs leds) override
QString name() const override
bool isTabletTool() const override
void setAuthenticated(bool authenticated)
FakeInputDevice(QObject *parent=nullptr)
LEDs leds() const override
bool isTabletModeSwitch() const override
bool isLidSwitch() const override
void setEnabled(bool enabled) override