summaryrefslogtreecommitdiffstats
path: root/src/gui/graphicsview/qgraphicsview_p.h
diff options
context:
space:
mode:
authorBradley T. Hughes <bradley.hughes@nokia.com>2009-06-05 14:49:21 (GMT)
committerBradley T. Hughes <bradley.hughes@nokia.com>2009-06-05 14:49:21 (GMT)
commit8d8b3e03cfc36c72665494eaa9bb461ff18072a0 (patch)
tree339041f1692b5f0fdef5a1558bd9534980bb2f4b /src/gui/graphicsview/qgraphicsview_p.h
parent12c315f34ca428c3da38716d2c071a8e94f2acf0 (diff)
downloadQt-8d8b3e03cfc36c72665494eaa9bb461ff18072a0.zip
Qt-8d8b3e03cfc36c72665494eaa9bb461ff18072a0.tar.gz
Qt-8d8b3e03cfc36c72665494eaa9bb461ff18072a0.tar.bz2
Some API changes after an API review round
1. Don't have QGraphicsSceneTouchEvent::TouchPoint inherit from QTouchEvent::TouchPoint. The only reason to do this is to support an implementation trick, which can be done another way (see below). This means we have to essentially duplicate the API in the GraphicsScene variant. 2. Don't use a list of pointers to touch points in QTouchEvent and QGraphicsSceneTouchEvent. This means we have to make the TouchPoint classes implicitly shared (and the effect of the previous trick of static_casting the widget touch point to a graphics-scene touch point can be emulated by sharing the d-pointers between the classes). 3. QEvent::RawTouch isn't really an event type, it's a backdoor. Remove it and export the bool qt_translateRawTouchEvent(QList<QTouchEvent::TouchPoint>, QWidget *) function instead. 4. Rename QTouchEvent::TouchPoint::area() to size() (which is more clear as to what the function returns). QGraphicsSceneTouchEvent::TouchPoint gains size(), sceneSize(), and screenSize() functions (the actual translation from screen to scene to item still needs to be implemented).
Diffstat (limited to 'src/gui/graphicsview/qgraphicsview_p.h')
-rw-r--r--src/gui/graphicsview/qgraphicsview_p.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gui/graphicsview/qgraphicsview_p.h b/src/gui/graphicsview/qgraphicsview_p.h
index 779b638..da1ca14 100644
--- a/src/gui/graphicsview/qgraphicsview_p.h
+++ b/src/gui/graphicsview/qgraphicsview_p.h
@@ -183,6 +183,9 @@ public:
const QRegion &exposedRegion) const;
QPointF mapToScene(const QPointF &point) const;
+ static void convertTouchEventToGraphicsSceneTouchEvent(QGraphicsViewPrivate *d,
+ QTouchEvent *originalEvent,
+ QGraphicsSceneTouchEvent *touchEvent);
};
QT_END_NAMESPACE