summaryrefslogtreecommitdiffstats
path: root/src/declarative/util/qdeclarativeeasefollow.cpp
diff options
context:
space:
mode:
authorBea Lam <bea.lam@nokia.com>2010-03-03 23:39:52 (GMT)
committerBea Lam <bea.lam@nokia.com>2010-03-03 23:39:52 (GMT)
commit651f4336392f86cb5820e3e3cccdc56ec3a0efe8 (patch)
tree4435c8348f40a4a2be184063cc5a5197f61a650e /src/declarative/util/qdeclarativeeasefollow.cpp
parentf53ac4f7617bfdefcb62e9b27ee6bf1a91a7ed13 (diff)
parent5ac068602871b78eb4b58634d58e6b8898acbf8d (diff)
downloadQt-651f4336392f86cb5820e3e3cccdc56ec3a0efe8.zip
Qt-651f4336392f86cb5820e3e3cccdc56ec3a0efe8.tar.gz
Qt-651f4336392f86cb5820e3e3cccdc56ec3a0efe8.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-qml into 4.7
Diffstat (limited to 'src/declarative/util/qdeclarativeeasefollow.cpp')
-rw-r--r--src/declarative/util/qdeclarativeeasefollow.cpp34
1 files changed, 17 insertions, 17 deletions
diff --git a/src/declarative/util/qdeclarativeeasefollow.cpp b/src/declarative/util/qdeclarativeeasefollow.cpp
index 3fa9866..ee181dd 100644
--- a/src/declarative/util/qdeclarativeeasefollow.cpp
+++ b/src/declarative/util/qdeclarativeeasefollow.cpp
@@ -59,10 +59,10 @@ class QDeclarativeEaseFollowPrivate : public QObjectPrivate
public:
QDeclarativeEaseFollowPrivate()
: source(0), velocity(200), duration(-1), maximumEasingTime(-1),
- reversingMode(QDeclarativeEaseFollow::Eased), initialVelocity(0),
+ reversingMode(QDeclarativeEaseFollow::Eased), initialVelocity(0),
initialValue(0), invert(false), enabled(true), trackVelocity(0), clockOffset(0),
lastTick(0), clock(this)
- {}
+ {}
qreal source;
qreal velocity;
@@ -173,7 +173,7 @@ bool QDeclarativeEaseFollowPrivate::recalc()
}
/*
- qWarning() << "a:" << a << "tf:" << tf << "tp:" << tp << "vp:"
+ qWarning() << "a:" << a << "tf:" << tf << "tp:" << tp << "vp:"
<< vp << "sp:" << sp << "vi:" << vi << "invert:" << invert;
*/
return true;
@@ -254,19 +254,19 @@ void QDeclarativeEaseFollowPrivate::tick(int t)
\since 4.7
\brief The EaseFollow element allows a property to smoothly track a value.
- The EaseFollow smoothly animates a property's value to a set target value
+ The EaseFollow smoothly animates a property's value to a set target value
using an ease in/out quad easing curve. If the target value changes while
- the animation is in progress, the easing curves used to animate to the old
+ the animation is in progress, the easing curves used to animate to the old
and the new target values are spliced together to avoid any obvious visual
glitches.
The property animation is configured by setting the velocity at which the
- animation should occur, or the duration that the animation should take.
+ animation should occur, or the duration that the animation should take.
If both a velocity and a duration are specified, the one that results in
the quickest animation is chosen for each change in the target value.
For example, animating from 0 to 800 will take 4 seconds if a velocity
- of 200 is set, will take 8 seconds with a duration of 8000 set, and will
+ of 200 is set, will take 8 seconds with a duration of 8000 set, and will
take 4 seconds with both a velocity of 200 and a duration of 8000 set.
Animating from 0 to 20000 will take 10 seconds if a velocity of 200 is set,
will take 8 seconds with a duration of 8000 set, and will take 8 seconds
@@ -283,8 +283,8 @@ Rectangle {
color: "green"
width: 60; height: 60;
x: -5; y: -5;
- x: EaseFollow { source: rect1.x - 5; velocity: 200 }
- y: EaseFollow { source: rect1.y - 5; velocity: 200 }
+ EaseFollow on x { source: rect1.x - 5; velocity: 200 }
+ EaseFollow on y { source: rect1.y - 5; velocity: 200 }
}
Rectangle {
@@ -338,8 +338,8 @@ qreal QDeclarativeEaseFollow::sourceValue() const
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
- animation will immediately begin accelerating in the reverse direction,
+ then reverse direction. If the reversing mode is \c Immediate, the
+ animation will immediately begin accelerating in the reverse direction,
begining with a velocity of 0. If the reversing mode is \c Sync, the
property is immediately set to the target value.
*/
@@ -373,7 +373,7 @@ void QDeclarativeEaseFollowPrivate::restart()
return;
}
- bool hasReversed = trackVelocity != 0. &&
+ bool hasReversed = trackVelocity != 0. &&
((trackVelocity > 0) == ((initialValue - source) > 0));
if (hasReversed) {
@@ -440,7 +440,7 @@ void QDeclarativeEaseFollow::setDuration(qreal v)
d->duration = v;
d->trackVelocity = 0;
- if (d->clock.state() == QAbstractAnimation::Running)
+ if (d->clock.state() == QAbstractAnimation::Running)
d->restart();
emit durationChanged();
@@ -470,7 +470,7 @@ void QDeclarativeEaseFollow::setVelocity(qreal v)
d->velocity = v;
d->trackVelocity = 0;
- if (d->clock.state() == QAbstractAnimation::Running)
+ if (d->clock.state() == QAbstractAnimation::Running)
d->restart();
emit velocityChanged();
@@ -511,8 +511,8 @@ void QDeclarativeEaseFollow::setTarget(const QDeclarativeProperty &t)
\qmlproperty qreal EaseFollow::maximumEasingTime
This property specifies the maximum time an "eases" during the follow should take.
-Setting this property causes the velocity to "level out" after at a time. Setting
-a negative value reverts to the normal mode of easing over the entire animation
+Setting this property causes the velocity to "level out" after at a time. Setting
+a negative value reverts to the normal mode of easing over the entire animation
duration.
The default value is -1.
@@ -528,7 +528,7 @@ void QDeclarativeEaseFollow::setMaximumEasingTime(qreal v)
Q_D(QDeclarativeEaseFollow);
d->maximumEasingTime = v;
- if (d->clock.state() == QAbstractAnimation::Running)
+ if (d->clock.state() == QAbstractAnimation::Running)
d->restart();
emit maximumEasingTimeChanged();