Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Toggle main menu visibility
Loading...
Searching...
No Matches
qvxtouchhandler_p.h
Go to the documentation of this file.
1
// Copyright (C) 2024 The Qt Company Ltd.
2
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4
#
ifndef
QVXTOUCHHANDLER_P_H
5
#
define
QVXTOUCHHANDLER_P_H
6
7
//
8
// W A R N I N G
9
// -------------
10
//
11
// This file is not part of the Qt API. It exists purely as an
12
// implementation detail. This header file may change from version to
13
// version without notice, or even be removed.
14
//
15
// We mean it.
16
//
17
18
#
include
<
QtGui
/
private
/
qtguiglobal_p
.
h
>
19
#
include
<
QObject
>
20
#
include
<
QString
>
21
#
include
<
QList
>
22
#
include
<
QHash
>
23
#
include
<
QThread
>
24
#
include
<
QLoggingCategory
>
25
#
include
<
QtCore
/
private
/
qthread_p
.
h
>
26
#
include
<
qpa
/
qwindowsysteminterface
.
h
>
27
#
include
<
QtInputSupport
/
private
/
qtouchfilter_p
.
h
>
28
29
QT_BEGIN_NAMESPACE
30
31
Q_DECLARE_LOGGING_CATEGORY
(
qLcVxTouch
)
32
33
class
QSocketNotifier;
34
class
QPointingDevice;
35
class
QVxTouchScreenData;
36
class
QVxTouchScreenHandlerThread
;
37
38
class
QVxTouchScreenHandler
:
public
QObject
39
{
40
Q_OBJECT
41
42
public
:
43
explicit
QVxTouchScreenHandler
(
const
QString
&
device
,
const
QString
&
spec
=
QString
(),
QObject
*
parent
=
nullptr
);
44
~
QVxTouchScreenHandler
();
45
46
QPointingDevice *
touchDevice
()
const
;
47
48
bool
isFiltered
()
const
;
49
50
void
readData
();
51
52
signals
:
53
void
touchPointsUpdated
();
54
55
private
:
56
friend
class
QVxTouchScreenData;
57
friend
class
QVxTouchScreenHandlerThread
;
58
59
void
registerPointingDevice();
60
void
unregisterPointingDevice();
61
62
QSocketNotifier *m_notify;
63
int
m_fd;
64
QVxTouchScreenData *d;
65
QPointingDevice *m_device;
66
};
67
68
class
QVxTouchScreenHandlerThread
:
public
QDaemonThread
69
{
70
Q_OBJECT
71
public
:
72
explicit
QVxTouchScreenHandlerThread
(
const
QString
&
device
,
const
QString
&
spec
,
QObject
*
parent
=
nullptr
);
73
~
QVxTouchScreenHandlerThread
();
74
void
run
()
override
;
75
76
bool
isPointingDeviceRegistered
()
const
;
77
78
bool
eventFilter
(QObject *object, QEvent *event)
override
;
79
80
void
scheduleTouchPointUpdate
();
81
82
signals
:
83
void
touchDeviceRegistered
();
84
85
private
:
86
Q_INVOKABLE
void
notifyTouchDeviceRegistered();
87
88
void
filterAndSendTouchPoints();
89
QRect targetScreenGeometry()
const
;
90
91
QString m_device;
92
QString m_spec;
93
QVxTouchScreenHandler
*m_handler;
94
bool
m_touchDeviceRegistered;
95
96
bool
m_touchUpdatePending;
97
QWindow *m_filterWindow;
98
99
struct
FilteredTouchPoint {
100
QTouchFilter x;
101
QTouchFilter y;
102
QWindowSystemInterface::TouchPoint touchPoint;
103
};
104
QHash<
int
, FilteredTouchPoint> m_filteredPoints;
105
106
float
m_touchRate;
107
};
108
109
QT_END_NAMESPACE
110
111
#
endif
// QVXTOUCHHANDLER_P_H
QOutputMapping
Definition
qoutputmapping_p.h:27
QOutputMapping::get
static QOutputMapping * get()
Definition
qoutputmapping.cpp:18
QOutputMapping::load
virtual bool load()
Definition
qoutputmapping.cpp:26
QVxTouchScreenHandlerThread
Definition
qvxtouchhandler_p.h:69
QVxTouchScreenHandlerThread::eventFilter
bool eventFilter(QObject *object, QEvent *event) override
Definition
qvxtouchhandler.cpp:816
QVxTouchScreenHandlerThread::~QVxTouchScreenHandlerThread
~QVxTouchScreenHandlerThread()
Definition
qvxtouchhandler.cpp:767
QVxTouchScreenHandlerThread::isPointingDeviceRegistered
bool isPointingDeviceRegistered() const
Definition
qvxtouchhandler.cpp:789
QVxTouchScreenHandlerThread::scheduleTouchPointUpdate
void scheduleTouchPointUpdate()
Definition
qvxtouchhandler.cpp:800
QVxTouchScreenHandlerThread::run
void run() override
Definition
qvxtouchhandler.cpp:773
QVxTouchScreenHandler
Definition
qvxtouchhandler_p.h:39
QVxTouchScreenHandler::touchDevice
QPointingDevice * touchDevice() const
Definition
qvxtouchhandler.cpp:339
QVxTouchScreenHandler::readData
void readData()
Definition
qvxtouchhandler.cpp:344
QVxTouchScreenHandler::isFiltered
bool isFiltered() const
Definition
qvxtouchhandler.cpp:334
QVxTouchScreenHandler::~QVxTouchScreenHandler
~QVxTouchScreenHandler()
Definition
qvxtouchhandler.cpp:324
ABS_MT_POSITION_X
#define ABS_MT_POSITION_X
Definition
qdevicediscovery_static.cpp:34
LONG_BITS
#define LONG_BITS
Definition
qdevicediscovery_static.cpp:40
ABS_MT_POSITION_Y
#define ABS_MT_POSITION_Y
Definition
qdevicediscovery_static.cpp:37
input_event_usec
#define input_event_usec
Definition
qevdevkeyboardhandler.cpp:31
input_event_sec
#define input_event_sec
Definition
qevdevkeyboardhandler.cpp:27
SYN_MT_REPORT
#define SYN_MT_REPORT
Definition
qevdevtouchhandler.cpp:76
ABS_MT_SLOT
#define ABS_MT_SLOT
Definition
qevdevtouchhandler.cpp:64
ABS_MT_TRACKING_ID
#define ABS_MT_TRACKING_ID
Definition
qevdevtouchhandler.cpp:70
ABS_MT_TOUCH_MAJOR
#define ABS_MT_TOUCH_MAJOR
Definition
qevdevtouchhandler.cpp:55
Q_LOGGING_CATEGORY
Q_LOGGING_CATEGORY(lcEventDispatcher, "qt.eventdispatcher")
Q_DECLARE_LOGGING_CATEGORY
QT_BEGIN_NAMESPACE Q_DECLARE_LOGGING_CATEGORY(lcQIORing)
SYN_REPORT
#define SYN_REPORT
Definition
qvxtouchhandler.cpp:23
BTN_TOUCH
#define BTN_TOUCH
Definition
qvxtouchhandler.cpp:29
EV_ABS
#define EV_ABS
Definition
qvxtouchhandler.cpp:26
ABS_Y
#define ABS_Y
Definition
qvxtouchhandler.cpp:28
ABS_MAX
#define ABS_MAX
Definition
qvxtouchhandler.cpp:30
EV_KEY
#define EV_KEY
Definition
qvxtouchhandler.cpp:25
ABS_X
#define ABS_X
Definition
qvxtouchhandler.cpp:27
input_event
EV_DEV_EVENT input_event
Definition
qvxtouchhandler.cpp:35
EV_SYN
#define EV_SYN
Definition
qvxtouchhandler.cpp:24
qtbase
src
platformsupport
input
vxtouch
qvxtouchhandler_p.h
Generated on
for Qt by
1.18.0