diff options
author | Michael Brasser <michael.brasser@nokia.com> | 2009-05-08 03:32:30 (GMT) |
---|---|---|
committer | Michael Brasser <michael.brasser@nokia.com> | 2009-05-08 03:32:30 (GMT) |
commit | 009e825d2da38b95fb2efbfbdefc4b58c8bf0fa8 (patch) | |
tree | 4c3283ff1362f6ecc92149e646580596a601957f /src/declarative/fx/qfxtransform.h | |
parent | f3164b608e83a3e2c54643aea984095edc275346 (diff) | |
download | Qt-009e825d2da38b95fb2efbfbdefc4b58c8bf0fa8.zip Qt-009e825d2da38b95fb2efbfbdefc4b58c8bf0fa8.tar.gz Qt-009e825d2da38b95fb2efbfbdefc4b58c8bf0fa8.tar.bz2 |
More Transform work.
Add Rotatation. Mark poorly documented transforms as internal for now.
Diffstat (limited to 'src/declarative/fx/qfxtransform.h')
-rw-r--r-- | src/declarative/fx/qfxtransform.h | 40 |
1 files changed, 35 insertions, 5 deletions
diff --git a/src/declarative/fx/qfxtransform.h b/src/declarative/fx/qfxtransform.h index 14bce9b..a3a1a83 100644 --- a/src/declarative/fx/qfxtransform.h +++ b/src/declarative/fx/qfxtransform.h @@ -109,6 +109,41 @@ private: }; QML_DECLARE_TYPE(QFxAxis); +class Q_DECLARATIVE_EXPORT QFxRotation : public QFxTransform +{ + Q_OBJECT + + Q_PROPERTY(qreal originX READ originX WRITE setOriginX) + Q_PROPERTY(qreal originY READ originY WRITE setOriginY) + Q_PROPERTY(qreal angle READ angle WRITE setAngle) +public: + QFxRotation(QObject *parent=0); + ~QFxRotation(); + + qreal originX() const; + void setOriginX(qreal); + + qreal originY() const; + void setOriginY(qreal); + + qreal angle() const; + void setAngle(qreal); + + virtual bool isIdentity() const; + virtual QSimpleCanvas::Matrix transform() const; + +private Q_SLOTS: + void update(); +private: + qreal _originX; + qreal _originY; + qreal _angle; + + mutable bool _dirty; + mutable QSimpleCanvas::Matrix _transform; +}; +QML_DECLARE_TYPE(QFxRotation); + class Q_DECLARATIVE_EXPORT QFxRotation3D : public QFxTransform { Q_OBJECT @@ -124,9 +159,6 @@ public: qreal angle() const; void setAngle(qreal); - qreal distanceToPlane() const; - void setDistanceToPlane(qreal); - virtual bool isIdentity() const; virtual QSimpleCanvas::Matrix transform() const; @@ -271,8 +303,6 @@ public: virtual QSimpleCanvas::Matrix transform() const; private: - void update(); - QPointF p; QSizeF s; QPointF p1, p2, p3, p4; |