void QSmoothedAnimation::updateCurrentTime(int t) { qreal time_seconds = qreal(t - lastTime) / qreal(1000.); qreal value = easeFollow(time_seconds); value *= (invert? qreal(-1.0): qreal(1.0)); QDeclarativePropertyPrivate::write(target, initialValue + value, QDeclarativePropertyPrivate::BypassInterceptor | QDeclarativePropertyPrivate::DontRemoveBinding); }
void QSmoothedAnimation::updateCurrentTime(int t) { qreal time_seconds = useDelta ? qreal(QQmlAnimationTimer::instance()->currentDelta()) / 1000. : qreal(t - lastTime) / 1000.; if (useDelta) useDelta = false; qreal value = easeFollow(time_seconds); value *= (invert? -1.0: 1.0); QQmlPropertyPrivate::write(target, initialValue + value, QQmlPropertyPrivate::BypassInterceptor | QQmlPropertyPrivate::DontRemoveBinding); }
void QSmoothedAnimation::updateCurrentTime(int t) { if (!isRunning() && !isPaused()) // This can happen if init() stops the animation in some cases return; qreal time_seconds = useDelta ? qreal(QQmlAnimationTimer::instance()->currentDelta()) / 1000. : qreal(t - lastTime) / 1000.; if (useDelta) useDelta = false; qreal value = easeFollow(time_seconds); value *= (invert? -1.0: 1.0); QQmlPropertyPrivate::write(target, initialValue + value, QQmlPropertyPrivate::BypassInterceptor | QQmlPropertyPrivate::DontRemoveBinding); }