summaryrefslogtreecommitdiffstats
path: root/examples/animation/easing
diff options
context:
space:
mode:
authorThierry Bastian <thierry.bastian@nokia.com>2009-09-28 13:52:32 (GMT)
committerThierry Bastian <thierry.bastian@nokia.com>2009-09-28 13:57:39 (GMT)
commit7626109da40a91cb38fbe3f23e08b50a04d2194a (patch)
treeb53358c91c08ecde5f4d12d5f20e1f6609fa17e7 /examples/animation/easing
parent124b4a1a5832d21d63722ee5ac68007083a4f8ae (diff)
downloadQt-7626109da40a91cb38fbe3f23e08b50a04d2194a.zip
Qt-7626109da40a91cb38fbe3f23e08b50a04d2194a.tar.gz
Qt-7626109da40a91cb38fbe3f23e08b50a04d2194a.tar.bz2
Animations: updateCurrentTime now receives the currentTime as paramater
Reviewed-by: Leo
Diffstat (limited to 'examples/animation/easing')
-rw-r--r--examples/animation/easing/animation.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/animation/easing/animation.h b/examples/animation/easing/animation.h
index 78fdc14..bd58be0 100644
--- a/examples/animation/easing/animation.h
+++ b/examples/animation/easing/animation.h
@@ -68,7 +68,7 @@ public:
m_path = QPainterPath();
}
- void updateCurrentTime()
+ void updateCurrentTime(int currentTime)
{
if (m_pathType == CirclePath) {
if (m_path.isEmpty()) {
@@ -78,7 +78,7 @@ public:
m_path.addEllipse(QRectF(from, to));
}
int dura = duration();
- const qreal progress = ((dura == 0) ? 1 : ((((currentTime() - 1) % dura) + 1) / qreal(dura)));
+ const qreal progress = ((dura == 0) ? 1 : ((((currentTime - 1) % dura) + 1) / qreal(dura)));
qreal easedProgress = easingCurve().valueForProgress(progress);
if (easedProgress > 1.0) {
@@ -90,7 +90,7 @@ public:
updateCurrentValue(pt);
emit valueChanged(pt);
} else {
- QPropertyAnimation::updateCurrentTime();
+ QPropertyAnimation::updateCurrentTime(currentTime);
}
}