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
"qrect.h"
21
#
include
"qpoint.h"
22
#
include
"qgesture.h"
23
#
include
"qbasictimer.h"
24
#
include
"qelapsedtimer.h"
25
#
include
"private/qobject_p.h"
26
27
#
ifndef
QT_NO_GESTURES
28
29
QT_BEGIN_NAMESPACE
30
31
class
QGesturePrivate
:
public
QObjectPrivate
32
{
33
Q_DECLARE_PUBLIC(QGesture)
34
35
public
:
36
QGesturePrivate
()
37
:
gestureType
(
Qt
::
CustomGesture
),
state
(
Qt
::
NoGesture
),
38
isHotSpotSet
(
false
),
gestureCancelPolicy
(0)
39
{
40
}
41
42
Qt
::
GestureType
gestureType
;
43
Qt
::
GestureState
state
;
44
QPointF
hotSpot
;
45
QPointF
sceneHotSpot
;
46
uint
isHotSpotSet
: 1;
47
uint
gestureCancelPolicy
: 2;
48
};
49
50
class
QPanGesturePrivate
:
public
QGesturePrivate
51
{
52
Q_DECLARE_PUBLIC(QPanGesture)
53
54
public
:
55
QPanGesturePrivate
()
56
:
acceleration
(0),
xVelocity
(0),
yVelocity
(0),
pointCount
(2)
57
{
58
}
59
60
qreal
horizontalVelocity
()
const
{
return
xVelocity
; }
61
void
setHorizontalVelocity
(
qreal
value
) {
xVelocity
=
value
; }
62
qreal
verticalVelocity
()
const
{
return
yVelocity
; }
63
void
setVerticalVelocity
(
qreal
value
) {
yVelocity
=
value
; }
64
65
QPointF
lastOffset
;
66
QPointF
offset
;
67
QPoint
startPosition
;
68
qreal
acceleration
;
69
qreal
xVelocity
;
70
qreal
yVelocity
;
71
int
pointCount
;
// ### fixme Qt 5.5: Add accessor to QPanGesture.
72
};
73
74
class
QPinchGesturePrivate
:
public
QGesturePrivate
75
{
76
Q_DECLARE_PUBLIC(QPinchGesture)
77
78
public
:
79
QPinchGesturePrivate
()
80
:
totalScaleFactor
(1),
lastScaleFactor
(1),
scaleFactor
(1),
81
totalRotationAngle
(0),
lastRotationAngle
(0),
rotationAngle
(0),
82
isNewSequence
(
true
)
83
{
84
}
85
86
QPinchGesture
::
ChangeFlags
totalChangeFlags
;
87
QPinchGesture
::
ChangeFlags
changeFlags
;
88
89
QPointF
startCenterPoint
;
90
QPointF
lastCenterPoint
;
91
QPointF
centerPoint
;
92
93
qreal
totalScaleFactor
;
94
qreal
lastScaleFactor
;
95
qreal
scaleFactor
;
96
97
qreal
totalRotationAngle
;
98
qreal
lastRotationAngle
;
99
qreal
rotationAngle
;
100
101
bool
isNewSequence
;
102
QPointF
startPosition
[2];
103
};
104
105
class
QSwipeGesturePrivate
:
public
QGesturePrivate
106
{
107
Q_DECLARE_PUBLIC(QSwipeGesture)
108
109
public
:
110
enum
State
{
111
NoGesture
,
112
Started
,
113
ThreePointsReached
114
};
115
116
QSwipeGesturePrivate
()
117
:
horizontalDirection
(
QSwipeGesture
::
NoDirection
),
118
verticalDirection
(
QSwipeGesture
::
NoDirection
),
119
swipeAngle
(0),
120
state
(
NoGesture
),
velocityValue
(0)
121
{
122
}
123
124
qreal
velocity
()
const
{
return
velocityValue; }
125
void
setVelocity
(qreal value) { velocityValue = value; }
126
127
QSwipeGesture
::
SwipeDirection
horizontalDirection
;
128
QSwipeGesture
::
SwipeDirection
verticalDirection
;
129
qreal
swipeAngle
;
130
131
QPointF
lastPositions
[3];
132
State
state
;
133
qreal
velocityValue
;
134
QElapsedTimer
time
;
135
};
136
137
class
QTapGesturePrivate
:
public
QGesturePrivate
138
{
139
Q_DECLARE_PUBLIC(QTapGesture)
140
141
public
:
142
QTapGesturePrivate
()
143
{
144
}
145
146
QPointF
position
;
147
};
148
149
class
QTapAndHoldGesturePrivate
:
public
QGesturePrivate
150
{
151
Q_DECLARE_PUBLIC(QTapAndHoldGesture)
152
153
public
:
154
QTapAndHoldGesturePrivate
()
155
{
156
}
157
158
QPointF
position
;
159
QBasicTimer
tapAndHoldTimer
;
160
static
int
Timeout
;
161
};
162
163
QT_END_NAMESPACE
164
165
#
endif
// QT_NO_GESTURES
166
167
#
endif
// QGESTURE_P_H
QGesturePrivate
Definition
qgesture_p.h:32
QGesturePrivate::hotSpot
QPointF hotSpot
Definition
qgesture_p.h:44
QGesturePrivate::state
Qt::GestureState state
Definition
qgesture_p.h:43
QGesturePrivate::sceneHotSpot
QPointF sceneHotSpot
Definition
qgesture_p.h:45
QGesturePrivate::gestureCancelPolicy
uint gestureCancelPolicy
Definition
qgesture_p.h:47
QGesturePrivate::isHotSpotSet
uint isHotSpotSet
Definition
qgesture_p.h:46
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:51
QPanGesturePrivate::startPosition
QPoint startPosition
Definition
qgesture_p.h:67
QPanGesturePrivate::pointCount
int pointCount
Definition
qgesture_p.h:71
QPanGesturePrivate::offset
QPointF offset
Definition
qgesture_p.h:66
QPanGesturePrivate::acceleration
qreal acceleration
Definition
qgesture_p.h:68
QPanGesturePrivate::yVelocity
qreal yVelocity
Definition
qgesture_p.h:70
QPanGesturePrivate::xVelocity
qreal xVelocity
Definition
qgesture_p.h:69
QPinchGesturePrivate
Definition
qgesture_p.h:75
QPinchGesturePrivate::totalScaleFactor
qreal totalScaleFactor
Definition
qgesture_p.h:93
QPinchGesturePrivate::lastScaleFactor
qreal lastScaleFactor
Definition
qgesture_p.h:94
QPinchGesturePrivate::startPosition
QPointF startPosition[2]
Definition
qgesture_p.h:102
QPinchGesturePrivate::startCenterPoint
QPointF startCenterPoint
Definition
qgesture_p.h:89
QPinchGesturePrivate::lastRotationAngle
qreal lastRotationAngle
Definition
qgesture_p.h:98
QPinchGesturePrivate::centerPoint
QPointF centerPoint
Definition
qgesture_p.h:91
QPinchGesturePrivate::lastCenterPoint
QPointF lastCenterPoint
Definition
qgesture_p.h:90
QPinchGesturePrivate::isNewSequence
bool isNewSequence
Definition
qgesture_p.h:101
QPinchGesturePrivate::totalRotationAngle
qreal totalRotationAngle
Definition
qgesture_p.h:97
QPinchGesturePrivate::scaleFactor
qreal scaleFactor
Definition
qgesture_p.h:95
QPinchGesturePrivate::rotationAngle
qreal rotationAngle
Definition
qgesture_p.h:99
QPointF
\inmodule QtCore\reentrant
Definition
qpoint.h:232
QPoint
\inmodule QtCore\reentrant
Definition
qpoint.h:30
QSwipeGesturePrivate
Definition
qgesture_p.h:106
QSwipeGesturePrivate::velocityValue
qreal velocityValue
Definition
qgesture_p.h:133
QSwipeGesturePrivate::time
QElapsedTimer time
Definition
qgesture_p.h:134
QSwipeGesturePrivate::lastPositions
QPointF lastPositions[3]
Definition
qgesture_p.h:131
QSwipeGesturePrivate::setVelocity
void setVelocity(qreal value)
Definition
qgesture_p.h:125
QSwipeGesturePrivate::swipeAngle
qreal swipeAngle
Definition
qgesture_p.h:129
QSwipeGesturePrivate::QSwipeGesturePrivate
QSwipeGesturePrivate()
Definition
qgesture_p.h:116
QSwipeGesturePrivate::velocity
qreal velocity() const
Definition
qgesture_p.h:124
QSwipeGesturePrivate::state
State state
Definition
qgesture_p.h:132
QTapAndHoldGesturePrivate
Definition
qgesture_p.h:150
QTapAndHoldGesturePrivate::tapAndHoldTimer
QBasicTimer tapAndHoldTimer
Definition
qgesture_p.h:159
QTapAndHoldGesturePrivate::Timeout
static int Timeout
Definition
qgesture_p.h:160
QTapGesturePrivate
Definition
qgesture_p.h:138
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qsequentialanimationgroup.cpp:47
qtbase
src
widgets
kernel
qgesture_p.h
Generated on
for Qt by
1.18.0