[Qt-qml] SmoothedAnimation Soul Searching
Alan Alpert
alan.alpert at nokia.com
Fri Sep 3 12:10:17 CEST 2010
I'm looking for some feedback on what people think the real use case for
SmoothedAnimation is. There's currently two different cases that I'm looking
into.
A) Move from point C to point D, smoothly, where point D doesn't change
(much).
B) Move from point C to point D, smoothly, where point D is an animating or
constantly changing value.
We don't have SmoothFollow anymore so as to have a separate element for these
cases. My feeling is that you need a separate element due to the velocity
requirements.
For movement A you want the set velocity to be the average, so that you can
actually work out in your head how long it will take to get there.
For movement B you want the set velocity to be the maximum, as it will never
get 'there' unless either the target stops or it reaches the same velocity as
the target. Only setting the maximum velocity gives you the control you need
here. The duration means very little in this case as well, as the animation is
always being 'restarted' when the value changes. It's not quite the same as
doing movement A to the target of the animating value, because in that case
you could get ahead of that value and in this case you cannot.
Where I need some help is not only in verifying the reasoning I just threw out
there. I'm not yet convinced that option B is common enough to be a valid use
case. Does anyone know of a non-contrived example where you genuinely want
behavior B and not A?
--
Alan Alpert
Software Engineer
Nokia, Qt Development Frameworks
More information about the Qt-qml
mailing list