diff options
author | Shawn Rutledge <shawn.rutledge@qt.io> | 2016-03-14 17:37:36 +0100 |
---|---|---|
committer | Shawn Rutledge <shawn.rutledge@qt.io> | 2017-01-04 12:02:33 +0000 |
commit | 4038160a32dcb51d843fb751a9a9340e7cc2bb63 (patch) | |
tree | 544532ebf707154f32baa01fe590d263845d205d /src/quick/items/qquickmultipointtoucharea_p.h | |
parent | 63a03f6772b8c008c3b7e6d17e484f585244a5e7 (diff) |
MultiPointTouchArea.TouchPoint: add rotation, uniqueId and ellipseDiameters
So far uniqueId and rotation are mainly applicable to TUIO.
Deprecate the area property in favor of ellipseDiameters.
Also improve the mpta-crosshairs manual test to show this information.
Change-Id: I16ea6618ae21ce66dac45638d6e2bb3c0a3b1818
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
Diffstat (limited to 'src/quick/items/qquickmultipointtoucharea_p.h')
-rw-r--r-- | src/quick/items/qquickmultipointtoucharea_p.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/quick/items/qquickmultipointtoucharea_p.h b/src/quick/items/qquickmultipointtoucharea_p.h index 541eb04764..25e1056712 100644 --- a/src/quick/items/qquickmultipointtoucharea_p.h +++ b/src/quick/items/qquickmultipointtoucharea_p.h @@ -67,10 +67,13 @@ class Q_AUTOTEST_EXPORT QQuickTouchPoint : public QObject { Q_OBJECT Q_PROPERTY(int pointId READ pointId NOTIFY pointIdChanged) + Q_PROPERTY(QPointingDeviceUniqueId uniqueId READ uniqueId NOTIFY uniqueIdChanged REVISION 9) Q_PROPERTY(bool pressed READ pressed NOTIFY pressedChanged) Q_PROPERTY(qreal x READ x NOTIFY xChanged) Q_PROPERTY(qreal y READ y NOTIFY yChanged) + Q_PROPERTY(QSizeF ellipseDiameters READ ellipseDiameters NOTIFY ellipseDiametersChanged REVISION 9) Q_PROPERTY(qreal pressure READ pressure NOTIFY pressureChanged) + Q_PROPERTY(qreal rotation READ rotation NOTIFY rotationChanged REVISION 9) Q_PROPERTY(QVector2D velocity READ velocity NOTIFY velocityChanged) Q_PROPERTY(QRectF area READ area NOTIFY areaChanged) @@ -86,6 +89,7 @@ public: : _id(0), _x(0.0), _y(0.0), _pressure(0.0), + _rotation(0), _qmlDefined(qmlDefined), _inUse(false), _pressed(false), @@ -97,15 +101,24 @@ public: int pointId() const { return _id; } void setPointId(int id); + QPointingDeviceUniqueId uniqueId() const { return _uniqueId; } + void setUniqueId(const QPointingDeviceUniqueId &id); + qreal x() const { return _x; } void setX(qreal x); qreal y() const { return _y; } void setY(qreal y); + QSizeF ellipseDiameters() const { return _ellipseDiameters; } + void setEllipseDiameters(const QSizeF &d); + qreal pressure() const { return _pressure; } void setPressure(qreal pressure); + qreal rotation() const { return _rotation; } + void setRotation(qreal r); + QVector2D velocity() const { return _velocity; } void setVelocity(const QVector2D &velocity); @@ -141,9 +154,12 @@ public: Q_SIGNALS: void pressedChanged(); void pointIdChanged(); + Q_REVISION(9) void uniqueIdChanged(); void xChanged(); void yChanged(); + Q_REVISION(9) void ellipseDiametersChanged(); void pressureChanged(); + Q_REVISION(9) void rotationChanged(); void velocityChanged(); void areaChanged(); void startXChanged(); @@ -159,6 +175,8 @@ private: qreal _x; qreal _y; qreal _pressure; + qreal _rotation; + QSizeF _ellipseDiameters; QVector2D _velocity; QRectF _area; bool _qmlDefined; @@ -170,6 +188,7 @@ private: qreal _previousY; qreal _sceneX; qreal _sceneY; + QPointingDeviceUniqueId _uniqueId; }; class QQuickGrabGestureEvent : public QObject |