equal
deleted
inserted
replaced
94 private: |
94 private: |
95 T *m_p; |
95 T *m_p; |
96 }; |
96 }; |
97 |
97 |
98 //performs an action of type QAbstractAnimationAction |
98 //performs an action of type QAbstractAnimationAction |
99 class QActionAnimation : public QAbstractAnimation |
99 class Q_AUTOTEST_EXPORT QActionAnimation : public QAbstractAnimation |
100 { |
100 { |
101 Q_OBJECT |
101 Q_OBJECT |
102 public: |
102 public: |
103 QActionAnimation(QObject *parent = 0) : QAbstractAnimation(parent), animAction(0), policy(KeepWhenStopped) {} |
103 QActionAnimation(QObject *parent = 0) : QAbstractAnimation(parent), animAction(0), policy(KeepWhenStopped) {} |
104 QActionAnimation(QAbstractAnimationAction *action, QObject *parent = 0) |
104 QActionAnimation(QAbstractAnimationAction *action, QObject *parent = 0) |
141 virtual ~QDeclarativeBulkValueUpdater() {} |
141 virtual ~QDeclarativeBulkValueUpdater() {} |
142 virtual void setValue(qreal value) = 0; |
142 virtual void setValue(qreal value) = 0; |
143 }; |
143 }; |
144 |
144 |
145 //animates QDeclarativeBulkValueUpdater (assumes start and end values will be reals or compatible) |
145 //animates QDeclarativeBulkValueUpdater (assumes start and end values will be reals or compatible) |
146 class QDeclarativeBulkValueAnimator : public QVariantAnimation |
146 class Q_AUTOTEST_EXPORT QDeclarativeBulkValueAnimator : public QVariantAnimation |
147 { |
147 { |
148 Q_OBJECT |
148 Q_OBJECT |
149 public: |
149 public: |
150 QDeclarativeBulkValueAnimator(QObject *parent = 0) : QVariantAnimation(parent), animValue(0), fromSourced(0), policy(KeepWhenStopped) {} |
150 QDeclarativeBulkValueAnimator(QObject *parent = 0) : QVariantAnimation(parent), animValue(0), fromSourced(0), policy(KeepWhenStopped) {} |
151 ~QDeclarativeBulkValueAnimator() { if (policy == DeleteWhenStopped) { delete animValue; animValue = 0; } } |
151 ~QDeclarativeBulkValueAnimator() { if (policy == DeleteWhenStopped) { delete animValue; animValue = 0; } } |
309 void init(); |
309 void init(); |
310 |
310 |
311 QVariant from; |
311 QVariant from; |
312 QVariant to; |
312 QVariant to; |
313 |
313 |
314 QEasingCurve easing; |
|
315 |
|
316 QObject *target; |
314 QObject *target; |
317 QString propertyName; |
315 QString propertyName; |
318 QString properties; |
316 QString properties; |
319 QList<QObject *> targets; |
317 QList<QObject *> targets; |
320 QList<QObject *> exclude; |
318 QList<QObject *> exclude; |
376 QDeclarativeBulkValueAnimator *va; |
374 QDeclarativeBulkValueAnimator *va; |
377 QVariantAnimation::Interpolator interpolator; |
375 QVariantAnimation::Interpolator interpolator; |
378 QList<QDeclarativeItem*> targets; |
376 QList<QDeclarativeItem*> targets; |
379 }; |
377 }; |
380 |
378 |
|
379 class Q_AUTOTEST_EXPORT QDeclarativeAnimationPropertyUpdater : public QDeclarativeBulkValueUpdater |
|
380 { |
|
381 public: |
|
382 QDeclarativeStateActions actions; |
|
383 int interpolatorType; //for Number/ColorAnimation |
|
384 int prevInterpolatorType; //for generic |
|
385 QVariantAnimation::Interpolator interpolator; |
|
386 bool reverse; |
|
387 bool fromSourced; |
|
388 bool fromDefined; |
|
389 bool *wasDeleted; |
|
390 QDeclarativeAnimationPropertyUpdater() : prevInterpolatorType(0), wasDeleted(0) {} |
|
391 ~QDeclarativeAnimationPropertyUpdater() { if (wasDeleted) *wasDeleted = true; } |
|
392 void setValue(qreal v); |
|
393 }; |
|
394 |
381 QT_END_NAMESPACE |
395 QT_END_NAMESPACE |
382 |
396 |
383 #endif // QDECLARATIVEANIMATION_P_H |
397 #endif // QDECLARATIVEANIMATION_P_H |