diff options
author | Michal Guminiak <michal.guminiak@teleca.com> | 2010-04-12 16:21:12 +0200 |
---|---|---|
committer | Tomas Junnonen <tomas.junnonen@nokia.com> | 2010-04-21 09:56:09 +0300 |
commit | 6e2ee74ae199a0b254562764a8a7b33904152dbe (patch) | |
tree | ed6f5807e5c8dd6060c9c10b03a550264a5d88d5 /src/corelib/widgets/mpannablewidget_p.h | |
parent | 42aa81a9d8d9e64f05bcf5378e4c613161e374be (diff) |
Changes: DuiPannableWidget is now going to use pan gestures
RevBy: To be done
Details: Further changes to DuiPannableWidget. The class is now
going to use QPanGesture object to handle panning. This will
also fix issue with DuiPannableWidget inside DuiPannableWidget.
Diffstat (limited to 'src/corelib/widgets/mpannablewidget_p.h')
-rw-r--r-- | src/corelib/widgets/mpannablewidget_p.h | 34 |
1 files changed, 26 insertions, 8 deletions
diff --git a/src/corelib/widgets/mpannablewidget_p.h b/src/corelib/widgets/mpannablewidget_p.h index a7007e78..d99d2029 100644 --- a/src/corelib/widgets/mpannablewidget_p.h +++ b/src/corelib/widgets/mpannablewidget_p.h @@ -28,11 +28,9 @@ class QPoint; class QEvent; -class QTransform; class QGraphicsItem; class QGraphicsSceneMouseEvent; class MPhysics2DPanning; -class MStyle; class MPannableWidgetGlass; class MPannableWidgetPrivate : public MWidgetControllerPrivate @@ -42,10 +40,6 @@ public: explicit MPannableWidgetPrivate(); virtual ~MPannableWidgetPrivate(); - enum states {Wait, Evaluate, Pan}; - int state; - int itemCount; - QGraphicsSceneMouseEvent pressEvent; MPhysics2DPanning *physics; @@ -59,6 +53,8 @@ public: }; QList<struct resentItem> resentList; + + int pressDeliveryTimerId; public: /*! @@ -69,14 +65,36 @@ public: QGraphicsSceneMouseEvent *event); /*! - * \brief Method used for resetting state of the pannable widget. + * \brief Method used for resetting state of the physics engine. */ - void resetState(); + void resetPhysics(); + + /*! + * \brief Method used for resetting glass and mouse grabber. + */ + void resetMouseGrabber(); /*! * \brief Method used for delivering event to interested widget. */ void deliverMouseEvent(QGraphicsSceneMouseEvent *event); + + /*! + * \brief Method used for delivering initial mouse press. It will set + * the mouseGrabber if it is necessary at this point. + */ + void deliverPressEvent(); + + /*! + * \brief Method used to start a timer which will trigger the delivery + * of initial mouse press event. + */ + void initialPressStartTimer(); + + /*! + * \brief Method used for cancelling the mouse press delivery timer. + */ + void initialPressStopTimer(); }; #endif |