aboutsummaryrefslogtreecommitdiff
path: root/src/corelib/widgets/mpannablewidget_p.h
diff options
context:
space:
mode:
authorMichal Guminiak <michal.guminiak@teleca.com>2010-10-19 15:52:24 +0200
committerDominik Kapusta <dominik.kapusta@teleca.com>2010-11-10 09:03:47 +0100
commit92df7bab65a2d2fbc52b4d3a0a8887c5ea573b1e (patch)
treee1e3305c3da70f3e4e5bfb6d1e1f375ecb74b237 /src/corelib/widgets/mpannablewidget_p.h
parent9d2446c75a4cc1c3a320a1ee478d872e705ac4fd (diff)
Fixes: NB#182815 - Pannable widget is not transparent wrt. passing focus to child widgets
RevBy: Jarno Malmari, Michael Hasselmann, Dominik Kapusta ModifiedBy: Dominik Details: This patch completely removes mouse event replaying functionality in the pannable widget and moves necessary pieces to mscene. This should allow better focus handling in the scene and also should remove all crashes related to mouse event being bounced between pannable widgets when two of them are placed on the scene. Modifications: Provide MScenePrivate::init() and rename MScenePrivate::sentCancel to cancelSent.
Diffstat (limited to 'src/corelib/widgets/mpannablewidget_p.h')
-rw-r--r--src/corelib/widgets/mpannablewidget_p.h52
1 files changed, 0 insertions, 52 deletions
diff --git a/src/corelib/widgets/mpannablewidget_p.h b/src/corelib/widgets/mpannablewidget_p.h
index 6129623b..c703d977 100644
--- a/src/corelib/widgets/mpannablewidget_p.h
+++ b/src/corelib/widgets/mpannablewidget_p.h
@@ -43,9 +43,6 @@ public:
virtual QRectF boundingRect() const;
virtual void mousePressEvent(QGraphicsSceneMouseEvent *event);
- virtual void mouseMoveEvent(QGraphicsSceneMouseEvent *event);
- virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent *event);
- virtual void timerEvent(QTimerEvent* event);
virtual void cancelEvent(MCancelEvent *event);
virtual void tapAndHoldGestureEvent(QGestureEvent *event, QTapAndHoldGesture *gesture);
@@ -65,63 +62,14 @@ public:
MPhysics2DPanning *physics;
MPannableWidgetGlass *glass;
- QGraphicsItem *mouseGrabber;
- struct resentItem {
- QEvent::Type type;
- QPoint screenPos;
- Qt::MouseButton button;
- };
-
- QList<struct resentItem> resentList;
-
- int pressDeliveryTimerId;
bool panGestureCausedCancelEvent;
public:
/*!
- * \brief Internal method necessary to correctly handle event positions.
- */
- void translateEventToItemCoordinates(const QGraphicsItem *srcItem,
- const QGraphicsItem *destItem,
- QGraphicsSceneMouseEvent *event);
-
- /*!
* \brief Method used for resetting state of the physics engine.
*/
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();
-
- /*!
- * \brief Method used for getting an enabled parent pannable widget.
- */
- MPannableWidget* parentPannableWidget();
};
#endif