Qt 4.8
Public Functions | Public Variables | List of all members
QDeclarativeAnimationPropertyUpdater Class Reference

#include <qdeclarativeanimation_p_p.h>

Inheritance diagram for QDeclarativeAnimationPropertyUpdater:
QDeclarativeBulkValueUpdater

Public Functions

 QDeclarativeAnimationPropertyUpdater ()
 
void setValue (qreal v)
 
 ~QDeclarativeAnimationPropertyUpdater ()
 
- Public Functions inherited from QDeclarativeBulkValueUpdater
virtual ~QDeclarativeBulkValueUpdater ()
 

Public Variables

QDeclarativeStateActions actions
 
bool fromDefined
 
bool fromSourced
 
QVariantAnimation::Interpolator interpolator
 
int interpolatorType
 
int prevInterpolatorType
 
bool reverse
 
bool * wasDeleted
 

Detailed Description

Definition at line 379 of file qdeclarativeanimation_p_p.h.

Constructors and Destructors

◆ QDeclarativeAnimationPropertyUpdater()

QDeclarativeAnimationPropertyUpdater::QDeclarativeAnimationPropertyUpdater ( )
inline

◆ ~QDeclarativeAnimationPropertyUpdater()

QDeclarativeAnimationPropertyUpdater::~QDeclarativeAnimationPropertyUpdater ( )
inline

Functions

◆ setValue()

void QDeclarativeAnimationPropertyUpdater::setValue ( qreal  v)
virtual

Implements QDeclarativeBulkValueUpdater.

Definition at line 2412 of file qdeclarativeanimation.cpp.

2413 {
2414  bool deleted = false;
2415  wasDeleted = &deleted;
2416  if (reverse) //QVariantAnimation sends us 1->0 when reversed, but we are expecting 0->1
2417  v = 1 - v;
2418  for (int ii = 0; ii < actions.count(); ++ii) {
2419  QDeclarativeAction &action = actions[ii];
2420 
2421  if (v == 1.)
2423  else {
2424  if (!fromSourced && !fromDefined) {
2425  action.fromValue = action.property.read();
2426  if (interpolatorType)
2428  }
2429  if (!interpolatorType) {
2430  int propType = action.property.propertyType();
2431  if (!prevInterpolatorType || prevInterpolatorType != propType) {
2432  prevInterpolatorType = propType;
2434  }
2435  }
2436  if (interpolator)
2438  }
2439  if (deleted)
2440  return;
2441  }
2442  wasDeleted = 0;
2443  fromSourced = true;
2444 }
QDeclarativeProperty property
int count(const T &t) const
Returns the number of occurrences of value in the list.
Definition: qlist.h:891
static Q_CORE_EXPORT QVariantAnimation::Interpolator getInterpolator(int interpolationType)
QVariantAnimation::Interpolator interpolator
int propertyType() const
Returns the QVariant type of the property, or QVariant::Invalid if the property has no QVariant type...
const void * constData() const
Definition: qvariant.cpp:3065
static void convertVariant(QVariant &variant, int type)
QVariant read() const
Returns the property value.
static bool write(QObject *, const QDeclarativePropertyCache::Data &, const QVariant &, QDeclarativeContextData *, WriteFlags flags=0)

Properties

◆ actions

QDeclarativeStateActions QDeclarativeAnimationPropertyUpdater::actions

◆ fromDefined

bool QDeclarativeAnimationPropertyUpdater::fromDefined

◆ fromSourced

bool QDeclarativeAnimationPropertyUpdater::fromSourced

◆ interpolator

QVariantAnimation::Interpolator QDeclarativeAnimationPropertyUpdater::interpolator

◆ interpolatorType

int QDeclarativeAnimationPropertyUpdater::interpolatorType

◆ prevInterpolatorType

int QDeclarativeAnimationPropertyUpdater::prevInterpolatorType

Definition at line 384 of file qdeclarativeanimation_p_p.h.

◆ reverse

bool QDeclarativeAnimationPropertyUpdater::reverse

◆ wasDeleted

bool* QDeclarativeAnimationPropertyUpdater::wasDeleted

Definition at line 389 of file qdeclarativeanimation_p_p.h.


The documentation for this class was generated from the following files: