diff options
author | Bradley T. Hughes <bradley.hughes@nokia.com> | 2009-06-23 10:45:26 (GMT) |
---|---|---|
committer | Bradley T. Hughes <bradley.hughes@nokia.com> | 2009-06-23 10:45:26 (GMT) |
commit | 5e21e9b357a51eb6b3fa349dccf63e33c621fc72 (patch) | |
tree | fad2769e30786b098c2986232e1bbd8bbeb69ebe /src/gui/kernel/qevent.h | |
parent | f11f41fe9e507d1f3eb8994960f0226f229bc76c (diff) | |
download | Qt-5e21e9b357a51eb6b3fa349dccf63e33c621fc72.zip Qt-5e21e9b357a51eb6b3fa349dccf63e33c621fc72.tar.gz Qt-5e21e9b357a51eb6b3fa349dccf63e33c621fc72.tar.bz2 |
Add functions to report normalized positions in QTouchEvent::TouchPoint
This introduces normalizedPos(), startNormalizedPos(), and
lastNormalizedPos() in QTouchEvent::TouchPoint, and must be set by the
implementation before being fed into Qt.
We are assuming and hoping that these functions will make it easier to
implement certain types of gestures (especially on a touchpad).
Diffstat (limited to 'src/gui/kernel/qevent.h')
-rw-r--r-- | src/gui/kernel/qevent.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/gui/kernel/qevent.h b/src/gui/kernel/qevent.h index ce3f0c0..04303fb 100644 --- a/src/gui/kernel/qevent.h +++ b/src/gui/kernel/qevent.h @@ -786,6 +786,10 @@ public: QPointF startScreenPos() const; QPointF lastScreenPos() const; + QPointF normalizedPos() const; + QPointF startNormalizedPos() const; + QPointF lastNormalizedPos() const; + QRectF rect() const; QRectF sceneRect() const; QRectF screenRect() const; @@ -798,12 +802,15 @@ public: void setPos(const QPointF &pos); void setScenePos(const QPointF &scenePos); void setScreenPos(const QPointF &screenPos); + void setNormalizedPos(const QPointF &normalizedPos); void setStartPos(const QPointF &startPos); void setStartScenePos(const QPointF &startScenePos); void setStartScreenPos(const QPointF &startScreenPos); + void setStartNormalizedPos(const QPointF &startNormalizedPos); void setLastPos(const QPointF &lastPos); void setLastScenePos(const QPointF &lastScenePos); void setLastScreenPos(const QPointF &lastScreenPos); + void setLastNormalizedPos(const QPointF &lastNormalizedPos); void setRect(const QRectF &rect); void setSceneRect(const QRectF &sceneRect); void setScreenRect(const QRectF &screenRect); |