summaryrefslogtreecommitdiffstats
path: root/src/gui/graphicsview
diff options
context:
space:
mode:
authorBradley T. Hughes <bradley.hughes@nokia.com>2009-06-11 09:12:43 (GMT)
committerBradley T. Hughes <bradley.hughes@nokia.com>2009-06-11 09:14:43 (GMT)
commit666299f9074235185aa7372729c84a2639224601 (patch)
tree2928f7299077d37211b78f2ae7a44e180d9e37cb /src/gui/graphicsview
parent1c6c353ecc23a01368d785794d130131e3fb2553 (diff)
downloadQt-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')
-rw-r--r--src/gui/graphicsview/qgraphicssceneevent.cpp30
-rw-r--r--src/gui/graphicsview/qgraphicssceneevent.h13
2 files changed, 22 insertions, 21 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;
}
/*!
diff --git a/src/gui/graphicsview/qgraphicssceneevent.h b/src/gui/graphicsview/qgraphicssceneevent.h
index 3c53f36..3eb5cce 100644
--- a/src/gui/graphicsview/qgraphicssceneevent.h
+++ b/src/gui/graphicsview/qgraphicssceneevent.h
@@ -60,6 +60,7 @@ QT_MODULE(Gui)
class QMimeData;
class QPointF;
class QSizeF;
+class QRectF;
class QWidget;
class QGraphicsSceneEventPrivate;
@@ -393,14 +394,14 @@ public:
QPointF lastScreenPos() const;
void setLastScreenPos(const QPointF &lastScreenPos);
- QSizeF size() const;
- void setSize(const QSizeF &size);
+ QRectF rect() const;
+ void setRect(const QRectF &rect);
- QSizeF sceneSize() const;
- void setSceneSize(const QSizeF &sceneSize);
+ QRectF sceneRect() const;
+ void setSceneRect(const QRectF &sceneRect);
- QSizeF screenSize() const;
- void setScreenSize(const QSizeF &screenSize);
+ QRectF screenRect() const;
+ void setScreenRect(const QRectF &screenRect);
qreal pressure() const;
void setPressure(qreal pressure);