summaryrefslogtreecommitdiffstats
path: root/src/declarative
diff options
context:
space:
mode:
authorMartin Jones <martin.jones@nokia.com>2009-09-10 03:21:36 (GMT)
committerMartin Jones <martin.jones@nokia.com>2009-09-10 03:21:36 (GMT)
commit2c0255521f00a1fd95988161a03c39631350eaba (patch)
tree20947c82c768b3aa785628e92ae0ee7a0ac3bfbd /src/declarative
parentc494da05e1d3cb597990098e9713a0af5364c828 (diff)
downloadQt-2c0255521f00a1fd95988161a03c39631350eaba.zip
Qt-2c0255521f00a1fd95988161a03c39631350eaba.tar.gz
Qt-2c0255521f00a1fd95988161a03c39631350eaba.tar.bz2
Follow renamed to SpringFollow.
Diffstat (limited to 'src/declarative')
-rw-r--r--src/declarative/QmlChanges.txt1
-rw-r--r--src/declarative/fx/qfxgridview.cpp16
-rw-r--r--src/declarative/fx/qfxlistview.cpp52
-rw-r--r--src/declarative/fx/qfxlistview.h1
-rw-r--r--src/declarative/util/qmleasefollow.cpp28
-rw-r--r--src/declarative/util/qmleasefollow.h4
-rw-r--r--src/declarative/util/qmlspringfollow.cpp (renamed from src/declarative/util/qmlfollow.cpp)134
-rw-r--r--src/declarative/util/qmlspringfollow.h (renamed from src/declarative/util/qmlfollow.h)12
-rw-r--r--src/declarative/util/util.pri4
9 files changed, 158 insertions, 94 deletions
diff --git a/src/declarative/QmlChanges.txt b/src/declarative/QmlChanges.txt
index 87873f2..9043421 100644
--- a/src/declarative/QmlChanges.txt
+++ b/src/declarative/QmlChanges.txt
@@ -29,6 +29,7 @@ SetPropertyAction -> PropertyAction
RunScriptAction -> ScriptAction
ParentChangeAction -> ParentAction
VisualModel -> VisualDataModel
+Follow -> SpringFollow
Renamed properties:
Item: contents -> childrenRect
diff --git a/src/declarative/fx/qfxgridview.cpp b/src/declarative/fx/qfxgridview.cpp
index cccd7a6..dfb04ad 100644
--- a/src/declarative/fx/qfxgridview.cpp
+++ b/src/declarative/fx/qfxgridview.cpp
@@ -41,7 +41,7 @@
#include "qfxvisualitemmodel.h"
#include "qlistmodelinterface.h"
-#include "qmlfollow.h"
+#include "qmleasefollow.h"
#include "private/qfxflickable_p.h"
#include "qfxgridview.h"
@@ -313,8 +313,8 @@ public:
enum MovementReason { Other, Key, Mouse };
MovementReason moveReason;
int buffer;
- QmlFollow *highlightXAnimator;
- QmlFollow *highlightYAnimator;
+ QmlEaseFollow *highlightXAnimator;
+ QmlEaseFollow *highlightYAnimator;
int ownModel : 1;
int wrap : 1;
@@ -591,15 +591,13 @@ void QFxGridViewPrivate::createHighlight()
if (item) {
item->setParent(q->viewport());
highlight = new FxGridItem(item, q);
- highlightXAnimator = new QmlFollow(q);
+ highlightXAnimator = new QmlEaseFollow(q);
highlightXAnimator->setTarget(QmlMetaProperty(highlight->item, QLatin1String("x")));
- highlightXAnimator->setSpring(3);
- highlightXAnimator->setDamping(0.3);
+ highlightXAnimator->setVelocity(400);
highlightXAnimator->setEnabled(autoHighlight);
- highlightYAnimator = new QmlFollow(q);
+ highlightYAnimator = new QmlEaseFollow(q);
highlightYAnimator->setTarget(QmlMetaProperty(highlight->item, QLatin1String("y")));
- highlightYAnimator->setSpring(3);
- highlightYAnimator->setDamping(0.3);
+ highlightYAnimator->setVelocity(400);
highlightYAnimator->setEnabled(autoHighlight);
} else {
delete highlightContext;
diff --git a/src/declarative/fx/qfxlistview.cpp b/src/declarative/fx/qfxlistview.cpp
index 6c0a83e..49de016 100644
--- a/src/declarative/fx/qfxlistview.cpp
+++ b/src/declarative/fx/qfxlistview.cpp
@@ -40,7 +40,7 @@
****************************************************************************/
#include "private/qfxflickable_p.h"
-#include "qmlfollow.h"
+#include "qmleasefollow.h"
#include "qlistmodelinterface.h"
#include "qfxvisualitemmodel.h"
#include "qfxlistview.h"
@@ -381,8 +381,8 @@ public:
enum MovementReason { Other, Key, Mouse };
MovementReason moveReason;
int buffer;
- QmlFollow *highlightPosAnimator;
- QmlFollow *highlightSizeAnimator;
+ QmlEaseFollow *highlightPosAnimator;
+ QmlEaseFollow *highlightSizeAnimator;
QString sectionExpression;
QString currentSection;
int spacing;
@@ -660,15 +660,18 @@ void QFxListViewPrivate::createHighlight()
}
if (item) {
highlight = new FxListItem(item, q);
+ if (orient == Qt::Vertical)
+ highlight->item->setHeight(currentItem->item->height());
+ else
+ highlight->item->setWidth(currentItem->item->width());
const QLatin1String posProp(orient == Qt::Vertical ? "y" : "x");
- highlightPosAnimator = new QmlFollow(q);
+ highlightPosAnimator = new QmlEaseFollow(q);
highlightPosAnimator->setTarget(QmlMetaProperty(highlight->item, posProp));
- highlightPosAnimator->setEpsilon(0.25);
- highlightPosAnimator->setSpring(2.5);
- highlightPosAnimator->setDamping(0.35);
+ highlightPosAnimator->setVelocity(400);
highlightPosAnimator->setEnabled(autoHighlight);
const QLatin1String sizeProp(orient == Qt::Vertical ? "height" : "width");
- highlightSizeAnimator = new QmlFollow(q);
+ highlightSizeAnimator = new QmlEaseFollow(q);
+ highlightSizeAnimator->setVelocity(400);
highlightSizeAnimator->setTarget(QmlMetaProperty(highlight->item, sizeProp));
highlightSizeAnimator->setEnabled(autoHighlight);
}
@@ -909,6 +912,7 @@ void QFxListView::setModel(const QVariant &model)
if (d->model) {
disconnect(d->model, SIGNAL(itemsInserted(int,int)), this, SLOT(itemsInserted(int,int)));
disconnect(d->model, SIGNAL(itemsRemoved(int,int)), this, SLOT(itemsRemoved(int,int)));
+ disconnect(d->model, SIGNAL(itemsMoved(int,int,int)), this, SLOT(itemsMoved(int,int,int)));
disconnect(d->model, SIGNAL(createdItem(int, QFxItem*)), this, SLOT(createdItem(int,QFxItem*)));
disconnect(d->model, SIGNAL(destroyingItem(QFxItem*)), this, SLOT(destroyingItem(QFxItem*)));
}
@@ -937,6 +941,7 @@ void QFxListView::setModel(const QVariant &model)
d->updateCurrent(d->currentIndex);
connect(d->model, SIGNAL(itemsInserted(int,int)), this, SLOT(itemsInserted(int,int)));
connect(d->model, SIGNAL(itemsRemoved(int,int)), this, SLOT(itemsRemoved(int,int)));
+ connect(d->model, SIGNAL(itemsMoved(int,int,int)), this, SLOT(itemsMoved(int,int,int)));
connect(d->model, SIGNAL(createdItem(int, QFxItem*)), this, SLOT(createdItem(int,QFxItem*)));
connect(d->model, SIGNAL(destroyingItem(QFxItem*)), this, SLOT(destroyingItem(QFxItem*)));
refill();
@@ -1635,6 +1640,37 @@ void QFxListView::destroyRemoved()
d->layout();
}
+void QFxListView::itemsMoved(int from, int to, int count)
+{
+ qWarning() << "ListView does not support moving in models";
+
+ Q_D(QFxListView);
+ int fromCount = count;
+ int toCount = count;
+ bool fromVisible = d->mapRangeFromModel(from, fromCount);
+ bool toVisible = d->mapRangeFromModel(to, toCount);
+
+ if (!fromVisible && !toVisible) {
+ // The items are outside the visible range.
+ if (d->visibleItems.count())
+ d->visibleIndex = -1;
+ for (int i = 0; i < d->visibleItems.count(); ++i) {
+ FxListItem *listItem = d->visibleItems.at(i);
+ if (listItem->index != -1) {
+ listItem->index = d->model->indexOf(listItem->item, this);
+ if (d->visibleIndex < 0)
+ d->visibleIndex = listItem->index;
+ }
+ }
+ if (d->currentItem) {
+ d->currentItem->index = d->model->indexOf(d->currentItem->item, this);
+ d->currentIndex = d->currentItem->index;
+ }
+ return;
+ }
+
+}
+
void QFxListView::createdItem(int index, QFxItem *item)
{
Q_D(QFxListView);
diff --git a/src/declarative/fx/qfxlistview.h b/src/declarative/fx/qfxlistview.h
index dc0b039..829e202 100644
--- a/src/declarative/fx/qfxlistview.h
+++ b/src/declarative/fx/qfxlistview.h
@@ -155,6 +155,7 @@ private Q_SLOTS:
void itemResized();
void itemsInserted(int index, int count);
void itemsRemoved(int index, int count);
+ void itemsMoved(int from, int to, int count);
void destroyRemoved();
void createdItem(int index, QFxItem *item);
void destroyingItem(QFxItem *item);
diff --git a/src/declarative/util/qmleasefollow.cpp b/src/declarative/util/qmleasefollow.cpp
index 83dbde7..b58ad14 100644
--- a/src/declarative/util/qmleasefollow.cpp
+++ b/src/declarative/util/qmleasefollow.cpp
@@ -56,7 +56,7 @@ public:
QmlEaseFollowPrivate()
: source(0), velocity(200), duration(-1),
reversingMode(QmlEaseFollow::Eased), initialVelocity(0),
- initialValue(0), invert(false), trackVelocity(0), clockOffset(0),
+ initialValue(0), invert(false), enabled(true), trackVelocity(0), clockOffset(0),
lastTick(0), clock(this)
{}
@@ -68,6 +68,7 @@ public:
qreal initialVelocity;
qreal initialValue;
bool invert;
+ bool enabled;
qreal trackVelocity;
@@ -267,7 +268,7 @@ qreal QmlEaseFollow::sourceValue() const
/*!
\qmlproperty enumeration EaseFollow::reversingMode
- Sets how the EaseFollow behaves if an animation diration is reversed.
+ Sets how the EaseFollow behaves if an animation direction is reversed.
If reversing mode is \c Eased, the animation will smoothly decelerate, and
then reverse direction. If the reversing mode is \c Immediate, the
@@ -289,6 +290,9 @@ void QmlEaseFollow::setReversingMode(ReversingMode m)
void QmlEaseFollowPrivate::restart()
{
+ if (!enabled)
+ return;
+
initialValue = target.read().toReal();
if (source == initialValue) {
@@ -382,6 +386,26 @@ void QmlEaseFollow::setVelocity(qreal v)
d->restart();
}
+/*!
+ \qmlproperty bool EaseFollow::enabled
+ This property holds whether the target will track the source.
+*/
+bool QmlEaseFollow::enabled() const
+{
+ Q_D(const QmlEaseFollow);
+ return d->enabled;
+}
+
+void QmlEaseFollow::setEnabled(bool enabled)
+{
+ Q_D(QmlEaseFollow);
+ d->enabled = enabled;
+ if (enabled)
+ d->restart();
+ else
+ d->clockStop();
+}
+
void QmlEaseFollow::setTarget(const QmlMetaProperty &t)
{
Q_D(QmlEaseFollow);
diff --git a/src/declarative/util/qmleasefollow.h b/src/declarative/util/qmleasefollow.h
index adcb647..8e8c59d 100644
--- a/src/declarative/util/qmleasefollow.h
+++ b/src/declarative/util/qmleasefollow.h
@@ -66,6 +66,7 @@ class Q_DECLARATIVE_EXPORT QmlEaseFollow : public QObject,
Q_PROPERTY(qreal velocity READ velocity WRITE setVelocity)
Q_PROPERTY(qreal duration READ duration WRITE setDuration)
Q_PROPERTY(ReversingMode reversingMode READ reversingMode WRITE setReversingMode)
+ Q_PROPERTY(bool enabled READ enabled WRITE setEnabled)
public:
enum ReversingMode { Eased, Immediate, Sync };
@@ -85,6 +86,9 @@ public:
qreal duration() const;
void setDuration(qreal);
+ bool enabled() const;
+ void setEnabled(bool enabled);
+
virtual void setTarget(const QmlMetaProperty &);
};
diff --git a/src/declarative/util/qmlfollow.cpp b/src/declarative/util/qmlspringfollow.cpp
index fe5303f..8c902aa 100644
--- a/src/declarative/util/qmlfollow.cpp
+++ b/src/declarative/util/qmlspringfollow.cpp
@@ -43,18 +43,18 @@
#include <math.h>
#include <QtCore/qdebug.h>
#include "private/qobject_p.h"
-#include "qmlfollow.h"
+#include "qmlspringfollow.h"
#include "private/qmlanimation_p.h"
QT_BEGIN_NAMESPACE
-QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,Follow,QmlFollow)
+QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,SpringFollow,QmlSpringFollow)
-class QmlFollowPrivate : public QObjectPrivate
+class QmlSpringFollowPrivate : public QObjectPrivate
{
- Q_DECLARE_PUBLIC(QmlFollow)
+ Q_DECLARE_PUBLIC(QmlSpringFollow)
public:
- QmlFollowPrivate()
+ QmlSpringFollowPrivate()
: sourceValue(0), maxVelocity(0), lastTime(0)
, mass(1.0), useMass(false), spring(0.), damping(0.), velocity(0), epsilon(0.01)
, modulus(0.0), haveModulus(false), enabled(true), mode(Track), clock(this) {}
@@ -87,12 +87,12 @@ public:
void start();
void stop();
- QTickAnimationProxy<QmlFollowPrivate, &QmlFollowPrivate::tick> clock;
+ QTickAnimationProxy<QmlSpringFollowPrivate, &QmlSpringFollowPrivate::tick> clock;
};
-void QmlFollowPrivate::tick(int time)
+void QmlSpringFollowPrivate::tick(int time)
{
- Q_Q(QmlFollow);
+ Q_Q(QmlSpringFollow);
int elapsed = time - lastTime;
if (!elapsed)
@@ -174,7 +174,7 @@ void QmlFollowPrivate::tick(int time)
emit q->syncChanged();
}
-void QmlFollowPrivate::updateMode()
+void QmlSpringFollowPrivate::updateMode()
{
if (spring == 0. && maxVelocity == 0.)
mode = Track;
@@ -184,13 +184,13 @@ void QmlFollowPrivate::updateMode()
mode = Velocity;
}
-void QmlFollowPrivate::start()
+void QmlSpringFollowPrivate::start()
{
if (!enabled)
return;
- Q_Q(QmlFollow);
- if (mode == QmlFollowPrivate::Track) {
+ Q_Q(QmlSpringFollow);
+ if (mode == QmlSpringFollowPrivate::Track) {
currentValue = sourceValue;
property.write(currentValue);
} else if (sourceValue != currentValue && clock.state() != QAbstractAnimation::Running) {
@@ -201,14 +201,14 @@ void QmlFollowPrivate::start()
}
}
-void QmlFollowPrivate::stop()
+void QmlSpringFollowPrivate::stop()
{
clock.stop();
}
/*!
- \qmlclass Follow QmlFollow
- \brief The Follow element allows a property to track a value.
+ \qmlclass SpringFollow QmlSpringFollow
+ \brief The SpringFollow element allows a property to track a value.
In example below, Rect2 will follow Rect1 moving with a velocity of up to 200:
\code
@@ -233,43 +233,43 @@ void QmlFollowPrivate::stop()
x: Rect1.width
width: 20; height: 20
color: "#ff0000"
- y: Follow { source: Rect1.y; velocity: 200 }
+ y: SpringFollow { source: Rect1.y; velocity: 200 }
}
\endcode
*/
-QmlFollow::QmlFollow(QObject *parent)
-: QObject(*(new QmlFollowPrivate),parent)
+QmlSpringFollow::QmlSpringFollow(QObject *parent)
+: QObject(*(new QmlSpringFollowPrivate),parent)
{
}
-QmlFollow::~QmlFollow()
+QmlSpringFollow::~QmlSpringFollow()
{
}
-void QmlFollow::setTarget(const QmlMetaProperty &property)
+void QmlSpringFollow::setTarget(const QmlMetaProperty &property)
{
- Q_D(QmlFollow);
+ Q_D(QmlSpringFollow);
d->property = property;
d->currentValue = property.read().toDouble();
}
-qreal QmlFollow::sourceValue() const
+qreal QmlSpringFollow::sourceValue() const
{
- Q_D(const QmlFollow);
+ Q_D(const QmlSpringFollow);
return d->sourceValue;
}
/*!
- \qmlproperty qreal Follow::source
+ \qmlproperty qreal SpringFollow::source
This property holds the source value which will be tracked.
Bind to a property in order to track its changes.
*/
-void QmlFollow::setSourceValue(qreal value)
+void QmlSpringFollow::setSourceValue(qreal value)
{
- Q_D(QmlFollow);
+ Q_D(QmlSpringFollow);
if (d->sourceValue != value) {
d->sourceValue = value;
d->start();
@@ -277,26 +277,26 @@ void QmlFollow::setSourceValue(qreal value)
}
/*!
- \qmlproperty qreal Follow::velocity
+ \qmlproperty qreal SpringFollow::velocity
This property holds the maximum velocity allowed when tracking the source.
*/
-qreal QmlFollow::velocity() const
+qreal QmlSpringFollow::velocity() const
{
- Q_D(const QmlFollow);
+ Q_D(const QmlSpringFollow);
return d->maxVelocity;
}
-void QmlFollow::setVelocity(qreal velocity)
+void QmlSpringFollow::setVelocity(qreal velocity)
{
- Q_D(QmlFollow);
+ Q_D(QmlSpringFollow);
d->maxVelocity = velocity;
d->velocityms = velocity / 1000.0;
d->updateMode();
}
/*!
- \qmlproperty qreal Follow::spring
+ \qmlproperty qreal SpringFollow::spring
This property holds the spring constant
The spring constant describes how strongly the target is pulled towards the
@@ -305,35 +305,35 @@ void QmlFollow::setVelocity(qreal velocity)
When a spring constant is set and the velocity property is greater than 0,
velocity limits the maximum speed.
*/
-qreal QmlFollow::spring() const
+qreal QmlSpringFollow::spring() const
{
- Q_D(const QmlFollow);
+ Q_D(const QmlSpringFollow);
return d->spring;
}
-void QmlFollow::setSpring(qreal spring)
+void QmlSpringFollow::setSpring(qreal spring)
{
- Q_D(QmlFollow);
+ Q_D(QmlSpringFollow);
d->spring = spring;
d->updateMode();
}
/*!
- \qmlproperty qreal Follow::damping
+ \qmlproperty qreal SpringFollow::damping
This property holds the spring damping constant
The damping constant describes how quickly a sprung follower comes to rest.
Useful range is 0 - 1.0
*/
-qreal QmlFollow::damping() const
+qreal QmlSpringFollow::damping() const
{
- Q_D(const QmlFollow);
+ Q_D(const QmlSpringFollow);
return d->damping;
}
-void QmlFollow::setDamping(qreal damping)
+void QmlSpringFollow::setDamping(qreal damping)
{
- Q_D(QmlFollow);
+ Q_D(QmlSpringFollow);
if (damping > 1.)
damping = 1.;
@@ -342,7 +342,7 @@ void QmlFollow::setDamping(qreal damping)
/*!
- \qmlproperty qreal Follow::epsilon
+ \qmlproperty qreal SpringFollow::epsilon
This property holds the spring epsilon
The epsilon is the rate and amount of change in the value which is close enough
@@ -351,34 +351,34 @@ void QmlFollow::setDamping(qreal damping)
The default is 0.01. Tuning this value can provide small performance improvements.
*/
-qreal QmlFollow::epsilon() const
+qreal QmlSpringFollow::epsilon() const
{
- Q_D(const QmlFollow);
+ Q_D(const QmlSpringFollow);
return d->epsilon;
}
-void QmlFollow::setEpsilon(qreal epsilon)
+void QmlSpringFollow::setEpsilon(qreal epsilon)
{
- Q_D(QmlFollow);
+ Q_D(QmlSpringFollow);
d->epsilon = epsilon;
}
/*!
- \qmlproperty qreal Follow::modulus
+ \qmlproperty qreal SpringFollow::modulus
This property holds the modulus value.
Setting a \a modulus forces the target value to "wrap around" at the modulus.
For example, setting the modulus to 360 will cause a value of 370 to wrap around to 10.
*/
-qreal QmlFollow::modulus() const
+qreal QmlSpringFollow::modulus() const
{
- Q_D(const QmlFollow);
+ Q_D(const QmlSpringFollow);
return d->modulus;
}
-void QmlFollow::setModulus(qreal modulus)
+void QmlSpringFollow::setModulus(qreal modulus)
{
- Q_D(QmlFollow);
+ Q_D(QmlSpringFollow);
if (d->modulus != modulus) {
d->haveModulus = modulus != 0.0;
d->modulus = modulus;
@@ -387,21 +387,21 @@ void QmlFollow::setModulus(qreal modulus)
}
/*!
- \qmlproperty qreal Follow::mass
+ \qmlproperty qreal SpringFollow::mass
This property holds the "mass" of the property being moved.
mass is 1.0 by default. Setting a different mass changes the dynamics of
a \l spring follow.
*/
-qreal QmlFollow::mass() const
+qreal QmlSpringFollow::mass() const
{
- Q_D(const QmlFollow);
+ Q_D(const QmlSpringFollow);
return d->mass;
}
-void QmlFollow::setMass(qreal mass)
+void QmlSpringFollow::setMass(qreal mass)
{
- Q_D(QmlFollow);
+ Q_D(QmlSpringFollow);
if (d->mass != mass && mass > 0.0) {
d->useMass = mass != 1.0;
d->mass = mass;
@@ -410,23 +410,23 @@ void QmlFollow::setMass(qreal mass)
}
/*!
- \qmlproperty qreal Follow::value
+ \qmlproperty qreal SpringFollow::value
The current value.
*/
/*!
- \qmlproperty bool Follow::enabled
+ \qmlproperty bool SpringFollow::enabled
This property holds whether the target will track the source.
*/
-bool QmlFollow::enabled() const
+bool QmlSpringFollow::enabled() const
{
- Q_D(const QmlFollow);
+ Q_D(const QmlSpringFollow);
return d->enabled;
}
-void QmlFollow::setEnabled(bool enabled)
+void QmlSpringFollow::setEnabled(bool enabled)
{
- Q_D(QmlFollow);
+ Q_D(QmlSpringFollow);
d->enabled = enabled;
if (enabled)
d->start();
@@ -435,21 +435,21 @@ void QmlFollow::setEnabled(bool enabled)
}
/*!
- \qmlproperty bool Follow::inSync
+ \qmlproperty bool SpringFollow::inSync
This property is true when target is equal to the source; otherwise
false. If inSync is true the target is not being animated.
If \l enabled is false then inSync will also be false.
*/
-bool QmlFollow::inSync() const
+bool QmlSpringFollow::inSync() const
{
- Q_D(const QmlFollow);
+ Q_D(const QmlSpringFollow);
return d->enabled && d->clock.state() != QAbstractAnimation::Running;
}
-qreal QmlFollow::value() const
+qreal QmlSpringFollow::value() const
{
- Q_D(const QmlFollow);
+ Q_D(const QmlSpringFollow);
return d->currentValue;
}
diff --git a/src/declarative/util/qmlfollow.h b/src/declarative/util/qmlspringfollow.h
index ff34d08..1b77861 100644
--- a/src/declarative/util/qmlfollow.h
+++ b/src/declarative/util/qmlspringfollow.h
@@ -51,12 +51,12 @@ QT_BEGIN_NAMESPACE
QT_MODULE(Declarative)
-class QmlFollowPrivate;
-class Q_DECLARATIVE_EXPORT QmlFollow : public QObject,
+class QmlSpringFollowPrivate;
+class Q_DECLARATIVE_EXPORT QmlSpringFollow : public QObject,
public QmlPropertyValueSource
{
Q_OBJECT
- Q_DECLARE_PRIVATE(QmlFollow)
+ Q_DECLARE_PRIVATE(QmlSpringFollow)
Q_INTERFACES(QmlPropertyValueSource)
Q_PROPERTY(qreal source READ sourceValue WRITE setSourceValue)
@@ -72,8 +72,8 @@ class Q_DECLARATIVE_EXPORT QmlFollow : public QObject,
Q_PROPERTY(bool inSync READ inSync NOTIFY syncChanged)
public:
- QmlFollow(QObject *parent=0);
- ~QmlFollow();
+ QmlSpringFollow(QObject *parent=0);
+ ~QmlSpringFollow();
virtual void setTarget(const QmlMetaProperty &);
@@ -106,7 +106,7 @@ Q_SIGNALS:
QT_END_NAMESPACE
-QML_DECLARE_TYPE(QmlFollow)
+QML_DECLARE_TYPE(QmlSpringFollow)
QT_END_HEADER
diff --git a/src/declarative/util/util.pri b/src/declarative/util/util.pri
index a57f69f..442380a 100644
--- a/src/declarative/util/util.pri
+++ b/src/declarative/util/util.pri
@@ -7,7 +7,7 @@ SOURCES += \
util/qmlscript.cpp \
util/qmlanimation.cpp \
util/qmlsystempalette.cpp \
- util/qmlfollow.cpp \
+ util/qmlspringfollow.cpp \
util/qmleasefollow.cpp \
util/qmlstate.cpp\
util/qmltransitionmanager.cpp \
@@ -33,7 +33,7 @@ HEADERS += \
util/qmlanimation.h \
util/qmlanimation_p.h \
util/qmlsystempalette.h \
- util/qmlfollow.h \
+ util/qmlspringfollow.h \
util/qmleasefollow.h \
util/qmlstate.h\
util/qmlstateoperations.h \