diff options
author | Olivier Goffart <ogoffart@trolltech.com> | 2009-05-20 14:38:47 (GMT) |
---|---|---|
committer | Olivier Goffart <ogoffart@trolltech.com> | 2009-05-22 09:09:27 (GMT) |
commit | 8ad5020940f10d4ecc5c5e8b3b9656531cb84ef3 (patch) | |
tree | 08d6a137fb06db2c7e78de36d94f146ffd460d76 /src/gui/graphicsview/qgraphicswidget.h | |
parent | ab1b7f137350d6eeafec2a64e3c25a4b02be65a9 (diff) | |
download | Qt-8ad5020940f10d4ecc5c5e8b3b9656531cb84ef3.zip Qt-8ad5020940f10d4ecc5c5e8b3b9656531cb84ef3.tar.gz Qt-8ad5020940f10d4ecc5c5e8b3b9656531cb84ef3.tar.bz2 |
Add properties to QGraphicsItem to change the transformations component
With the new properties it is possible to easily animate.
Setting a transform using setTransform is incompatible with thoses
properties. Accessing thoses propeties if you set previously a
transform will give you the default values.
Acknowledged-by: Code made with Andreas. Documentation written with Thierry.
This still need a more in depth code review and documentation review.
But it is urgent to commit now because the Animation API integration depends on it.
Diffstat (limited to 'src/gui/graphicsview/qgraphicswidget.h')
-rw-r--r-- | src/gui/graphicsview/qgraphicswidget.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/gui/graphicsview/qgraphicswidget.h b/src/gui/graphicsview/qgraphicswidget.h index 34f1c5f..a5c9068 100644 --- a/src/gui/graphicsview/qgraphicswidget.h +++ b/src/gui/graphicsview/qgraphicswidget.h @@ -81,7 +81,14 @@ class Q_GUI_EXPORT QGraphicsWidget : public QObject, public QGraphicsItem, publi Q_PROPERTY(qreal opacity READ opacity WRITE setOpacity) Q_PROPERTY(QPointF pos READ pos WRITE setPos) Q_PROPERTY(QRectF geometry READ geometry WRITE setGeometry) - + Q_PROPERTY(QPointF transformOrigin READ transformOrigin WRITE setTransformOrigin) + Q_PROPERTY(qreal xRotation READ xRotation WRITE setXRotation) + Q_PROPERTY(qreal yRotation READ yRotation WRITE setYRotation) + Q_PROPERTY(qreal zRotation READ zRotation WRITE setZRotation) + Q_PROPERTY(qreal xScale READ xScale WRITE setXScale) + Q_PROPERTY(qreal yScale READ yScale WRITE setYScale) + Q_PROPERTY(qreal horizontalShear READ horizontalShear WRITE setHorizontalShear) + Q_PROPERTY(qreal verticalShear READ verticalShear WRITE setVerticalShear) public: QGraphicsWidget(QGraphicsItem *parent = 0, Qt::WindowFlags wFlags = 0); ~QGraphicsWidget(); |