From 7be95673a1266b306fd76cd43fe894f144b0e72d Mon Sep 17 00:00:00 2001 From: "Bradley T. Hughes" Date: Wed, 13 May 2009 15:25:53 +0200 Subject: Support multiple touch targets in QGraphicsView This required a larger change to the kernel and graphicsview directories to make this as efficient as possible: 1. QTouchEvent::TouchPoint becomes the base for QGraphicsSceneTouchEvent::TouchPoint - this means there is one private for every touch point, and we can store both the screen and scene coordinates in one place. Converting a QTouchEvent to QGraphicsSceneTouchEvent becomes nothing more than casting the QTouchEvent::TouchPoints to QGraphicsSceneTouchEvent::TouchPoints. 2. The logic that we use in QApplication to convert WM_TOUCH* messages to QTouchEvents is essentially duplicated (with some minor changes) to QGraphicsScene so that it can support mulitple touch item targets. I will have to investigate how I can perhaps merge some of the duplicated code. QEvent::GraphicsSceneTouchBegin propagation is not implemented yet, and will come in a later commit --- src/gui/graphicsview/qgraphicsview_p.h | 3 --- 1 file changed, 3 deletions(-) (limited to 'src/gui/graphicsview/qgraphicsview_p.h') diff --git a/src/gui/graphicsview/qgraphicsview_p.h b/src/gui/graphicsview/qgraphicsview_p.h index daaeca2b19..779b638db8 100644 --- a/src/gui/graphicsview/qgraphicsview_p.h +++ b/src/gui/graphicsview/qgraphicsview_p.h @@ -183,9 +183,6 @@ public: const QRegion &exposedRegion) const; QPointF mapToScene(const QPointF &point) const; - void touchBeginEvent(QTouchEvent *event); - void touchUpdateEvent(QTouchEvent *event); - void touchEndEvent(QTouchEvent *event); }; QT_END_NAMESPACE -- cgit v1.2.1