aboutsummaryrefslogtreecommitdiff
path: root/src/corelib/widgets/mpannablewidget_p.h
diff options
context:
space:
mode:
authorMichal Guminiak <michal.guminiak@teleca.com>2010-04-12 16:21:12 +0200
committerTomas Junnonen <tomas.junnonen@nokia.com>2010-04-21 13:21:21 +0300
commit14b50c017c18c2095de68c94bc90ad04e1a36631 (patch)
tree0856d868336abf0a6685f7c08daf56abb8b10061 /src/corelib/widgets/mpannablewidget_p.h
parent05653ce4c6e9c2347236680a383f071de6d857d8 (diff)
Changes: DuiPannableWidget is now going to use pan gestures
RevBy: Tomas Junnonen 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.h34
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