24 ****************************************************************************/ |
24 ****************************************************************************/ |
25 |
25 |
26 #ifndef HBGESTURES_P_H |
26 #ifndef HBGESTURES_P_H |
27 #define HBGESTURES_P_H |
27 #define HBGESTURES_P_H |
28 |
28 |
|
29 #include "hbtapgesture.h" |
|
30 #include "hbpointrecorder_p.h" |
|
31 |
|
32 #include "hbglobal.h" |
|
33 |
29 #include <QPointF> |
34 #include <QPointF> |
30 #include <QObject> |
35 #include <QObject> |
31 #include <QGraphicsView> |
36 #include <QGraphicsView> |
|
37 |
|
38 #if QT_VERSION >= 0x040700 |
|
39 #include <QElapsedTimer> |
|
40 #define ELAPSED_TIMER QElapsedTimer |
|
41 #else |
|
42 #include <QTime> |
|
43 #define ELAPSED_TIMER QTime |
|
44 #endif |
32 |
45 |
33 const qreal HbDefaultPanThreshold = 1.0; // mm |
46 const qreal HbDefaultPanThreshold = 1.0; // mm |
34 const qreal HbPanVelocityUpdateThreshold = 3.3; // mm |
47 const qreal HbPanVelocityUpdateThreshold = 3.3; // mm |
35 |
48 |
36 const qreal HbDefaultTapRadius = 3.3; //mm |
49 const qreal HbDefaultTapRadius = 3.3; //mm |
65 |
77 |
66 return QPointF(); |
78 return QPointF(); |
67 } |
79 } |
68 }; |
80 }; |
69 |
81 |
|
82 class HB_CORE_PRIVATE_EXPORT HbPanGesturePrivate |
|
83 { |
|
84 public: |
|
85 QPointF mStartPos; |
|
86 |
|
87 QPointF mSceneStartPos; |
|
88 QPointF mSceneLastOffset; |
|
89 QPointF mSceneOffset; |
|
90 |
|
91 // for the recognizer |
|
92 QPointF mDeltaSinceLastTimeStamp; |
|
93 QPointF mSceneDeltaSinceLastTimeStamp; |
|
94 qint64 mLastTimeStamp; |
|
95 |
|
96 HbPointRecorder mAxisX; |
|
97 HbPointRecorder mAxisY; |
|
98 HbPointRecorder mSceneAxisX; |
|
99 HbPointRecorder mSceneAxisY; |
|
100 |
|
101 qreal mThresholdSquare; |
|
102 |
|
103 bool mIgnoreMouseEvents; |
|
104 int mFollowedTouchPointId; |
|
105 |
|
106 ELAPSED_TIMER mTime; |
|
107 }; |
|
108 |
|
109 class HB_CORE_PRIVATE_EXPORT HbPinchGesturePrivate |
|
110 { |
|
111 public: |
|
112 bool mIsNewSequence; |
|
113 |
|
114 qreal mSceneTotalRotationAngle; |
|
115 qreal mSceneLastRotationAngle; |
|
116 qreal mSceneRotationAngle; |
|
117 |
|
118 QPointF mSceneStartCenterPoint; |
|
119 QPointF mSceneLastCenterPoint; |
|
120 QPointF mSceneCenterPoint; |
|
121 }; |
|
122 |
|
123 class HB_CORE_PRIVATE_EXPORT HbSwipeGesturePrivate |
|
124 { |
|
125 public: |
|
126 QPointF mStartPos; |
|
127 QPointF mSceneStartPos; |
|
128 |
|
129 qint64 mStartTime; |
|
130 |
|
131 qreal mSceneSwipeAngle; |
|
132 |
|
133 HbPointRecorder mAxisX; |
|
134 HbPointRecorder mAxisY; |
|
135 |
|
136 ELAPSED_TIMER mTime; |
|
137 }; |
|
138 |
|
139 |
|
140 class HB_CORE_PRIVATE_EXPORT HbTapAndHoldGesturePrivate |
|
141 { |
|
142 public: |
|
143 HbTapAndHoldGesturePrivate() : mTimerID(0) {} |
|
144 |
|
145 QPointF mScenePos; |
|
146 int mRunningTime; |
|
147 int mTimerID; |
|
148 }; |
|
149 |
|
150 class HB_CORE_PRIVATE_EXPORT HbTapGesturePrivate |
|
151 { |
|
152 public: |
|
153 HbTapGesturePrivate() : mTimerId(0) {} |
|
154 |
|
155 QPointF mStartPos; |
|
156 QPointF mSceneStartPos; |
|
157 QPointF mScenePosition; |
|
158 HbTapGesture::TapStyleHint mTapStyleHint; |
|
159 int mTimerId; |
|
160 }; |
|
161 |
70 #endif // HBGESTURES_P_H |
162 #endif // HBGESTURES_P_H |