summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qevent_p.h
diff options
context:
space:
mode:
authorBradley T. Hughes <bradley.hughes@nokia.com>2009-05-13 13:25:53 (GMT)
committerBradley T. Hughes <bradley.hughes@nokia.com>2009-05-13 13:31:18 (GMT)
commit7be95673a1266b306fd76cd43fe894f144b0e72d (patch)
treeaef19868cf9e62a9f2efa5d341cc50dfa9baa086 /src/gui/kernel/qevent_p.h
parentd9c2a93e1dc1ea0248d72fdc7f1bb863f8847658 (diff)
downloadQt-7be95673a1266b306fd76cd43fe894f144b0e72d.zip
Qt-7be95673a1266b306fd76cd43fe894f144b0e72d.tar.gz
Qt-7be95673a1266b306fd76cd43fe894f144b0e72d.tar.bz2
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
Diffstat (limited to 'src/gui/kernel/qevent_p.h')
-rw-r--r--src/gui/kernel/qevent_p.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/kernel/qevent_p.h b/src/gui/kernel/qevent_p.h
index 8623c66..dd78c3e 100644
--- a/src/gui/kernel/qevent_p.h
+++ b/src/gui/kernel/qevent_p.h
@@ -98,11 +98,11 @@ public:
pressure(qreal(-1.))
{ }
- QPointer<QWidget> widget;
int id;
Qt::TouchPointState state;
QPointF pos, startPos, lastPos;
- QPointF globalPos, startGlobalPos, lastGlobalPos;
+ QPointF scenePos, startScenePos, lastScenePos;
+ QPointF screenPos, startScreenPos, lastScreenPos;
qreal pressure;
};