For example a paused "default button" animation might want to update
the target to get "non-default button" looks meanwhile the animation
is paused.
Change-Id: Ibb854a40f38a8971e7233b1f34a83056e6a9d827
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
_startTime = time;
}
+void QStyleAnimation::updateTarget()
+{
+ QEvent event(QEvent::StyleAnimationUpdate);
+ QCoreApplication::sendEvent(target(), &event);
+}
+
bool QStyleAnimation::isUpdateNeeded() const
{
return true;
stop();
}
- if (isUpdateNeeded()) {
- QEvent event(QEvent::StyleAnimationUpdate);
- QCoreApplication::sendEvent(tgt, &event);
- }
+ if (isUpdateNeeded())
+ updateTarget();
}
}
QTime startTime() const;
void setStartTime(const QTime &time);
+ void updateTarget();
+
protected:
virtual bool isUpdateNeeded() const;
virtual void updateCurrentTime(int time);