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
qgesture_p.h
Go to the documentation of this file.
1
// Copyright (C) 2016 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
// Qt-Security score:significant reason:default
4
5
#
ifndef
QGESTURE_P_H
6
#
define
QGESTURE_P_H
7
8
//
9
// W A R N I N G
10
// -------------
11
//
12
// This file is not part of the Qt API. It exists for the convenience
13
// of other Qt classes. This header file may change from version to
14
// version without notice, or even be removed.
15
//
16
// We mean it.
17
//
18
19
#
include
<
QtWidgets
/
private
/
qtwidgetsglobal_p
.
h
>
20
#
include
"qpoint.h"
21
#
include
"qgesture.h"
22
#
include
"qbasictimer.h"
23
#
include
"qelapsedtimer.h"
24
#
include
"private/qobject_p.h"
25
26
#
ifndef
QT_NO_GESTURES
27
28
QT_BEGIN_NAMESPACE
29
30
class
QGesturePrivate
:
public
QObjectPrivate
31
{
32
Q_DECLARE_PUBLIC(QGesture)
33
34
public
:
35
QGesturePrivate
()
36
:
gestureType
(
Qt
::
CustomGesture
),
state
(
Qt
::
NoGesture
),
37
isHotSpotSet
(
false
),
gestureCancelPolicy
(0)
38
{
39
}
40
41
Qt
::
GestureType
gestureType
;
42
Qt
::
GestureState
state
;
43
QPointF
hotSpot
;
44
QPointF
sceneHotSpot
;
45
uint
isHotSpotSet
: 1;
46
uint
gestureCancelPolicy
: 2;
47
};
48
49
class
QPanGesturePrivate
:
public
QGesturePrivate
50
{
51
Q_DECLARE_PUBLIC(QPanGesture)
52
53
public
:
54
QPanGesturePrivate
()
55
:
acceleration
(0),
xVelocity
(0),
yVelocity
(0),
pointCount
(2)
56
{
57
}
58
59
qreal
horizontalVelocity
()
const
{
return
xVelocity
; }
60
void
setHorizontalVelocity
(
qreal
value
) {
xVelocity
=
value
; }
61
qreal
verticalVelocity
()
const
{
return
yVelocity
; }
62
void
setVerticalVelocity
(
qreal
value
) {
yVelocity
=
value
; }
63
64
QPointF
lastOffset
;
65
QPointF
offset
;
66
QPoint
startPosition
;
67
qreal
acceleration
;
68
qreal
xVelocity
;
69
qreal
yVelocity
;
70
int
pointCount
;
// ### fixme Qt 5.5: Add accessor to QPanGesture.
71
};
72
73
class
QPinchGesturePrivate
:
public
QGesturePrivate
74
{
75
Q_DECLARE_PUBLIC(QPinchGesture)
76
77
public
:
78
QPinchGesturePrivate
()
79
:
totalScaleFactor
(1),
lastScaleFactor
(1),
scaleFactor
(1),
80
totalRotationAngle
(0),
lastRotationAngle
(0),
rotationAngle
(0),
81
isNewSequence
(
true
)
82
{
83
}
84
85
QPinchGesture
::
ChangeFlags
totalChangeFlags
;
86
QPinchGesture
::
ChangeFlags
changeFlags
;
87
88
QPointF
startCenterPoint
;
89
QPointF
lastCenterPoint
;
90
QPointF
centerPoint
;
91
92
qreal
totalScaleFactor
;
93
qreal
lastScaleFactor
;
94
qreal
scaleFactor
;
95
96
qreal
totalRotationAngle
;
97
qreal
lastRotationAngle
;
98
qreal
rotationAngle
;
99
100
bool
isNewSequence
;
101
QPointF
startPosition
[2];
102
};
103
104
class
QSwipeGesturePrivate
:
public
QGesturePrivate
105
{
106
Q_DECLARE_PUBLIC(QSwipeGesture)
107
108
public
:
109
enum
State
{
110
NoGesture
,
111
Started
,
112
ThreePointsReached
113
};
114
115
QSwipeGesturePrivate
()
116
:
horizontalDirection
(
QSwipeGesture
::
NoDirection
),
117
verticalDirection
(
QSwipeGesture
::
NoDirection
),
118
swipeAngle
(0),
119
state
(
NoGesture
),
velocityValue
(0)
120
{
121
}
122
123
qreal
velocity
()
const
{
return
velocityValue; }
124
void
setVelocity
(qreal value) { velocityValue = value; }
125
126
QSwipeGesture
::
SwipeDirection
horizontalDirection
;
127
QSwipeGesture
::
SwipeDirection
verticalDirection
;
128
qreal
swipeAngle
;
129
130
QPointF
lastPositions
[3];
131
State
state
;
132
qreal
velocityValue
;
133
QElapsedTimer
time
;
134
};
135
136
class
QTapGesturePrivate
:
public
QGesturePrivate
137
{
138
Q_DECLARE_PUBLIC(QTapGesture)
139
140
public
:
141
QTapGesturePrivate
()
142
{
143
}
144
145
QPointF
position
;
146
};
147
148
class
QTapAndHoldGesturePrivate
:
public
QGesturePrivate
149
{
150
Q_DECLARE_PUBLIC(QTapAndHoldGesture)
151
152
public
:
153
QTapAndHoldGesturePrivate
()
154
{
155
}
156
157
QPointF
position
;
158
QBasicTimer
tapAndHoldTimer
;
159
static
std
::chrono::milliseconds
Timeout
;
160
};
161
162
QT_END_NAMESPACE
163
164
#
endif
// QT_NO_GESTURES
165
166
#
endif
// QGESTURE_P_H
QGesturePrivate
Definition
qgesture_p.h:31
QGesturePrivate::hotSpot
QPointF hotSpot
Definition
qgesture_p.h:43
QGesturePrivate::state
Qt::GestureState state
Definition
qgesture_p.h:42
QGesturePrivate::sceneHotSpot
QPointF sceneHotSpot
Definition
qgesture_p.h:44
QGesturePrivate::gestureCancelPolicy
uint gestureCancelPolicy
Definition
qgesture_p.h:46
QGesturePrivate::isHotSpotSet
uint isHotSpotSet
Definition
qgesture_p.h:45
QMacPanGestureRecognizer
Definition
qmacgesturerecognizer_p.h:51
QMacPanGestureRecognizer::reset
void reset(QGesture *gesture) override
This function is called by Qt to reset a given gesture.
Definition
qmacgesturerecognizer.cpp:237
QMacPanGestureRecognizer::create
QGesture * create(QObject *target) override
This function is called by Qt to create a new QGesture object for the given target (QWidget or QGraph...
Definition
qmacgesturerecognizer.cpp:137
QMacPanGestureRecognizer::timerEvent
void timerEvent(QTimerEvent *ev) override
This event handler can be reimplemented in a subclass to receive timer events for the object.
Definition
qmacgesturerecognizer.cpp:150
QMacPinchGestureRecognizer
Definition
qmacgesturerecognizer_p.h:41
QMacPinchGestureRecognizer::reset
void reset(QGesture *gesture) override
This function is called by Qt to reset a given gesture.
Definition
qmacgesturerecognizer.cpp:114
QMacPinchGestureRecognizer::create
QGesture * create(QObject *target) override
This function is called by Qt to create a new QGesture object for the given target (QWidget or QGraph...
Definition
qmacgesturerecognizer.cpp:59
QMacPinchGestureRecognizer::QMacPinchGestureRecognizer
QMacPinchGestureRecognizer()
Definition
qmacgesturerecognizer.cpp:55
QPanGesturePrivate
Definition
qgesture_p.h:50
QPanGesturePrivate::startPosition
QPoint startPosition
Definition
qgesture_p.h:66
QPanGesturePrivate::pointCount
int pointCount
Definition
qgesture_p.h:70
QPanGesturePrivate::offset
QPointF offset
Definition
qgesture_p.h:65
QPanGesturePrivate::acceleration
qreal acceleration
Definition
qgesture_p.h:67
QPanGesturePrivate::yVelocity
qreal yVelocity
Definition
qgesture_p.h:69
QPanGesturePrivate::xVelocity
qreal xVelocity
Definition
qgesture_p.h:68
QPinchGesturePrivate
Definition
qgesture_p.h:74
QPinchGesturePrivate::totalScaleFactor
qreal totalScaleFactor
Definition
qgesture_p.h:92
QPinchGesturePrivate::lastScaleFactor
qreal lastScaleFactor
Definition
qgesture_p.h:93
QPinchGesturePrivate::startPosition
QPointF startPosition[2]
Definition
qgesture_p.h:101
QPinchGesturePrivate::startCenterPoint
QPointF startCenterPoint
Definition
qgesture_p.h:88
QPinchGesturePrivate::lastRotationAngle
qreal lastRotationAngle
Definition
qgesture_p.h:97
QPinchGesturePrivate::centerPoint
QPointF centerPoint
Definition
qgesture_p.h:90
QPinchGesturePrivate::lastCenterPoint
QPointF lastCenterPoint
Definition
qgesture_p.h:89
QPinchGesturePrivate::isNewSequence
bool isNewSequence
Definition
qgesture_p.h:100
QPinchGesturePrivate::totalRotationAngle
qreal totalRotationAngle
Definition
qgesture_p.h:96
QPinchGesturePrivate::scaleFactor
qreal scaleFactor
Definition
qgesture_p.h:94
QPinchGesturePrivate::rotationAngle
qreal rotationAngle
Definition
qgesture_p.h:98
QPointF
\inmodule QtCore\reentrant
Definition
qpoint.h:232
QPoint
\inmodule QtCore\reentrant
Definition
qpoint.h:30
QSwipeGesturePrivate
Definition
qgesture_p.h:105
QSwipeGesturePrivate::velocityValue
qreal velocityValue
Definition
qgesture_p.h:132
QSwipeGesturePrivate::time
QElapsedTimer time
Definition
qgesture_p.h:133
QSwipeGesturePrivate::lastPositions
QPointF lastPositions[3]
Definition
qgesture_p.h:130
QSwipeGesturePrivate::setVelocity
void setVelocity(qreal value)
Definition
qgesture_p.h:124
QSwipeGesturePrivate::swipeAngle
qreal swipeAngle
Definition
qgesture_p.h:128
QSwipeGesturePrivate::QSwipeGesturePrivate
QSwipeGesturePrivate()
Definition
qgesture_p.h:115
QSwipeGesturePrivate::velocity
qreal velocity() const
Definition
qgesture_p.h:123
QSwipeGesturePrivate::state
State state
Definition
qgesture_p.h:131
QTapAndHoldGesturePrivate
Definition
qgesture_p.h:149
QTapAndHoldGesturePrivate::tapAndHoldTimer
QBasicTimer tapAndHoldTimer
Definition
qgesture_p.h:158
QTapAndHoldGesturePrivate::Timeout
static std::chrono::milliseconds Timeout
Definition
qgesture_p.h:159
QTapGesturePrivate
Definition
qgesture_p.h:137
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qsequentialanimationgroup.cpp:47
std
[33]
Definition
src_corelib_tools_qhash.cpp:421
qtbase
src
widgets
kernel
qgesture_p.h
Generated on
for Qt by
1.18.0