Viadeo Twitter Google Bookmarks ! Facebook Digg del.icio.us MySpace Yahoo MyWeb Blinklist Netvouz Reddit Simpy StumbleUpon Bookmarks Windows Live Favorites 
Logo Documentation Qt ·  Page d'accueil  ·  Toutes les classes  ·  Classes principales  ·  Annotées  ·  Classes groupées  ·  Modules  ·  Fonctions  · 

QSequentialAnimationGroup Class

The QSequentialAnimationGroup class provides a sequential group of animations. More...

 #include <QSequentialAnimationGroup>

Inherits: QAnimationGroup.

This class was introduced in Qt 4.6.

Public Types

enum DeletionPolicy { KeepWhenStopped, DeleteWhenStopped }
enum Direction { Forward, Backward }
enum State { Stopped, Paused, Running }

Properties

  • 1 property inherited from QObject

Public Functions

QAbstractAnimation(QObject * parent = 0)
QSequentialAnimationGroup(QObject * parent = 0)
virtual ~QAbstractAnimation()
~QSequentialAnimationGroup()
QPauseAnimation * addPause(int msecs)
QAbstractAnimation * currentAnimation() const
int currentLoop() const
int currentLoopTime() const
int currentTime() const
Direction direction() const
virtual int duration() const = 0
QAnimationGroup * group() const
QPauseAnimation * insertPause(int index, int msecs)
int loopCount() const
void setDirection(Direction direction)
void setLoopCount(int loopCount)
State state() const
int totalDuration() const

Reimplemented Public Functions

virtual int duration() const

Public Slots

void pause()
void resume()
void setCurrentTime(int msecs)
void setPaused(bool paused)
void start(QAbstractAnimation::DeletionPolicy policy = KeepWhenStopped)
void stop()
  • 1 public slot inherited from QObject

Signals

void currentAnimationChanged(QAbstractAnimation * current)
void currentLoopChanged(int currentLoop)
void directionChanged(QAbstractAnimation::Direction newDirection)
void finished()
void stateChanged(QAbstractAnimation::State newState, QAbstractAnimation::State oldState)

Protected Functions

virtual bool event(QEvent * event)
virtual void updateCurrentTime(int currentTime) = 0
virtual void updateDirection(QAbstractAnimation::Direction direction)
virtual void updateState(QAbstractAnimation::State newState, QAbstractAnimation::State oldState)

Reimplemented Protected Functions

virtual bool event(QEvent * event)
virtual void updateCurrentTime(int currentTime)
virtual void updateDirection(QAbstractAnimation::Direction direction)
virtual void updateState(QAbstractAnimation::State newState, QAbstractAnimation::State oldState)

Additional Inherited Members

  • 11 static public members inherited from QObject

Detailed Description

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() or insertPause() to add a pause to a sequential animation group.

 QSequentialAnimationGroup *group = new QSequentialAnimationGroup;

 group->addAnimation(anim1);
 group->addAnimation(anim2);

 group->start();

In this example, anim1 and anim2 are two already set up QPropertyAnimations.

See also QAnimationGroup, QAbstractAnimation, and The Animation Framework.

Property Documentation

currentAnimation : QAbstractAnimation * const

Returns the animation in the current time.

Access functions:

QAbstractAnimation * currentAnimation() const

Notifier signal:

void currentAnimationChanged(QAbstractAnimation * current)

See also currentAnimationChanged().

Member Function Documentation

QSequentialAnimationGroup::QSequentialAnimationGroup(QObject * parent = 0)

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

QSequentialAnimationGroup::~QSequentialAnimationGroup()

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

QPauseAnimation * QSequentialAnimationGroup::addPause(int msecs)

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

See also insertPause() and QAnimationGroup::addAnimation().

int QSequentialAnimationGroup::duration() const [virtual]

Reimplemented from QAbstractAnimation::duration().

bool QSequentialAnimationGroup::event(QEvent * event) [virtual protected]

Reimplemented from QObject::event().

QPauseAnimation * QSequentialAnimationGroup::insertPause(int index, int msecs)

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

See also addPause() and QAnimationGroup::insertAnimation().

void QSequentialAnimationGroup::updateCurrentTime(int currentTime) [virtual protected]

Reimplemented from QAbstractAnimation::updateCurrentTime().

void QSequentialAnimationGroup::updateDirection(QAbstractAnimation::Direction direction) [virtual protected]

Reimplemented from QAbstractAnimation::updateDirection().

void QSequentialAnimationGroup::updateState(QAbstractAnimation::State newState, QAbstractAnimation::State oldState) [virtual protected]

Reimplemented from QAbstractAnimation::updateState().

Cette page est une traduction d'une page de la documentation de Qt, écrite par Nokia Corporation and/or its subsidiary(-ies). Les éventuels problèmes résultant d'une mauvaise traduction ne sont pas imputables à Nokia. Qt 5.0-snapshot
Copyright © 2012 Developpez LLC. Tous droits réservés Developpez LLC. Aucune reproduction, même partielle, ne peut être faite de ce site et de l'ensemble de son contenu : textes, documents et images sans l'autorisation expresse de Developpez LLC. Sinon, vous encourez selon la loi jusqu'à 3 ans de prison et jusqu'à 300 000 E de dommages et intérêts. Cette page est déposée à la SACD.
Vous avez déniché une erreur ? Un bug ? Une redirection cassée ? Ou tout autre problème, quel qu'il soit ? Ou bien vous désirez participer à ce projet de traduction ? N'hésitez pas à nous contacter ou par MP !
 
 
 
 
Partenaires

Hébergement Web