summaryrefslogtreecommitdiffstats
path: root/src/corelib/animation/qparallelanimationgroup.cpp
diff options
context:
space:
mode:
authorMichael Brasser <michael.brasser@nokia.com>2009-04-22 04:52:44 (GMT)
committerMichael Brasser <michael.brasser@nokia.com>2009-04-22 04:52:44 (GMT)
commitf2c5ea07b2ed5f96bd32f9a1d71ec9613c240fa6 (patch)
tree390ae15f24cd5b6af85b9bc74c39fd90ba03144b /src/corelib/animation/qparallelanimationgroup.cpp
parent1139eb432a18d556efb4ecfc079e82c2e2093b96 (diff)
parent3f39c3380f97339a1ffb9d13d7b184a8315d3821 (diff)
downloadQt-f2c5ea07b2ed5f96bd32f9a1d71ec9613c240fa6.zip
Qt-f2c5ea07b2ed5f96bd32f9a1d71ec9613c240fa6.tar.gz
Qt-f2c5ea07b2ed5f96bd32f9a1d71ec9613c240fa6.tar.bz2
Merge branch 'kinetic-animations' of ../../qt/kinetic into kinetic-declarativeui
Conflicts: src/gui/graphicsview/qgraphicsitem.cpp
Diffstat (limited to 'src/corelib/animation/qparallelanimationgroup.cpp')
-rw-r--r--src/corelib/animation/qparallelanimationgroup.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/corelib/animation/qparallelanimationgroup.cpp b/src/corelib/animation/qparallelanimationgroup.cpp
index 993c577..407ffde 100644
--- a/src/corelib/animation/qparallelanimationgroup.cpp
+++ b/src/corelib/animation/qparallelanimationgroup.cpp
@@ -111,7 +111,7 @@ void QParallelAnimationGroup::updateCurrentTime(int)
if (d->animations.isEmpty())
return;
- if (d->currentIteration > d->lastIteration) {
+ if (d->currentLoop > d->lastLoop) {
// simulate completion of the loop
int dura = duration();
if (dura > 0) {
@@ -119,7 +119,7 @@ void QParallelAnimationGroup::updateCurrentTime(int)
animation->setCurrentTime(dura); // will stop
}
}
- } else if (d->currentIteration < d->lastIteration) {
+ } else if (d->currentLoop < d->lastLoop) {
// simulate completion of the loop seeking backwards
foreach (QAbstractAnimation *animation, d->animations) {
animation->setCurrentTime(0);
@@ -127,11 +127,11 @@ void QParallelAnimationGroup::updateCurrentTime(int)
}
}
- bool timeFwd = ((d->currentIteration == d->lastIteration && d->currentTime >= d->lastCurrentTime)
- || d->currentIteration > d->lastIteration);
+ bool timeFwd = ((d->currentLoop == d->lastLoop && d->currentTime >= d->lastCurrentTime)
+ || d->currentLoop > d->lastLoop);
#ifdef QANIMATION_DEBUG
qDebug("QParallellAnimationGroup %5d: setCurrentTime(%d), loop:%d, last:%d, timeFwd:%d, lastcurrent:%d, %d",
- __LINE__, d->currentTime, d->currentIteration, d->lastIteration, timeFwd, d->lastCurrentTime, state());
+ __LINE__, d->currentTime, d->currentLoop, d->lastLoop, timeFwd, d->lastCurrentTime, state());
#endif
// finally move into the actual time of the current loop
foreach (QAbstractAnimation *animation, d->animations) {
@@ -139,7 +139,7 @@ void QParallelAnimationGroup::updateCurrentTime(int)
if (dura == -1 && d->isUncontrolledAnimationFinished(animation))
continue;
if (dura == -1 || (d->currentTime <= dura && dura != 0)
- || (dura == 0 && d->currentIteration != d->lastIteration)) {
+ || (dura == 0 && d->currentLoop != d->lastLoop)) {
switch (state()) {
case Running:
animation->start();
@@ -165,7 +165,7 @@ void QParallelAnimationGroup::updateCurrentTime(int)
if (d->currentTime > dura)
animation->stop();
}
- d->lastIteration = d->currentIteration;
+ d->lastLoop = d->currentLoop;
d->lastCurrentTime = d->currentTime;
}
@@ -207,7 +207,7 @@ void QParallelAnimationGroupPrivate::_q_uncontrolledAnimationFinished()
Q_ASSERT(animation);
int uncontrolledRunningCount = 0;
- if (animation->duration() == -1 || animation->iterationCount() < 0) {
+ if (animation->duration() == -1 || animation->loopCount() < 0) {
QHash<QAbstractAnimation *, int>::iterator it = uncontrolledFinishTime.begin();
while (it != uncontrolledFinishTime.end()) {
if (it.key() == animation) {
@@ -248,7 +248,7 @@ void QParallelAnimationGroupPrivate::connectUncontrolledAnimations()
Q_Q(QParallelAnimationGroup);
foreach (QAbstractAnimation *animation, animations) {
- if (animation->duration() == -1 || animation->iterationCount() < 0) {
+ if (animation->duration() == -1 || animation->loopCount() < 0) {
uncontrolledFinishTime[animation] = -1;
QObject::connect(animation, SIGNAL(finished()), q, SLOT(_q_uncontrolledAnimationFinished()));
}
@@ -273,11 +273,11 @@ void QParallelAnimationGroup::updateDirection(QAbstractAnimation::Direction dire
}
} else {
if (direction == Forward) {
- d->lastIteration = 0;
+ d->lastLoop = 0;
d->lastCurrentTime = 0;
} else {
- // Looping backwards with iterationCount == -1 does not really work well...
- d->lastIteration = (d->iterationCount == -1 ? 0 : d->iterationCount - 1);
+ // Looping backwards with loopCount == -1 does not really work well...
+ d->lastLoop = (d->loopCount == -1 ? 0 : d->loopCount - 1);
d->lastCurrentTime = duration();
}
}