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
qevdevmousehandler_p.h
Go to the documentation of this file.
1
// Copyright (C) 2020 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
QEVDEVMOUSEHANDLER_P_H
5
#
define
QEVDEVMOUSEHANDLER_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
(
qLcEvdevMouse
)
31
32
class
QSocketNotifier;
33
34
class
QEvdevMouseHandler
:
public
QObject
35
{
36
Q_OBJECT
37
public
:
38
static
std
::
unique_ptr
<
QEvdevMouseHandler
>
create
(
const
QString
&
device
,
const
QString
&
specification
);
39
~
QEvdevMouseHandler
();
40
41
void
readMouseData
();
42
43
signals
:
44
void
handleMouseEvent
(
int
x
,
int
y
,
bool
abs
,
Qt
::
MouseButtons
buttons
,
45
Qt
::
MouseButton
button
,
QEvent
::
Type
type
);
46
void
handleWheelEvent
(QPoint delta);
47
48
private
:
49
QEvdevMouseHandler(
const
QString &device,
int
fd,
bool
abs,
bool
compression,
int
jitterLimit);
50
51
void
sendMouseEvent();
52
#
ifndef
Q_OS_VXWORKS
53
bool
getHardwareMaximum();
54
#
endif
55
void
detectHiResWheelSupport();
56
57
QString m_device;
58
int
m_fd;
59
QSocketNotifier *m_notify =
nullptr
;
60
int
m_x = 0, m_y = 0;
61
int
m_prevx = 0, m_prevy = 0;
62
bool
m_abs;
63
bool
m_compression;
64
bool
m_hiResWheel =
false
;
65
bool
m_hiResHWheel =
false
;
66
Qt::MouseButtons m_buttons;
67
Qt::MouseButton m_button;
68
QEvent::Type m_eventType;
69
int
m_jitterLimitSquared;
70
bool
m_prevInvalid =
true
;
71
int
m_hardwareWidth;
72
int
m_hardwareHeight;
73
qreal m_hardwareScalerY;
74
qreal m_hardwareScalerX;
75
};
76
77
QT_END_NAMESPACE
78
79
#
endif
// QEVDEVMOUSEHANDLER_P_H
QEvdevMouseHandler
Definition
qevdevmousehandler_p.h:35
QEvdevMouseHandler::~QEvdevMouseHandler
~QEvdevMouseHandler()
Definition
qevdevmousehandler.cpp:90
QEvdevMouseHandler::readMouseData
void readMouseData()
Definition
qevdevmousehandler.cpp:180
QEvdevMouseHandler::handleWheelEvent
void handleWheelEvent(QPoint delta)
TEST_BIT
#define TEST_BIT(array, bit)
Definition
qevdevmousehandler.cpp:27
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
EV_SYN
#define EV_SYN
Definition
qvxtouchhandler.cpp:24
qtbase
src
platformsupport
input
evdevmouse
qevdevmousehandler_p.h
Generated on
for Qt by
1.18.0