Fix QVariantAnimation documentation
Since 5.0, this class is not abstract. Only the documentation of updateCurrentValue was updated at that time. Fix the class reference and the mentions of the class being abstract in the Animation Framework overview. Change-Id: I8ef9accb0b870dc8eb75bfc74361c7f2ad8d1d8b Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>bb10
parent
76810e1495
commit
f9c60038bf
|
|
@ -48,15 +48,13 @@ QT_BEGIN_NAMESPACE
|
|||
\class QVariantAnimation
|
||||
\inmodule QtCore
|
||||
\ingroup animation
|
||||
\brief The QVariantAnimation class provides an abstract base class for animations.
|
||||
\brief The QVariantAnimation class provides a base class for animations.
|
||||
\since 4.6
|
||||
|
||||
This class is part of \l{The Animation Framework}. It serves as a
|
||||
base class for property and item animations, with functions for
|
||||
shared functionality.
|
||||
|
||||
QVariantAnimation cannot be used directly as it is an abstract
|
||||
class; it has a pure virtual method called updateCurrentValue().
|
||||
The class performs interpolation over
|
||||
\l{QVariant}s, but leaves using the interpolated values to its
|
||||
subclasses. Currently, Qt provides QPropertyAnimation, which
|
||||
|
|
@ -69,7 +67,7 @@ QT_BEGIN_NAMESPACE
|
|||
start the animation. QVariantAnimation will interpolate the
|
||||
property of the target object and emit valueChanged(). To react to
|
||||
a change in the current value you have to reimplement the
|
||||
updateCurrentValue() virtual function.
|
||||
updateCurrentValue() virtual function or connect to said signal.
|
||||
|
||||
It is also possible to set values at specified steps situated
|
||||
between the start and end value. The interpolation will then
|
||||
|
|
|
|||
|
|
@ -118,11 +118,12 @@
|
|||
|
||||
\section1 Animating Qt Properties
|
||||
|
||||
As mentioned in the previous section, the QPropertyAnimation class
|
||||
can interpolate over Qt properties. It is this class that should
|
||||
be used for animation of values; in fact, its superclass,
|
||||
QVariantAnimation, is an abstract class, and cannot be used
|
||||
directly.
|
||||
As mentioned in the previous section, the QPropertyAnimation class can
|
||||
interpolate over Qt properties. It is often this class that should be used
|
||||
for animation of values; in fact, its superclass, QVariantAnimation, has an
|
||||
empty implementation of \l{QAbstractAnimation::}{updateCurrentValue()}, and
|
||||
does not change any value unless we change it ourselves on the
|
||||
\l{QVariantAnimation::valueChanged()}{valueChanged signal}.
|
||||
|
||||
A major reason we chose to animate Qt properties is that it
|
||||
presents us with freedom to animate already existing classes in
|
||||
|
|
|
|||
Loading…
Reference in New Issue