Home

QtPropertyAnimation Class Reference
[QtCore module]

The QtPropertyAnimation class animates properties for QObject(and QWidget) More...

 #include <QtPropertyAnimation>

This class is under development and is subject to change.

Inherits QtAnimation.

Properties

Public Functions

Static Public Members

Protected Functions

Additional Inherited Members


Detailed Description

The QtPropertyAnimation class animates properties for QObject(and QWidget)

This class is part of {The Animation Framework}. You can use QtPropertyAnimation by itself as a simple animation class, or as part of more complex animations through QtAnimationGroup.

The most common way to use QtPropertyAnimation is to construct an instance of it by passing a pointer to a QObject or a QWidget, and the name of the property you would like to animate to QtPropertyAnimation's constructor.

The start value of the animation is optional. If you do not set any start value, the animation will operate on the target's current property value at the point when the animation was started. You can call setStartValue() to set the start value, and setEndValue() to set the target value for the animated property.

Animations can operate on QObjects and QWidgets. You can choose to assign a target object by either calling setTargetObject() or by passing a QObject pointer to QtPropertyAnimation's constructor.

See also QtAnimation, QtAnimationGroup, and The Animation Framework.


Property Documentation

propertyName : QByteArray

This property holds the target property name for this animation.

This property defines the target property name for this animation. The property name is required for the animation to operate.

Access functions:

targetObject : QObject *

This property holds the target QObject for this animation.

This property defines the target QObject for this animation.

Access functions:


Member Function Documentation

QtPropertyAnimation::QtPropertyAnimation ( QObject * parent = 0 )

Construct a QtPropertyAnimation object. parent is passed to QObject's constructor.

QtPropertyAnimation::QtPropertyAnimation ( QObject * target, const QByteArray & propertyName, QObject * parent = 0 )

Construct a QtPropertyAnimation object. parent is passed to QObject's constructor. The animation changes the property propertyName on target. The default duration is 250ms.

See also targetObject and propertyName.

QtPropertyAnimation::~QtPropertyAnimation ()

Destroys the QtPropertyAnimation instance.

QtPropertyAnimation * QtPropertyAnimation::runningAnimation ( QObject * object, QByteArray prop )   [static]

This static function returns the running animations on object and on property prop.

QList<QtPropertyAnimation *> QtPropertyAnimation::runningAnimations ( QObject * object = 0 )   [static]

This static function returns the list of running animations on object. If object is 0, then it returns all QtPropertyAnimations running on all QObjects.

void QtPropertyAnimation::updateCurrentValue ( const QVariant & value )   [virtual protected]

This virtual function is called by QtAnimation whenever the current value changes. value is the new, updated value. It updates the current value of the property on the target object.

Reimplemented from QtAnimation.

See also currentValue and currentTime.


Copyright © 2009 Nokia Trademarks
Qt Solutions