Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qvxmousehandler_p.h
Go to the documentation of this file.
1
// Copyright (C) 2025 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
QVXMOUSEHANDLER_P_H
5
#
define
QVXMOUSEHANDLER_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
<
QObject
>
19
#
include
<
QString
>
20
#
include
<
QPoint
>
21
#
include
<
QEvent
>
22
#
include
<
QLoggingCategory
>
23
24
#
include
<
private
/
qglobal_p
.
h
>
25
26
#
include
<
memory
>
27
28
QT_BEGIN_NAMESPACE
29
30
Q_DECLARE_LOGGING_CATEGORY
(
qLcVxMouse
)
31
32
class
QSocketNotifier;
33
34
class
QVxMouseHandler
:
public
QObject
35
{
36
Q_OBJECT
37
public
:
38
static
std
::
unique_ptr
<
QVxMouseHandler
>
create
(
const
QString
&
device
,
const
QString
&
specification
);
39
~
QVxMouseHandler
();
40
41
void
readMouseData
();
42
43
signals
:
44
void
handleMouseEvent
(
int
x
,
int
y
,
Qt
::
MouseButtons
buttons
,
45
Qt
::
MouseButton
button
,
QEvent
::
Type
type
);
46
47
private
:
48
QVxMouseHandler(
const
QString &device,
int
fd,
bool
compression,
int
jitterLimit);
49
50
void
sendMouseEvent();
51
QString m_device;
52
int
m_fd;
53
QSocketNotifier *m_notify =
nullptr
;
54
int
m_x = 0, m_y = 0;
55
int
m_prevx = 0, m_prevy = 0;
56
bool
m_compression;
57
Qt::MouseButtons m_buttons;
58
Qt::MouseButton m_button;
59
QEvent::Type m_eventType;
60
int
m_jitterLimitSquared;
61
bool
m_prevInvalid =
true
;
62
};
63
64
QT_END_NAMESPACE
65
66
#
endif
// QVXMOUSEHANDLER_P_H
QVxMouseHandler
Definition
qvxmousehandler_p.h:35
QVxMouseHandler::~QVxMouseHandler
~QVxMouseHandler()
Definition
qvxmousehandler.cpp:69
QVxMouseHandler::readMouseData
void readMouseData()
Definition
qvxmousehandler.cpp:96
Q_LOGGING_CATEGORY
Q_LOGGING_CATEGORY(lcEventDispatcher, "qt.eventdispatcher")
Q_DECLARE_LOGGING_CATEGORY
QT_BEGIN_NAMESPACE Q_DECLARE_LOGGING_CATEGORY(lcEventDispatcher)
qtbase
src
platformsupport
input
vxmouse
qvxmousehandler_p.h
Generated on
for Qt by
1.14.0