16template<
typename T, ColorSpace Space>
19 if (newClock == m_spec.clock) {
31 if (!m_loggedEpochMismatch) {
32 qCWarning(lcAnimatedValue)
33 <<
"rebindClock refused: epoch identity mismatch "
34 <<
"(old=" << m_spec.clock->epochIdentity() <<
", new=" << newClock->
epochIdentity()
35 <<
") — rebase would corrupt progress. Keeping captured clock.";
36 m_loggedEpochMismatch =
true;
41 const auto oldNow = m_spec.clock->now();
42 const auto newNow = newClock->
now();
43 const auto delta = newNow - oldNow;
44 *m_startTime += delta;
46 *m_lastTickTime += delta;
50 m_spec.clock = newClock;
58template<
typename T, ColorSpace Space>
59template<ColorSpace OtherSpace>
62 if (m_isAnimating || other.m_isAnimating) {
65 m_from = other.m_from;
67 m_current = other.m_current;
68 m_isComplete = other.m_isComplete;
73template<
typename T, ColorSpace Space>
74template<ColorSpace OtherSpace>
80 m_spec.clock = other.m_spec.clock;
81 m_spec.onValueChanged = other.m_spec.onValueChanged;
82 m_spec.onComplete = other.m_spec.onComplete;
83 m_spec.retargetPolicy = other.m_spec.retargetPolicy;
Unified motion primitive: one value of type T transitioning from start to target over time,...
Definition AnimatedValue.h:44
void rebindClock(IMotionClock *newClock)
Swap the driving clock without touching target/state/interpolation.
Definition AnimatedValue_lifecycle_extras.h:17
void seedSpecFrom(const AnimatedValue< T, OtherSpace > &other)
Companion to seedFrom — copies clock + callbacks, leaves profile alone.
Definition AnimatedValue_lifecycle_extras.h:75
void seedFrom(const AnimatedValue< T, OtherSpace > &other)
Cross-Space idle-state copy for color-space wrapper dispatch.
Definition AnimatedValue_lifecycle_extras.h:60
Abstract clock interface for the motion runtime.
Definition IMotionClock.h:18
static bool epochCompatible(const IMotionClock *a, const IMotionClock *b)
True iff both clocks are non-null and share the same non-null epochIdentity.
Definition IMotionClock.h:48
virtual void requestFrame()=0
Schedule another paint tick. Idempotent within a single frame.
virtual std::chrono::nanoseconds now() const =0
Monotonically non-decreasing steady-clock reading (nanoseconds).
virtual const void * epochIdentity() const
Opaque epoch identity for rebindClock compatibility.
Definition IMotionClock.h:39
Definition AnimatedValue.h:31