equal
deleted
inserted
replaced
21 ** If you have questions regarding the use of this file, please contact |
21 ** If you have questions regarding the use of this file, please contact |
22 ** Nokia at developer.feedback@nokia.com. |
22 ** Nokia at developer.feedback@nokia.com. |
23 ** |
23 ** |
24 ****************************************************************************/ |
24 ****************************************************************************/ |
25 |
25 |
|
26 #include "hbpangesture.h" |
|
27 |
26 #include "hbgestures_p.h" |
28 #include "hbgestures_p.h" |
27 #include "hbpangesture.h" |
|
28 #include "hbpangesture_p.h" |
|
29 #include "hbvelocitycalculator_p.h" |
29 #include "hbvelocitycalculator_p.h" |
30 |
30 |
31 #include <QPointF> |
31 #include <QPointF> |
32 #include <QVariant> |
32 #include <QVariant> |
33 #include <QDebug> |
33 #include <QDebug> |
125 \param parent Owner for gesture |
125 \param parent Owner for gesture |
126 |
126 |
127 */ |
127 */ |
128 HbPanGesture::HbPanGesture(QObject *parent) : QPanGesture(parent), d_ptr(new HbPanGesturePrivate) |
128 HbPanGesture::HbPanGesture(QObject *parent) : QPanGesture(parent), d_ptr(new HbPanGesturePrivate) |
129 { |
129 { |
130 d_ptr->q_ptr = this; |
|
131 d_ptr->mIgnoreMouseEvents = false; |
130 d_ptr->mIgnoreMouseEvents = false; |
|
131 d_ptr->mTime.start(); |
132 } |
132 } |
133 |
133 |
134 /*! |
134 /*! |
135 Constructor required by the shared d-pointer paradigm. |
135 Constructor required by the shared d-pointer paradigm. |
136 \param dd Private data |
136 \param dd Private data |
137 \param parent Owner for gesture |
137 \param parent Owner for gesture |
138 |
138 |
139 */ |
139 */ |
140 HbPanGesture::HbPanGesture( HbPanGesturePrivate &dd, QObject *parent ) |
140 HbPanGesture::HbPanGesture( HbPanGesturePrivate &dd, QObject *parent ) |
141 : QPanGesture(parent), d_ptr( &dd ) |
141 : QPanGesture(parent), d_ptr(&dd) |
142 { |
142 { |
143 d_ptr->q_ptr = this; |
143 hbWarning("Shared private not supported for HbPanGesture"); |
144 } |
144 } |
145 |
145 |
146 /*! |
146 /*! |
147 Destructor. |
147 Destructor. |
148 */ |
148 */ |
179 \sa setVelocity(), sceneVelocity() |
179 \sa setVelocity(), sceneVelocity() |
180 */ |
180 */ |
181 QPointF HbPanGesture::velocity() const |
181 QPointF HbPanGesture::velocity() const |
182 { |
182 { |
183 Q_D(const HbPanGesture); |
183 Q_D(const HbPanGesture); |
184 return HbVelocityCalculator( d->mAxisX, d->mAxisY ).velocity(QTime::currentTime()); |
184 return HbVelocityCalculator( d->mAxisX, d->mAxisY ).velocity( d->mLastTimeStamp ); |
185 } |
185 } |
186 |
186 |
187 /*! |
187 /*! |
188 Sets the panning velocity in global coordinates. |
188 Sets the panning velocity in global coordinates. |
189 This function is used by the framework gesture recognition logic, |
189 This function is used by the framework gesture recognition logic, |