Qt 4.8
qgesture_p.h
Go to the documentation of this file.
1 /****************************************************************************
2 **
3 ** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
4 ** Contact: http://www.qt-project.org/legal
5 **
6 ** This file is part of the QtGui module of the Qt Toolkit.
7 **
8 ** $QT_BEGIN_LICENSE:LGPL$
9 ** Commercial License Usage
10 ** Licensees holding valid commercial Qt licenses may use this file in
11 ** accordance with the commercial license agreement provided with the
12 ** Software or, alternatively, in accordance with the terms contained in
13 ** a written agreement between you and Digia. For licensing terms and
14 ** conditions see http://qt.digia.com/licensing. For further information
15 ** use the contact form at http://qt.digia.com/contact-us.
16 **
17 ** GNU Lesser General Public License Usage
18 ** Alternatively, this file may be used under the terms of the GNU Lesser
19 ** General Public License version 2.1 as published by the Free Software
20 ** Foundation and appearing in the file LICENSE.LGPL included in the
21 ** packaging of this file. Please review the following information to
22 ** ensure the GNU Lesser General Public License version 2.1 requirements
23 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
24 **
25 ** In addition, as a special exception, Digia gives you certain additional
26 ** rights. These rights are described in the Digia Qt LGPL Exception
27 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
28 **
29 ** GNU General Public License Usage
30 ** Alternatively, this file may be used under the terms of the GNU
31 ** General Public License version 3.0 as published by the Free Software
32 ** Foundation and appearing in the file LICENSE.GPL included in the
33 ** packaging of this file. Please review the following information to
34 ** ensure the GNU General Public License version 3.0 requirements will be
35 ** met: http://www.gnu.org/copyleft/gpl.html.
36 **
37 **
38 ** $QT_END_LICENSE$
39 **
40 ****************************************************************************/
41 
42 #ifndef QGESTURE_P_H
43 #define QGESTURE_P_H
44 
45 //
46 // W A R N I N G
47 // -------------
48 //
49 // This file is not part of the Qt API. It exists for the convenience
50 // of other Qt classes. This header file may change from version to
51 // version without notice, or even be removed.
52 //
53 // We mean it.
54 //
55 
56 #include "qrect.h"
57 #include "qpoint.h"
58 #include "qgesture.h"
59 #include "qelapsedtimer.h"
60 #include "private/qobject_p.h"
61 
62 #ifndef QT_NO_GESTURES
63 
65 
67 {
69 
70 public:
74  {
75  }
76 
83 };
84 
86 {
88 
89 public:
91  : acceleration(0), xVelocity(0), yVelocity(0)
92  {
93  }
94 
95  qreal horizontalVelocity() const { return xVelocity; }
96  void setHorizontalVelocity(qreal value) { xVelocity = value; }
97  qreal verticalVelocity() const { return yVelocity; }
98  void setVerticalVelocity(qreal value) { yVelocity = value; }
99 
106 };
107 
109 {
111 
112 public:
114  : totalChangeFlags(0), changeFlags(0),
115  totalScaleFactor(1), lastScaleFactor(1), scaleFactor(1),
116  totalRotationAngle(0), lastRotationAngle(0), rotationAngle(0),
117  isNewSequence(true)
118  {
119  }
120 
121  QPinchGesture::ChangeFlags totalChangeFlags;
122  QPinchGesture::ChangeFlags changeFlags;
123 
127 
131 
135 
137  QPointF startPosition[2];
138 };
139 
141 {
143 
144 public:
146  : horizontalDirection(QSwipeGesture::NoDirection),
147  verticalDirection(QSwipeGesture::NoDirection),
148  swipeAngle(0),
149  started(false), velocityValue(0)
150  {
151  }
152 
153  qreal velocity() const { return velocityValue; }
154  void setVelocity(qreal value) { velocityValue = value; }
155 
159 
160  QPoint lastPositions[3];
161  bool started;
164 };
165 
167 {
169 
170 public:
172  {
173  }
174 
176 };
177 
179 {
181 
182 public:
184  : timerId(0)
185  {
186  }
187 
189  int timerId;
190  static int Timeout;
191 };
192 
194 
195 #endif // QT_NO_GESTURES
196 
197 #endif // QGESTURE_P_H
qreal velocity() const
Definition: qgesture_p.h:153
The QPanGesture class describes a panning gesture made by the user.
Definition: qgesture.h:107
void setVerticalVelocity(qreal value)
Definition: qgesture_p.h:98
double qreal
Definition: qglobal.h:1193
#define QT_END_NAMESPACE
This macro expands to.
Definition: qglobal.h:90
QPinchGesture::ChangeFlags changeFlags
Definition: qgesture_p.h:122
void setHorizontalVelocity(qreal value)
Definition: qgesture_p.h:96
QPointF sceneHotSpot
Definition: qgesture_p.h:80
The QPointF class defines a point in the plane using floating point precision.
Definition: qpoint.h:214
The QTapAndHoldGesture class describes a tap-and-hold (aka LongTap) gesture made by the user...
Definition: qgesture.h:249
QPointF hotSpot
Definition: qgesture_p.h:79
qreal horizontalVelocity() const
Definition: qgesture_p.h:95
The QElapsedTimer class provides a fast way to calculate elapsed times.
Definition: qelapsedtimer.h:53
Qt::GestureState state
Definition: qgesture_p.h:78
#define QT_BEGIN_NAMESPACE
This macro expands to.
Definition: qglobal.h:89
The QPinchGesture class describes a pinch gesture made by the user.
Definition: qgesture.h:136
void setVelocity(qreal value)
Definition: qgesture_p.h:154
unsigned int uint
Definition: qglobal.h:996
GestureType
Definition: qnamespace.h:1759
QPointF startCenterPoint
Definition: qgesture_p.h:124
#define Q_DECLARE_PUBLIC(Class)
Definition: qglobal.h:2477
QSwipeGesture::SwipeDirection horizontalDirection
Definition: qgesture_p.h:156
The QGesture class represents a gesture, containing properties that describe the corresponding user i...
Definition: qgesture.h:64
Qt::GestureType gestureType
Definition: qgesture_p.h:77
The QPoint class defines a point in the plane using integer precision.
Definition: qpoint.h:53
Definition: qnamespace.h:54
qreal verticalVelocity() const
Definition: qgesture_p.h:97
QPinchGesture::ChangeFlags totalChangeFlags
Definition: qgesture_p.h:121
uint gestureCancelPolicy
Definition: qgesture_p.h:82
The QTapGesture class describes a tap gesture made by the user.
Definition: qgesture.h:232
The QSwipeGesture class describes a swipe gesture made by the user.
Definition: qgesture.h:207
SwipeDirection
This enum describes the possible directions for the gesture's motion along the horizontal and vertica...
Definition: qgesture.h:219
GestureState
Definition: qnamespace.h:1750
QElapsedTimer time
Definition: qgesture_p.h:163
QSwipeGesture::SwipeDirection verticalDirection
Definition: qgesture_p.h:157