Home · All Classes · Modules |
The QGraphicsRotation class provides a rotation transformation around a given axis. More...
Inherits QGraphicsTransform.
The QGraphicsRotation class provides a rotation transformation around a given axis.
You can provide the desired axis by assigning a QVector3D to the axis property or by passing a member if Qt.Axis to the setAxis convenience function. By default the axis is (0, 0, 1) i.e., rotation around the Z axis.
The angle property, which is provided by QGraphicsRotation, now describes the number of degrees to rotate around this axis.
QGraphicsRotation provides certain parameters to help control how the rotation should be applied.
The origin is the point that the item is rotated around (i.e., it stays fixed relative to the parent as the rest of the item is rotated). By default the origin is QPointF(0, 0).
The angle property provides the number of degrees to rotate the item clockwise around the origin. This value also be negative, indicating a counter-clockwise rotation. For animation purposes it may also be useful to provide rotation angles exceeding (-360, 360) degrees, for instance to animate how an item rotates several times.
Note: the final rotation is the combined effect of a rotation in 3D space followed by a projection back to 2D. If several rotations are performed in succession, they will not behave as expected unless they were all around the Z axis.
The parent argument, if not None, causes self to be owned by Qt instead of PyQt.
Constructs a new QGraphicsRotation with the given parent.
Reimplemented from QGraphicsTransform.applyTo().
This is the default overload of this signal.
This signal is emitted whenever the angle has changed.
See also QGraphicsRotation.angle.
This is the default overload of this signal.
This signal is emitted whenever the axis of the object changes.
See also QGraphicsRotation.axis.
This is the default overload of this signal.
This signal is emitted whenever the origin has changed.
See also QGraphicsRotation.origin.
PyQt 4.12.1 for X11 | Copyright © Riverbank Computing Ltd and The Qt Company 2015 | Qt 4.8.7 |