diff options
author | Bradley T. Hughes <bradley.hughes@nokia.com> | 2009-06-11 09:12:43 (GMT) |
---|---|---|
committer | Bradley T. Hughes <bradley.hughes@nokia.com> | 2009-06-11 09:14:43 (GMT) |
commit | 666299f9074235185aa7372729c84a2639224601 (patch) | |
tree | 2928f7299077d37211b78f2ae7a44e180d9e37cb /src/gui/graphicsview/qgraphicssceneevent.cpp | |
parent | 1c6c353ecc23a01368d785794d130131e3fb2553 (diff) | |
download | Qt-666299f9074235185aa7372729c84a2639224601.zip Qt-666299f9074235185aa7372729c84a2639224601.tar.gz Qt-666299f9074235185aa7372729c84a2639224601.tar.bz2 |
another API review round: change Q*TouchEvent size() functions to return rects instead
these are more useful, as already shown in the fingerpaint example
Diffstat (limited to 'src/gui/graphicsview/qgraphicssceneevent.cpp')
-rw-r--r-- | src/gui/graphicsview/qgraphicssceneevent.cpp | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/src/gui/graphicsview/qgraphicssceneevent.cpp b/src/gui/graphicsview/qgraphicssceneevent.cpp index c1052e3..1be8d0d 100644 --- a/src/gui/graphicsview/qgraphicssceneevent.cpp +++ b/src/gui/graphicsview/qgraphicssceneevent.cpp @@ -2249,51 +2249,51 @@ void QGraphicsSceneTouchEvent::TouchPoint::setLastScreenPos(const QPointF &lastS } /*! - Returns the size of this touch point. + Returns the rect for this touch point. */ -QSizeF QGraphicsSceneTouchEvent::TouchPoint::size() const +QRectF QGraphicsSceneTouchEvent::TouchPoint::rect() const { - return d->size; + return d->rect; } /*! \internal */ -void QGraphicsSceneTouchEvent::TouchPoint::setSize(const QSizeF &size) +void QGraphicsSceneTouchEvent::TouchPoint::setRect(const QRectF &rect) { if (d->ref != 1) d = d->detach(); - d->size = size; + d->rect = rect; } /*! - Returns the size of this touch point in scene coordinates. + Returns the rect of this touch point in scene coordinates. */ -QSizeF QGraphicsSceneTouchEvent::TouchPoint::sceneSize() const +QRectF QGraphicsSceneTouchEvent::TouchPoint::sceneRect() const { - return d->sceneSize; + return d->sceneRect; } /*! \internal */ -void QGraphicsSceneTouchEvent::TouchPoint::setSceneSize(const QSizeF &sceneSize) +void QGraphicsSceneTouchEvent::TouchPoint::setSceneRect(const QRectF &sceneRect) { if (d->ref != 1) d = d->detach(); - d->sceneSize = sceneSize; + d->sceneRect = sceneRect; } /*! - Returns the size of this touch point in screen coordinates. + Returns the rect of this touch point in screen coordinates. */ -QSizeF QGraphicsSceneTouchEvent::TouchPoint::screenSize() const +QRectF QGraphicsSceneTouchEvent::TouchPoint::screenRect() const { - return d->screenSize; + return d->screenRect; } /*! \internal */ -void QGraphicsSceneTouchEvent::TouchPoint::setScreenSize(const QSizeF &screenSize) +void QGraphicsSceneTouchEvent::TouchPoint::setScreenRect(const QRectF &screenRect) { if (d->ref != 1) d = d->detach(); - d->screenSize = screenSize; + d->screenRect = screenRect; } /*! |