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.

Public Functions

Additional Inherited Members


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 clearAnimations(). 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, QtVariantAnimation, 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::addAnimation ( QtAbstractAnimation * animation )

Adds animation to this group. This will call insertAnimationAt with index equals to animationCount()

QtAbstractAnimation * QtAnimationGroup::animationAt ( 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 animationCount() - 1.

See also animationCount() and indexOfAnimation().

int QtAnimationGroup::animationCount () const

Returns the number of animations managed by this group.

See also indexOfAnimation(), addAnimation(), and animationAt().

void QtAnimationGroup::clearAnimations ()

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

See also addAnimation() and removeAnimation().

int QtAnimationGroup::indexOfAnimation ( QtAbstractAnimation * animation ) const

Returns the index of animation. The returned index can be passed to the other functions that take an index as an argument.

See also insertAnimationAt(), animationAt(), and takeAnimationAt().

void QtAnimationGroup::insertAnimationAt ( int index, QtAbstractAnimation * animation )

Inserts animation into this animation group at index. If index is 0 the animation is inserted at the beginning. If index is animationCount(), the animation is inserted at the end.

See also takeAnimationAt(), addAnimation(), and indexOfAnimation().

void QtAnimationGroup::removeAnimation ( QtAbstractAnimation * animation )

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

See also takeAnimationAt(), insertAnimationAt(), and addAnimation().

QtAbstractAnimation * QtAnimationGroup::takeAnimationAt ( int index )

Removes the animation at index from this animation group. The ownership of the animation is transferred to the caller, and a pointer to the removed animation is returned.

See also addAnimation().


Copyright © 2009 Nokia Trademarks
Qt Solutions