|  | Home · All Classes · Main Classes · Grouped Classes · Modules · Functions |

# QGraphicsItemAnimation Class Reference
[QtGui module]

The QGraphicsItemAnimation class provides simple animation support for QGraphicsItem. More...

     #include <QGraphicsItemAnimation>

Inherits QObject.

This class was introduced in Qt 4.2.

- List of all members, including inherited members

### Public Functions

- QGraphicsItemAnimation ( QObject * parent = 0 )
- virtual ~QGraphicsItemAnimation ()
- void clear ()
- qreal horizontalScaleAt ( qreal step ) const
- qreal horizontalShearAt ( qreal step ) const
- QGraphicsItem * item () const
- QMatrix matrixAt ( qreal step ) const
- QPointF posAt ( qreal step ) const
- qreal rotationAt ( qreal step ) const
- void setItem ( QGraphicsItem * item )
- void setPosAt ( qreal step, const QPointF & point )
- void setRotationAt ( qreal step, qreal angle )
- void setScaleAt ( qreal step, qreal sx, qreal sy )
- void setShearAt ( qreal step, qreal sh, qreal sv )
- void setTimeLine ( QTimeLine * timeLine )
- void setTranslationAt ( qreal step, qreal dx, qreal dy )
- QTimeLine * timeLine () const
- qreal verticalScaleAt ( qreal step ) const
- qreal verticalShearAt ( qreal step ) const
- qreal xTranslationAt ( qreal step ) const
- qreal yTranslationAt ( qreal step ) const

- 29 public functions inherited from QObject

### Public Slots

- void reset ()
- void setStep ( qreal step )

- 1 public slot inherited from QObject

### Protected Functions

- virtual void afterAnimationStep ( qreal step )
- virtual void beforeAnimationStep ( qreal step )

- 7 protected functions inherited from QObject

### Additional Inherited Members

- 1 property inherited from QObject
- 1 signal inherited from QObject
- 5 static public members inherited from QObject

## Detailed Description

The QGraphicsItemAnimation class provides simple animation support for QGraphicsItem.

## Member Function Documentation

### QGraphicsItemAnimation::QGraphicsItemAnimation ( QObject * parent = 0 )

Constructs an animation object with the given parent.

### QGraphicsItemAnimation::~QGraphicsItemAnimation () `[virtual]`

Destroys the animation object.

### void QGraphicsItemAnimation::afterAnimationStep ( qreal step ) `[virtual protected]`

This method is meant to be overridden by subclassed that needs to execute additional code after a new step has taken place.

### void QGraphicsItemAnimation::beforeAnimationStep ( qreal step ) `[virtual protected]`

This method is meant to be overridden by subclassed that needs to execute additional code before a new step takes place.

### void QGraphicsItemAnimation::clear ()

Clears the lists of points and transformations used for the animation, but retains the item and time line.

### qreal QGraphicsItemAnimation::horizontalScaleAt ( qreal step ) const

Returns the horizontal scale for the item at the specified step value.

See also setScaleAt().

### qreal QGraphicsItemAnimation::horizontalShearAt ( qreal step ) const

Returns the horizontal shear for the item at the specified step value.

See also setShearAt().

### QGraphicsItem * QGraphicsItemAnimation::item () const

Returns the item operated on by the animation object.

See also setItem().

### QMatrix QGraphicsItemAnimation::matrixAt ( qreal step ) const

Returns the matrix used to transform the item at the specified step value.

### QPointF QGraphicsItemAnimation::posAt ( qreal step ) const

Returns the point corresponding to the given step value.

See also setPosAt().

### void QGraphicsItemAnimation::reset () `[slot]`

Resets the item to its starting position and transformation.

### qreal QGraphicsItemAnimation::rotationAt ( qreal step ) const

Returns the angle at which the item is rotated at the specified step value.

See also setRotationAt().

### void QGraphicsItemAnimation::setItem ( QGraphicsItem * item )

Sets the specified item to be used in the animation.

See also item().

### void QGraphicsItemAnimation::setPosAt ( qreal step, const QPointF & point )

Sets the position of the item at the given step value to the point specified.

See also posAt().

### void QGraphicsItemAnimation::setRotationAt ( qreal step, qreal angle )

Sets the rotation of the item at the given step value to the angle specified.

See also rotationAt().

### void QGraphicsItemAnimation::setScaleAt ( qreal step, qreal sx, qreal sy )

Sets the scale of the item at the given step value using the horizontal and vertical scale factors specified by sx and sy.

See also verticalScaleAt() and horizontalScaleAt().

### void QGraphicsItemAnimation::setShearAt ( qreal step, qreal sh, qreal sv )

Sets the shear of the item at the given step value using the horizontal and vertical shear factors specified by sh and sv.

See also verticalShearAt() and horizontalShearAt().

### void QGraphicsItemAnimation::setStep ( qreal step ) `[slot]`

Sets the current step value for the animation, causing the item to be transformed according to the specified parameter and the transformations previously set up for the animation.

### void QGraphicsItemAnimation::setTimeLine ( QTimeLine * timeLine )

Sets the time line object used to control the rate of animation to the timeLine specified.

See also timeLine().

### void QGraphicsItemAnimation::setTranslationAt ( qreal step, qreal dx, qreal dy )

Sets the translation of the item at the given step value using the horizontal and vertical coordinates specified by dx and dy.

See also xTranslationAt() and yTranslationAt().

### QTimeLine * QGraphicsItemAnimation::timeLine () const

Returns the time line object used to control the rate at which the animation occurs.

See also setTimeLine().

### qreal QGraphicsItemAnimation::verticalScaleAt ( qreal step ) const

Returns the vertical scale for the item at the specified step value.

See also setScaleAt().

### qreal QGraphicsItemAnimation::verticalShearAt ( qreal step ) const

Returns the vertical shear for the item at the specified step value.

See also setShearAt().

### qreal QGraphicsItemAnimation::xTranslationAt ( qreal step ) const

Returns the horizontal translation of the item at the specified step value.

See also setTranslationAt().

### qreal QGraphicsItemAnimation::yTranslationAt ( qreal step ) const

Returns the vertical translation of the item at the specified step value.

See also setTranslationAt().