QSequentialAnimationGroup Class Reference

[ QtCore module]

The QSequentialAnimationGroup class provides a sequential group of animations. 更多...

继承 QAnimationGroup .

方法

Qt Signals


详细描述

The QSequentialAnimationGroup class provides a sequential group of animations.

QSequentialAnimationGroup is a QAnimationGroup that runs its animations in sequence, i.e., it starts one animation after another has finished playing. The animations are played in the order they are added to the group (using addAnimation() or insertAnimation() ). The animation group finishes when its last animation has finished.

At each moment there is at most one animation that is active in the group; it is returned by currentAnimation (). An empty group has no current animation.

A sequential animation group can be treated as any other animation, i.e., it can be started, stopped, and added to other groups. You can also call addPause () 或 insertPause () to add a pause to a sequential animation group.

 QSequentialAnimationGroup *group = new QSequentialAnimationGroup;
 group->addAnimation(anim1);
 group->addAnimation(anim2);
 group->start();
			

在此范例中, anim1 and anim2 are two already set up QPropertyAnimation s.


方法文档编制

QSequentialAnimationGroup.__init__ ( self , QObject   parent  = None)

parent argument, if not None, causes self to be owned by Qt instead of PyQt.

构造 QSequentialAnimationGroup . parent 会被传递给 QObject 's 构造函数。

QPauseAnimation QSequentialAnimationGroup.addPause ( self , int  msecs )

Adds a pause of msecs to this animation group. The pause is considered as a special type of animation, thus animationCount 将是 increased by one.

另请参阅 insertPause () 和 QAnimationGroup.addAnimation ().

QAbstractAnimation QSequentialAnimationGroup.currentAnimation ( self )

int QSequentialAnimationGroup.duration ( self )

重实现自 QAbstractAnimation.duration ().

bool QSequentialAnimationGroup.event ( self , QEvent   event )

重实现自 QObject.event ().

QPauseAnimation QSequentialAnimationGroup.insertPause ( self , int  index , int  msecs )

Inserts a pause of msecs milliseconds at index in this animation group.

另请参阅 addPause () 和 QAnimationGroup.insertAnimation ().

QSequentialAnimationGroup.updateCurrentTime ( self , int)

重实现自 QAbstractAnimation.updateCurrentTime ().

QSequentialAnimationGroup.updateDirection ( self , QAbstractAnimation.Direction   direction )

重实现自 QAbstractAnimation.updateDirection ().

QSequentialAnimationGroup.updateState ( self , QAbstractAnimation.State   newState , QAbstractAnimation.State   oldState )

重实现自 QAbstractAnimation.updateState ().


Qt Signal Documentation

void currentAnimationChanged (QAbstractAnimation*)

This is the default overload of this signal.

QSequentialAnimationGroup emits this signal when currentAnimation has been changed. current is the current animation.

另请参阅 currentAnimation ().