|  | Home

# QtAnimationGroup Class Reference
[QtCore module]

The QtAnimationGroup is an abstract base class for group of animations. More...

     #include <QtAnimationGroup>

This class is under development and is subject to change.

Inherits QtAbstractAnimation.

Inherited by QtParallelAnimationGroup and QtSequentialAnimationGroup.

- List of all members, including inherited members

### Public Functions

- QtAnimationGroup ( QObject * parent = 0 )
- ~QtAnimationGroup ()
- void add ( QtAbstractAnimation * animation )
- QList<QtAbstractAnimation *> animations () const
- QtAbstractAnimation * at ( int index ) const
- void clear ()
- int count () const
- void remove ( QtAbstractAnimation * animation )
- void removeAt ( int index )

- 10 public functions inherited from QtAbstractAnimation
- 29 public functions inherited from QObject

### Protected Functions

- virtual void animationInsertedAt ( int index )
- virtual void animationRemovedAt ( int index )

- 3 protected functions inherited from QtAbstractAnimation
- 7 protected functions inherited from QObject

### Additional Inherited Members

- 6 properties inherited from QtAbstractAnimation
- 1 property inherited from QObject
- 5 public slots inherited from QtAbstractAnimation
- 1 public slot inherited from QObject
- 5 signals inherited from QtAbstractAnimation
- 1 signal inherited from QObject
- 1 public type inherited from QObject
- 4 static public members inherited from QObject
- 2 protected variables inherited from QObject

## Detailed Description

The QtAnimationGroup is an abstract base class for group of animations.

QtAnimationGroup represents a group of animations, such as parallel or sequential, and lets you combine different animations into one. The group manages any animation that inherits QtAbstractAnimation. By combining groups, you can easily construct complex animation graphs.

The QtAnimationGroup base class provides methods for adding and retrieving animations. Besides that, you can remove animations by calling remove(), and clear the animation group by calling clear(). You may keep track of changes in the group's animations by listening to QEvent::ChildAdded and QEvent::ChildRemoved events.

QtAnimationGroup takes ownership of the animations it manages, and ensures that they are deleted when the animation group is deleted.

See also QtAbstractAnimation, QtAnimation, and The Animation Framework.

## Member Function Documentation

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

Constructs a QtAnimationGroup. parent is passed to QObject's constructor.

### QtAnimationGroup::~QtAnimationGroup ()

Destroys the animation group. It will also destroy all its animations.

### void QtAnimationGroup::add ( QtAbstractAnimation * animation )

Adds animation to this group. This will call animationInsertedAt.

See also animationInsertedAt().

### void QtAnimationGroup::animationInsertedAt ( int index ) `[virtual protected]`

This virtual method is called whenever an animation is added to the group at index index.

See also add().

### void QtAnimationGroup::animationRemovedAt ( int index ) `[virtual protected]`

This virtual method is called whenever an animation is removed from the group at index index. The animation is no more listed when this method is called.

See also remove() and removeAt().

### QList<QtAbstractAnimation *> QtAnimationGroup::animations () const

Returns the animations that are managed by this group.

See also add(), count(), and at().

### QtAbstractAnimation * QtAnimationGroup::at ( int index ) const

Returns a pointer to the animation at index in this group. This function is useful when you need access to a particular animation. index is between 0 and count() - 1.

See also count() and animations().

### void QtAnimationGroup::clear ()

Removes and deletes all animations in this animation group, and resets the current time to 0.

See also add() and remove().

### int QtAnimationGroup::count () const

Returns the number of animations managed by this group.

See also animations(), add(), and at().

### void QtAnimationGroup::remove ( QtAbstractAnimation * animation )

Removes animation from this group. The ownership of animation is transferred to the caller.

See also add().

### void QtAnimationGroup::removeAt ( int index )

Removes the animation at index from this animation group. The ownership of the animation is transferred to the caller. This will call animationRemovedAt.

See also add() and animationRemovedAt().