summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMichael Brasser <michael.brasser@nokia.com>2009-04-27 02:49:18 (GMT)
committerMichael Brasser <michael.brasser@nokia.com>2009-04-27 02:49:18 (GMT)
commitecf0a1937d81e047e25ac551703a77f75767d881 (patch)
treec89fe2890d96fd65713951403c28714c5ab48f05 /src
parentf1326b02c582b5044b8a2f491eed649020846111 (diff)
downloadQt-ecf0a1937d81e047e25ac551703a77f75767d881.zip
Qt-ecf0a1937d81e047e25ac551703a77f75767d881.tar.gz
Qt-ecf0a1937d81e047e25ac551703a77f75767d881.tar.bz2
Rename GfxValue to QmlTimeLineValue.
Diffstat (limited to 'src')
-rw-r--r--src/declarative/fx/qfxflickable.cpp2
-rw-r--r--src/declarative/fx/qfxflickable_p.h14
-rw-r--r--src/declarative/fx/qfxpathview.h1
-rw-r--r--src/declarative/fx/qfxpathview_p.h3
-rw-r--r--src/declarative/timeline/qmltimeline.cpp140
-rw-r--r--src/declarative/timeline/qmltimeline.h30
-rw-r--r--src/declarative/timeline/qmltimelinevalueproxy.h (renamed from src/declarative/timeline/gfxvalueproxy.h)18
-rw-r--r--src/declarative/timeline/timeline.pri2
-rw-r--r--src/declarative/util/qmlanimation.cpp24
-rw-r--r--src/declarative/util/qmlanimation_p.h26
10 files changed, 130 insertions, 130 deletions
diff --git a/src/declarative/fx/qfxflickable.cpp b/src/declarative/fx/qfxflickable.cpp
index a04fe97..04b4a3d 100644
--- a/src/declarative/fx/qfxflickable.cpp
+++ b/src/declarative/fx/qfxflickable.cpp
@@ -48,7 +48,7 @@
QT_BEGIN_NAMESPACE
-ElasticValue::ElasticValue(GfxValue &val)
+ElasticValue::ElasticValue(QmlTimeLineValue &val)
: _value(val)
{
_to = _value.value();
diff --git a/src/declarative/fx/qfxflickable_p.h b/src/declarative/fx/qfxflickable_p.h
index ce880f9..ebd0327 100644
--- a/src/declarative/fx/qfxflickable_p.h
+++ b/src/declarative/fx/qfxflickable_p.h
@@ -57,7 +57,7 @@
#include "qfxflickable.h"
#include "qfxitem_p.h"
#include "qml.h"
-#include "gfxvalueproxy.h"
+#include "qmltimelinevalueproxy.h"
#include "private/qmlanimation_p.h"
QT_BEGIN_NAMESPACE
@@ -65,7 +65,7 @@ QT_BEGIN_NAMESPACE
class ElasticValue : public QAbstractAnimation {
Q_OBJECT
public:
- ElasticValue(GfxValue &);
+ ElasticValue(QmlTimeLineValue &);
void setValue(qreal to);
void clear();
@@ -81,7 +81,7 @@ private:
qreal _to;
qreal _myValue;
qreal _velocity;
- GfxValue &_value;
+ QmlTimeLineValue &_value;
QTime _startTime;
};
@@ -98,8 +98,8 @@ public:
public:
QFxItem *_flick;
- GfxValueProxy<QFxItem> _moveX;
- GfxValueProxy<QFxItem> _moveY;
+ QmlTimeLineValueProxy<QFxItem> _moveX;
+ QmlTimeLineValueProxy<QFxItem> _moveY;
QmlTimeLine _tl;
int vWidth;
int vHeight;
@@ -128,12 +128,12 @@ public:
int velocityDecay;
void updateVelocity();
- struct Velocity : public GfxValue
+ struct Velocity : public QmlTimeLineValue
{
Velocity(QFxFlickablePrivate *p)
: parent(p) {}
virtual void setValue(qreal v) {
- GfxValue::setValue(v);
+ QmlTimeLineValue::setValue(v);
parent->updateVelocity();
}
QFxFlickablePrivate *parent;
diff --git a/src/declarative/fx/qfxpathview.h b/src/declarative/fx/qfxpathview.h
index 6d4280d..2cc0769 100644
--- a/src/declarative/fx/qfxpathview.h
+++ b/src/declarative/fx/qfxpathview.h
@@ -44,7 +44,6 @@
#include <qfxitem.h>
#include <qfxpath.h>
-#include <gfxvalueproxy.h>
QT_BEGIN_HEADER
diff --git a/src/declarative/fx/qfxpathview_p.h b/src/declarative/fx/qfxpathview_p.h
index 43f4ffa..a19d778 100644
--- a/src/declarative/fx/qfxpathview_p.h
+++ b/src/declarative/fx/qfxpathview_p.h
@@ -58,6 +58,7 @@
#include "qfxitem_p.h"
#include "qfxvisualitemmodel.h"
#include "qml.h"
+#include "qmltimelinevalueproxy.h"
#include "private/qmlanimation_p.h"
QT_BEGIN_NAMESPACE
@@ -115,7 +116,7 @@ public:
qreal snapPos;
qreal dragMargin;
QmlTimeLine tl;
- GfxValueProxy<QFxPathViewPrivate> moveOffset;
+ QmlTimeLineValueProxy<QFxPathViewPrivate> moveOffset;
QmlTimeLineEvent fixupOffsetEvent;
int firstIndex;
int pathItems;
diff --git a/src/declarative/timeline/qmltimeline.cpp b/src/declarative/timeline/qmltimeline.cpp
index 7cbb3ce..fc901eb 100644
--- a/src/declarative/timeline/qmltimeline.cpp
+++ b/src/declarative/timeline/qmltimeline.cpp
@@ -56,12 +56,12 @@ QT_BEGIN_NAMESPACE
//
struct Update {
- Update(GfxValue *_g, qreal _v)
+ Update(QmlTimeLineValue *_g, qreal _v)
: g(_g), v(_v) {}
Update(const QmlTimeLineEvent &_e)
: g(0), v(0), e(_e) {}
- GfxValue *g;
+ QmlTimeLineValue *g;
qreal v;
QmlTimeLineEvent e;
};
@@ -142,7 +142,7 @@ QmlTimeLinePrivate::QmlTimeLinePrivate(QmlTimeLine *parent)
void QmlTimeLinePrivate::add(QmlTimeLineObject &g, const Op &o)
{
if(g._t && g._t != q) {
- qWarning() << "QmlTimeLine: Cannot modify a GfxValue owned by"
+ qWarning() << "QmlTimeLine: Cannot modify a QmlTimeLineValue owned by"
<< "another timeline.";
return;
}
@@ -263,22 +263,22 @@ qreal QmlTimeLinePrivate::value(const Op &op, int time, qreal base, bool *change
QmlTimeLine is similar to QTimeLine except:
\list
- \i It updates GfxValue instances directly, rather than maintaining a single
+ \i It updates QmlTimeLineValue instances directly, rather than maintaining a single
current value.
For example, the following animates a simple value over 200 milliseconds:
\code
- GfxValue v(<starting value>);
+ QmlTimeLineValue v(<starting value>);
QmlTimeLine tl;
tl.move(v, 100., 200);
tl.start()
\endcode
If your program needs to know when values are changed, it can either
- connect to the QmlTimeLine's updated() signal, or inherit from GfxValue
- and reimplement the GfxValue::setValue() method.
+ connect to the QmlTimeLine's updated() signal, or inherit from QmlTimeLineValue
+ and reimplement the QmlTimeLineValue::setValue() method.
- \i Supports multiple GfxValue, arbitrary start and end values and allows
+ \i Supports multiple QmlTimeLineValue, arbitrary start and end values and allows
animations to be strung together for more complex effects.
For example, the following animation moves the x and y coordinates of
@@ -287,8 +287,8 @@ qreal QmlTimeLinePrivate::value(const Op &op, int time, qreal base, bool *change
milliseconds:
\code
- GfxValue x(<starting value>);
- GfxValue y(<starting value>);
+ QmlTimeLineValue x(<starting value>);
+ QmlTimeLineValue y(<starting value>);
QmlTimeLine tl;
tl.start();
@@ -355,7 +355,7 @@ void QmlTimeLine::setSyncMode(SyncMode syncMode)
}
/*!
- Pause \a gfxValue for \a time milliseconds.
+ Pause \a obj for \a time milliseconds.
*/
void QmlTimeLine::pause(QmlTimeLineObject &obj, int time)
{
@@ -374,21 +374,21 @@ void QmlTimeLine::execute(const QmlTimeLineEvent &event)
}
/*!
- Set the \a value of \a gfxValue.
+ Set the \a value of \a timeLineValue.
*/
-void QmlTimeLine::set(GfxValue &gfxValue, qreal value)
+void QmlTimeLine::set(QmlTimeLineValue &timeLineValue, qreal value)
{
QmlTimeLinePrivate::Op op(QmlTimeLinePrivate::Op::Set, 0, value, 0., d->order++);
- d->add(gfxValue, op);
+ d->add(timeLineValue, op);
}
/*!
- Decelerate \a gfxValue from the starting \a velocity to zero at the
+ Decelerate \a timeLineValue from the starting \a velocity to zero at the
given \a acceleration rate. Although the \a acceleration is technically
a deceleration, it should always be positive. The QmlTimeLine will ensure
that the deceleration is in the opposite direction to the initial velocity.
*/
-int QmlTimeLine::accel(GfxValue &gfxValue, qreal velocity, qreal acceleration)
+int QmlTimeLine::accel(QmlTimeLineValue &timeLineValue, qreal velocity, qreal acceleration)
{
if((velocity > 0.0f) == (acceleration > 0.0f))
acceleration = acceleration * -1.0f;
@@ -396,7 +396,7 @@ int QmlTimeLine::accel(GfxValue &gfxValue, qreal velocity, qreal acceleration)
int time = static_cast<int>(-1000 * velocity / acceleration);
QmlTimeLinePrivate::Op op(QmlTimeLinePrivate::Op::Accel, time, velocity, acceleration, d->order++);
- d->add(gfxValue, op);
+ d->add(timeLineValue, op);
return time;
}
@@ -404,14 +404,14 @@ int QmlTimeLine::accel(GfxValue &gfxValue, qreal velocity, qreal acceleration)
/*!
\overload
- Decelerate \a gfxValue from the starting \a velocity to zero at the
+ Decelerate \a timeLineValue from the starting \a velocity to zero at the
given \a acceleration rate over a maximum distance of maxDistance.
If necessary, QmlTimeLine will reduce the acceleration to ensure that the
entire operation does not require a move of more than \a maxDistance.
\a maxDistance should always be positive.
*/
-int QmlTimeLine::accel(GfxValue &gfxValue, qreal velocity, qreal acceleration, qreal maxDistance)
+int QmlTimeLine::accel(QmlTimeLineValue &timeLineValue, qreal velocity, qreal acceleration, qreal maxDistance)
{
Q_ASSERT(acceleration >= 0.0f && maxDistance >= 0.0f);
@@ -425,19 +425,19 @@ int QmlTimeLine::accel(GfxValue &gfxValue, qreal velocity, qreal acceleration, q
int time = static_cast<int>(-1000 * velocity / acceleration);
QmlTimeLinePrivate::Op op(QmlTimeLinePrivate::Op::Accel, time, velocity, acceleration, d->order++);
- d->add(gfxValue, op);
+ d->add(timeLineValue, op);
return time;
}
/*!
- Decelerate \a gfxValue from the starting \a velocity to zero over the given
+ Decelerate \a timeLineValue from the starting \a velocity to zero over the given
\a distance. This is like accel(), but the QmlTimeLine calculates the exact
deceleration to use.
\a distance should be positive.
*/
-int QmlTimeLine::accelDistance(GfxValue &gfxValue, qreal velocity, qreal distance)
+int QmlTimeLine::accelDistance(QmlTimeLineValue &timeLineValue, qreal velocity, qreal distance)
{
if (distance == 0.0f || velocity == 0.0f)
return -1;
@@ -446,68 +446,68 @@ int QmlTimeLine::accelDistance(GfxValue &gfxValue, qreal velocity, qreal distanc
int time = static_cast<int>(1000 * (2.0f * distance) / velocity);
QmlTimeLinePrivate::Op op(QmlTimeLinePrivate::Op::AccelDistance, time, velocity, distance, d->order++);
- d->add(gfxValue, op);
+ d->add(timeLineValue, op);
return time;
}
/*!
- Linearly change the \a gfxValue from its current value to the given
+ Linearly change the \a timeLineValue from its current value to the given
\a destination value over \a time milliseconds.
*/
-void QmlTimeLine::move(GfxValue &gfxValue, qreal destination, int time)
+void QmlTimeLine::move(QmlTimeLineValue &timeLineValue, qreal destination, int time)
{
if(time <= 0) return;
QmlTimeLinePrivate::Op op(QmlTimeLinePrivate::Op::Move, time, destination, 0.0f, d->order++);
- d->add(gfxValue, op);
+ d->add(timeLineValue, op);
}
/*!
- Change the \a gfxValue from its current value to the given \a destination
+ Change the \a timeLineValue from its current value to the given \a destination
value over \a time milliseconds using the \a easing curve.
*/
-void QmlTimeLine::move(GfxValue &gfxValue, qreal destination, const QEasingCurve &easing, int time)
+void QmlTimeLine::move(QmlTimeLineValue &timeLineValue, qreal destination, const QEasingCurve &easing, int time)
{
if(time <= 0) return;
QmlTimeLinePrivate::Op op(QmlTimeLinePrivate::Op::Move, time, destination, 0.0f, d->order++, QmlTimeLineEvent(), easing);
- d->add(gfxValue, op);
+ d->add(timeLineValue, op);
}
/*!
- Linearly change the \a gfxValue from its current value by the \a change amount
+ Linearly change the \a timeLineValue from its current value by the \a change amount
over \a time milliseconds.
*/
-void QmlTimeLine::moveBy(GfxValue &gfxValue, qreal change, int time)
+void QmlTimeLine::moveBy(QmlTimeLineValue &timeLineValue, qreal change, int time)
{
if(time <= 0) return;
QmlTimeLinePrivate::Op op(QmlTimeLinePrivate::Op::MoveBy, time, change, 0.0f, d->order++);
- d->add(gfxValue, op);
+ d->add(timeLineValue, op);
}
/*!
- Change the \a gfxValue from its current value by the \a change amount over
+ Change the \a timeLineValue from its current value by the \a change amount over
\a time milliseconds using the \a easing curve.
*/
-void QmlTimeLine::moveBy(GfxValue &gfxValue, qreal change, const QEasingCurve &easing, int time)
+void QmlTimeLine::moveBy(QmlTimeLineValue &timeLineValue, qreal change, const QEasingCurve &easing, int time)
{
if(time <= 0) return;
QmlTimeLinePrivate::Op op(QmlTimeLinePrivate::Op::MoveBy, time, change, 0.0f, d->order++, QmlTimeLineEvent(), easing);
- d->add(gfxValue, op);
+ d->add(timeLineValue, op);
}
/*!
- Cancel (but don't complete) all scheduled actions for \a gfxValue.
+ Cancel (but don't complete) all scheduled actions for \a timeLineValue.
*/
-void QmlTimeLine::reset(GfxValue &gfxValue)
+void QmlTimeLine::reset(QmlTimeLineValue &timeLineValue)
{
- if(!gfxValue._t)
+ if(!timeLineValue._t)
return;
- if(gfxValue._t != this) {
- qWarning() << "QmlTimeLine: Cannot reset a GfxValue owned by another timeline.";
+ if(timeLineValue._t != this) {
+ qWarning() << "QmlTimeLine: Cannot reset a QmlTimeLineValue owned by another timeline.";
return;
}
- remove(&gfxValue);
- gfxValue._t = 0;
+ remove(&timeLineValue);
+ timeLineValue._t = 0;
}
int QmlTimeLine::duration() const
@@ -516,48 +516,48 @@ int QmlTimeLine::duration() const
}
/*!
- Synchronize the end point of \a gfxValue to the endpoint of \a syncTo
+ Synchronize the end point of \a timeLineValue to the endpoint of \a syncTo
within this timeline.
- Following operations on \a gfxValue in this timeline will be scheduled after
+ Following operations on \a timeLineValue in this timeline will be scheduled after
all the currently scheduled actions on \a syncTo are complete. In
psuedo-code this is equivalent to:
\code
- QmlTimeLine::pause(gfxValue, min(0, length_of(syncTo) - length_of(gfxValue)))
+ QmlTimeLine::pause(timeLineValue, min(0, length_of(syncTo) - length_of(timeLineValue)))
\endcode
*/
-void QmlTimeLine::sync(GfxValue &gfxValue, GfxValue &syncTo)
+void QmlTimeLine::sync(QmlTimeLineValue &timeLineValue, QmlTimeLineValue &syncTo)
{
QmlTimeLinePrivate::Ops::Iterator iter = d->ops.find(&syncTo);
if(iter == d->ops.end())
return;
int length = iter->length;
- iter = d->ops.find(&gfxValue);
+ iter = d->ops.find(&timeLineValue);
if(iter == d->ops.end()) {
- pause(gfxValue, length);
+ pause(timeLineValue, length);
} else {
int glength = iter->length;
- pause(gfxValue, length - glength);
+ pause(timeLineValue, length - glength);
}
}
/*!
- Synchronize the end point of \a gfxValue to the endpoint of the longest
- action currently scheduled in the timeline.
+ Synchronize the end point of \a timeLineValue to the endpoint of the longest
+ action cursrently scheduled in the timeline.
In psuedo-code, this is equivalent to:
\code
- QmlTimeLine::pause(gfxValue, length_of(timeline) - length_of(gfxValue))
+ QmlTimeLine::pause(timeLineValue, length_of(timeline) - length_of(timeLineValue))
\endcode
*/
-void QmlTimeLine::sync(GfxValue &gfxValue)
+void QmlTimeLine::sync(QmlTimeLineValue &timeLineValue)
{
- QmlTimeLinePrivate::Ops::Iterator iter = d->ops.find(&gfxValue);
+ QmlTimeLinePrivate::Ops::Iterator iter = d->ops.find(&timeLineValue);
if(iter == d->ops.end()) {
- pause(gfxValue, d->length);
+ pause(timeLineValue, d->length);
} else {
- pause(gfxValue, d->length - iter->length);
+ pause(timeLineValue, d->length - iter->length);
}
}
@@ -620,7 +620,7 @@ int QmlTimeLine::syncPoint() const
/*!
Returns true if the timeline is active. An active timeline is one where
- GfxValue actions are still pending.
+ QmlTimeLineValue actions are still pending.
*/
bool QmlTimeLine::isActive() const
{
@@ -630,7 +630,7 @@ bool QmlTimeLine::isActive() const
/*!
Completes the timeline. All queued actions are played to completion, and then discarded. For example,
\code
- GfxValue v(0.);
+ QmlTimeLineValue v(0.);
QmlTimeLine tl;
tl.move(v, 100., 1000.);
// 500 ms passes
@@ -645,9 +645,9 @@ void QmlTimeLine::complete()
}
/*!
- Resets the timeline. All queued actions are discarded and GfxValue's retain their current value. For example,
+ Resets the timeline. All queued actions are discarded and QmlTimeLineValue's retain their current value. For example,
\code
- GfxValue v(0.);
+ QmlTimeLineValue v(0.);
QmlTimeLine tl;
tl.move(v, 100., 1000.);
// 500 ms passes
@@ -674,8 +674,8 @@ int QmlTimeLine::time() const
/*!
\fn void QmlTimeLine::updated()
- Emitted each time the timeline modifies GfxValues. Even if multiple
- GfxValues are changed, this signal is only emitted once for each clock tick.
+ Emitted each time the timeline modifies QmlTimeLineValues. Even if multiple
+ QmlTimeLineValues are changed, this signal is only emitted once for each clock tick.
*/
void QmlTimeLine::updateCurrentTime(int v)
@@ -747,7 +747,7 @@ int QmlTimeLinePrivate::advance(int t)
QList<QPair<int, Update> > updates;
for(Ops::Iterator iter = ops.begin(); iter != ops.end(); ) {
- GfxValue *v = static_cast<GfxValue *>(iter.key());
+ QmlTimeLineValue *v = static_cast<QmlTimeLineValue *>(iter.key());
TimeLine &tl = *iter;
Q_ASSERT(!tl.ops.isEmpty());
@@ -868,31 +868,31 @@ void QmlTimeLine::remove(QmlTimeLineObject *v)
}
/*!
- \class GfxValue
+ \class QmlTimeLineValue
\ingroup group_animation
- \brief The GfxValue class is modified by QmlTimeLine.
+ \brief The QmlTimeLineValue class is modified by QmlTimeLine.
*/
/*!
- \fn GfxValue::GfxValue(qreal value = 0)
+ \fn QmlTimeLineValue::QmlTimeLineValue(qreal value = 0)
- Construct a new GfxValue with an initial \a value.
+ Construct a new QmlTimeLineValue with an initial \a value.
*/
/*!
- \fn qreal GfxValue::value() const
+ \fn qreal QmlTimeLineValue::value() const
Return the current value.
*/
/*!
- \fn void GfxValue::setValue(qreal value)
+ \fn void QmlTimeLineValue::setValue(qreal value)
Set the current \a value.
*/
/*!
- \fn QmlTimeLine *GfxValue::timeLine() const
+ \fn QmlTimeLine *QmlTimeLineValue::timeLine() const
If a QmlTimeLine is operating on this value, return a pointer to it,
otherwise return null.
diff --git a/src/declarative/timeline/qmltimeline.h b/src/declarative/timeline/qmltimeline.h
index 603669c..ce9d1f2 100644
--- a/src/declarative/timeline/qmltimeline.h
+++ b/src/declarative/timeline/qmltimeline.h
@@ -53,7 +53,7 @@ QT_BEGIN_NAMESPACE
QT_MODULE(Declarative)
class QEasingCurve;
-class GfxValue;
+class QmlTimeLineValue;
class QmlTimeLineEvent;
struct QmlTimeLinePrivate;
class QmlTimeLineObject;
@@ -70,25 +70,25 @@ public:
void pause(QmlTimeLineObject &, int);
void execute(const QmlTimeLineEvent &);
- void set(GfxValue &, qreal);
+ void set(QmlTimeLineValue &, qreal);
- int accel(GfxValue &, qreal velocity, qreal accel);
- int accel(GfxValue &, qreal velocity, qreal accel, qreal maxDistance);
- int accelDistance(GfxValue &, qreal velocity, qreal distance);
+ int accel(QmlTimeLineValue &, qreal velocity, qreal accel);
+ int accel(QmlTimeLineValue &, qreal velocity, qreal accel, qreal maxDistance);
+ int accelDistance(QmlTimeLineValue &, qreal velocity, qreal distance);
- void move(GfxValue &, qreal destination, int time = 500);
- void move(GfxValue &, qreal destination, const QEasingCurve &, int time = 500);
- void moveBy(GfxValue &, qreal change, int time = 500);
- void moveBy(GfxValue &, qreal change, const QEasingCurve &, int time = 500);
+ void move(QmlTimeLineValue &, qreal destination, int time = 500);
+ void move(QmlTimeLineValue &, qreal destination, const QEasingCurve &, int time = 500);
+ void moveBy(QmlTimeLineValue &, qreal change, int time = 500);
+ void moveBy(QmlTimeLineValue &, qreal change, const QEasingCurve &, int time = 500);
void sync();
void setSyncPoint(int);
int syncPoint() const;
- void sync(GfxValue &);
- void sync(GfxValue &, GfxValue &);
+ void sync(QmlTimeLineValue &);
+ void sync(QmlTimeLineValue &, QmlTimeLineValue &);
- void reset(GfxValue &);
+ void reset(QmlTimeLineValue &);
void complete();
void clear();
@@ -123,10 +123,10 @@ protected:
QmlTimeLine *_t;
};
-class Q_DECLARATIVE_EXPORT GfxValue : public QmlTimeLineObject
+class Q_DECLARATIVE_EXPORT QmlTimeLineValue : public QmlTimeLineObject
{
public:
- GfxValue(qreal v = 0.) : _v(v) {}
+ QmlTimeLineValue(qreal v = 0.) : _v(v) {}
qreal value() const { return _v; }
virtual void setValue(qreal v) { _v = v; }
@@ -134,7 +134,7 @@ public:
QmlTimeLine *timeLine() const { return _t; }
operator qreal() const { return _v; }
- GfxValue &operator=(qreal v) { setValue(v); return *this; }
+ QmlTimeLineValue &operator=(qreal v) { setValue(v); return *this; }
private:
friend class QmlTimeLine;
friend struct QmlTimeLinePrivate;
diff --git a/src/declarative/timeline/gfxvalueproxy.h b/src/declarative/timeline/qmltimelinevalueproxy.h
index 1bb716c..add45dd 100644
--- a/src/declarative/timeline/gfxvalueproxy.h
+++ b/src/declarative/timeline/qmltimelinevalueproxy.h
@@ -39,8 +39,8 @@
**
****************************************************************************/
-#ifndef GFXVALUEPROXY_H
-#define GFXVALUEPROXY_H
+#ifndef QMLTIMELINEVALUEPROXY_H
+#define QMLTIMELINEVALUEPROXY_H
#include "qmltimeline.h"
@@ -51,24 +51,24 @@ QT_BEGIN_NAMESPACE
QT_MODULE(Declarative)
template<class T>
-class GfxValueProxy : public GfxValue
+class QmlTimeLineValueProxy : public QmlTimeLineValue
{
public:
- GfxValueProxy(T *cls, void (T::*func)(qreal), qreal v = 0.)
- : GfxValue(v), _class(cls), _setFunctionReal(func), _setFunctionInt(0)
+ QmlTimeLineValueProxy(T *cls, void (T::*func)(qreal), qreal v = 0.)
+ : QmlTimeLineValue(v), _class(cls), _setFunctionReal(func), _setFunctionInt(0)
{
Q_ASSERT(_class);
}
- GfxValueProxy(T *cls, void (T::*func)(int), qreal v = 0.)
- : GfxValue(v), _class(cls), _setFunctionReal(0), _setFunctionInt(func)
+ QmlTimeLineValueProxy(T *cls, void (T::*func)(int), qreal v = 0.)
+ : QmlTimeLineValue(v), _class(cls), _setFunctionReal(0), _setFunctionInt(func)
{
Q_ASSERT(_class);
}
virtual void setValue(qreal v)
{
- GfxValue::setValue(v);
+ QmlTimeLineValue::setValue(v);
if(_setFunctionReal) (_class->*_setFunctionReal)(v);
else if(_setFunctionInt) (_class->*_setFunctionInt)((int)v);
}
@@ -83,4 +83,4 @@ QT_END_NAMESPACE
QT_END_HEADER
-#endif//GFXVALUEPROXY
+#endif//QMLTIMELINEVALUEPROXY_H
diff --git a/src/declarative/timeline/timeline.pri b/src/declarative/timeline/timeline.pri
index 0a0875c..a7b3cb9 100644
--- a/src/declarative/timeline/timeline.pri
+++ b/src/declarative/timeline/timeline.pri
@@ -3,5 +3,5 @@ SOURCES += \
HEADERS += \
timeline/qmltimeline.h \
- timeline/gfxvalueproxy.h \
+ timeline/qmltimelinevalueproxy.h \
diff --git a/src/declarative/util/qmlanimation.cpp b/src/declarative/util/qmlanimation.cpp
index c0b89be..f71d203 100644
--- a/src/declarative/util/qmlanimation.cpp
+++ b/src/declarative/util/qmlanimation.cpp
@@ -653,7 +653,7 @@ QmlColorAnimation::~QmlColorAnimation()
void QmlColorAnimationPrivate::init()
{
Q_Q(QmlColorAnimation);
- ca = new GfxValueAnimator(q);
+ ca = new QmlTimeLineValueAnimator(q);
ca->setStartValue(QVariant(0.0f));
ca->setEndValue(QVariant(1.0f));
}
@@ -791,7 +791,7 @@ void QmlColorAnimation::prepare(QmlMetaProperty &p)
else
d->property = d->userProperty;
d->fromSourced = false;
- d->value.GfxValue::setValue(0.);
+ d->value.QmlTimeLineValue::setValue(0.);
d->ca->setAnimValue(&d->value, QAbstractAnimation::KeepWhenStopped);
}
@@ -808,7 +808,7 @@ void QmlColorAnimation::transition(QmlStateActions &actions,
Q_D(QmlColorAnimation);
Q_UNUSED(direction);
- struct NTransitionData : public GfxValue
+ struct NTransitionData : public QmlTimeLineValue
{
QmlStateActions actions;
void write(QmlMetaProperty &property, const QColor &color)
@@ -820,7 +820,7 @@ void QmlColorAnimation::transition(QmlStateActions &actions,
void setValue(qreal v)
{
- GfxValue::setValue(v);
+ QmlTimeLineValue::setValue(v);
for(int ii = 0; ii < actions.count(); ++ii) {
Action &action = actions[ii];
@@ -1362,7 +1362,7 @@ QmlNumericAnimation::~QmlNumericAnimation()
void QmlNumericAnimationPrivate::init()
{
Q_Q(QmlNumericAnimation);
- na = new GfxValueAnimator(q);
+ na = new QmlTimeLineValueAnimator(q);
na->setStartValue(QVariant(0.0f));
na->setEndValue(QVariant(1.0f));
}
@@ -1600,7 +1600,7 @@ void QmlNumericAnimation::prepare(QmlMetaProperty &p)
else
d->property = d->userProperty;
d->fromSourced = false;
- d->value.GfxValue::setValue(0.);
+ d->value.QmlTimeLineValue::setValue(0.);
d->na->setAnimValue(&d->value, QAbstractAnimation::KeepWhenStopped);
}
@@ -1617,12 +1617,12 @@ void QmlNumericAnimation::transition(QmlStateActions &actions,
Q_D(QmlNumericAnimation);
Q_UNUSED(direction);
- struct NTransitionData : public GfxValue
+ struct NTransitionData : public QmlTimeLineValue
{
QmlStateActions actions;
void setValue(qreal v)
{
- GfxValue::setValue(v);
+ QmlTimeLineValue::setValue(v);
for(int ii = 0; ii < actions.count(); ++ii) {
Action &action = actions[ii];
@@ -1951,7 +1951,7 @@ QmlVariantAnimation::~QmlVariantAnimation()
void QmlVariantAnimationPrivate::init()
{
Q_Q(QmlVariantAnimation);
- va = new GfxValueAnimator(q);
+ va = new QmlTimeLineValueAnimator(q);
va->setStartValue(QVariant(0.0f));
va->setEndValue(QVariant(1.0f));
}
@@ -2157,7 +2157,7 @@ void QmlVariantAnimation::prepare(QmlMetaProperty &p)
d->convertVariant(d->from.value, (QVariant::Type)d->property.propertyType());
d->fromSourced = false;
- d->value.GfxValue::setValue(0.);
+ d->value.QmlTimeLineValue::setValue(0.);
d->va->setAnimValue(&d->value, QAbstractAnimation::KeepWhenStopped);
}
@@ -2168,12 +2168,12 @@ void QmlVariantAnimation::transition(QmlStateActions &actions,
Q_D(QmlVariantAnimation);
Q_UNUSED(direction);
- struct NTransitionData : public GfxValue
+ struct NTransitionData : public QmlTimeLineValue
{
QmlStateActions actions;
void setValue(qreal v)
{
- GfxValue::setValue(v);
+ QmlTimeLineValue::setValue(v);
for(int ii = 0; ii < actions.count(); ++ii) {
Action &action = actions[ii];
diff --git a/src/declarative/util/qmlanimation_p.h b/src/declarative/util/qmlanimation_p.h
index db7cb18..f14df82 100644
--- a/src/declarative/util/qmlanimation_p.h
+++ b/src/declarative/util/qmlanimation_p.h
@@ -52,7 +52,7 @@
#include <QVariantAnimation>
#include <QAnimationGroup>
#include <QColor>
-#include <gfxvalueproxy.h>
+#include <qmltimelinevalueproxy.h>
QT_BEGIN_NAMESPACE
@@ -112,13 +112,13 @@ private:
DeletionPolicy policy;
};
-//animates GfxValue (assumes start and end values will be reals or compatible)
-class GfxValueAnimator : public QVariantAnimation
+//animates QmlTimeLineValue (assumes start and end values will be reals or compatible)
+class QmlTimeLineValueAnimator : public QVariantAnimation
{
public:
- GfxValueAnimator(QObject *parent = 0) : QVariantAnimation(parent), animValue(0), policy(KeepWhenStopped) {}
- GfxValueAnimator(GfxValue *value, QObject *parent = 0) : QVariantAnimation(parent), animValue(value), policy(KeepWhenStopped) {}
- void setAnimValue(GfxValue *value, DeletionPolicy p)
+ QmlTimeLineValueAnimator(QObject *parent = 0) : QVariantAnimation(parent), animValue(0), policy(KeepWhenStopped) {}
+ QmlTimeLineValueAnimator(QmlTimeLineValue *value, QObject *parent = 0) : QVariantAnimation(parent), animValue(value), policy(KeepWhenStopped) {}
+ void setAnimValue(QmlTimeLineValue *value, DeletionPolicy p)
{
if (state() == Running)
stop();
@@ -141,7 +141,7 @@ protected:
}
private:
- GfxValue *animValue;
+ QmlTimeLineValue *animValue;
DeletionPolicy policy;
};
@@ -214,10 +214,10 @@ public:
bool fromSourced;
QColor fromValue;
QColor toValue;
- GfxValueAnimator *ca;
+ QmlTimeLineValueAnimator *ca;
virtual void valueChanged(qreal);
- GfxValueProxy<QmlColorAnimationPrivate> value;
+ QmlTimeLineValueProxy<QmlColorAnimationPrivate> value;
};
class QmlRunScriptActionPrivate : public QmlAbstractAnimationPrivate
@@ -295,10 +295,10 @@ public:
bool fromSourced;
qreal fromValue;
- GfxValueAnimator *na;
+ QmlTimeLineValueAnimator *na;
virtual void valueChanged(qreal);
- GfxValueProxy<QmlNumericAnimationPrivate> value;
+ QmlTimeLineValueProxy<QmlNumericAnimationPrivate> value;
};
class QmlAnimationGroupPrivate : public QmlAbstractAnimationPrivate
@@ -360,10 +360,10 @@ public:
bool fromSourced;
QVariant fromValue;
- GfxValueAnimator *va;
+ QmlTimeLineValueAnimator *va;
virtual void valueChanged(qreal);
- GfxValueProxy<QmlVariantAnimationPrivate> value;
+ QmlTimeLineValueProxy<QmlVariantAnimationPrivate> value;
static QVariant interpolateVariant(const QVariant &from, const QVariant &to, qreal progress);
static void convertVariant(QVariant &variant, QVariant::Type type);