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/kernel/qevent.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/kernel/qevent.cpp')
-rw-r--r-- | src/gui/kernel/qevent.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/gui/kernel/qevent.cpp b/src/gui/kernel/qevent.cpp index 5b3c0fe..7a86dbf 100644 --- a/src/gui/kernel/qevent.cpp +++ b/src/gui/kernel/qevent.cpp @@ -3933,19 +3933,20 @@ void QTouchEvent::TouchPoint::setLastGlobalPos(const QPointF &lastGlobalPos) } /*! - Returns the size of this touch point. + Returns the rect for this touch point. The rect is centered around the point returned by pos(). + Note this function returns an empty rect if the device does not report touch point sizes. */ -QSizeF QTouchEvent::TouchPoint::size() const +QRectF QTouchEvent::TouchPoint::rect() const { - return d->screenSize; + return d->screenRect; } /*! \internal */ -void QTouchEvent::TouchPoint::setSize(const QSizeF &size) +void QTouchEvent::TouchPoint::setRect(const QRectF &rect) { if (d->ref != 1) d = d->detach(); - d->screenSize = size; + d->screenRect = rect; } /*! |