diff options
Diffstat (limited to 'src/corelib/animation')
-rw-r--r-- | src/corelib/animation/qparallelanimationgroup.cpp | 8 | ||||
-rw-r--r-- | src/corelib/animation/qpropertyanimation.cpp | 9 | ||||
-rw-r--r-- | src/corelib/animation/qsequentialanimationgroup.cpp | 9 | ||||
-rw-r--r-- | src/corelib/animation/qvariantanimation.cpp | 14 |
4 files changed, 5 insertions, 35 deletions
diff --git a/src/corelib/animation/qparallelanimationgroup.cpp b/src/corelib/animation/qparallelanimationgroup.cpp index e4dfc1bd6e..f3184d6e54 100644 --- a/src/corelib/animation/qparallelanimationgroup.cpp +++ b/src/corelib/animation/qparallelanimationgroup.cpp @@ -53,13 +53,7 @@ You can treat QParallelAnimationGroup as any other QAbstractAnimation, e.g., pause, resume, or add it to other animation groups. - \code - QParallelAnimationGroup *group = new QParallelAnimationGroup; - group->addAnimation(anim1); - group->addAnimation(anim2); - - group->start(); - \endcode + \snippet code/src_corelib_animation_qparallelanimationgroup.cpp 0 In this example, \c anim1 and \c anim2 are two \l{QPropertyAnimation}s that have already been set up. diff --git a/src/corelib/animation/qpropertyanimation.cpp b/src/corelib/animation/qpropertyanimation.cpp index 5ba2a1fa73..f616dc71f8 100644 --- a/src/corelib/animation/qpropertyanimation.cpp +++ b/src/corelib/animation/qpropertyanimation.cpp @@ -56,14 +56,7 @@ makes it possible to animate many of Qt's widgets. Let's look at an example: - \code - QPropertyAnimation *animation = new QPropertyAnimation(myWidget, "geometry"); - animation->setDuration(10000); - animation->setStartValue(QRect(0, 0, 100, 30)); - animation->setEndValue(QRect(250, 250, 100, 30)); - - animation->start(); - \endcode + \snippet code/src_corelib_animation_qpropertyanimation.cpp 0 The property name and the QObject instance of which property should be animated are passed to the constructor. You can then diff --git a/src/corelib/animation/qsequentialanimationgroup.cpp b/src/corelib/animation/qsequentialanimationgroup.cpp index f5f538337e..23725ae415 100644 --- a/src/corelib/animation/qsequentialanimationgroup.cpp +++ b/src/corelib/animation/qsequentialanimationgroup.cpp @@ -61,14 +61,7 @@ groups. You can also call addPause() or insertPause() to add a pause to a sequential animation group. - \code - QSequentialAnimationGroup *group = new QSequentialAnimationGroup; - - group->addAnimation(anim1); - group->addAnimation(anim2); - - group->start(); - \endcode + \snippet code/src_corelib_animation_qsequentialanimationgroup.cpp 0 In this example, \c anim1 and \c anim2 are two already set up \l{QPropertyAnimation}s. diff --git a/src/corelib/animation/qvariantanimation.cpp b/src/corelib/animation/qvariantanimation.cpp index 3c90d71c7d..8711ec8a31 100644 --- a/src/corelib/animation/qvariantanimation.cpp +++ b/src/corelib/animation/qvariantanimation.cpp @@ -118,15 +118,7 @@ QT_BEGIN_NAMESPACE and the current progress. Example: - \code - QVariant myColorInterpolator(const QColor &start, const QColor &end, qreal progress) - { - ... - return QColor(...); - } - ... - qRegisterAnimationInterpolator<QColor>(myColorInterpolator); - \endcode + \snippet code/src_corelib_animation_qvariantanimation.cpp 0 Another option is to reimplement interpolated(), which returns interpolation values for the value being interpolated. @@ -418,9 +410,7 @@ static QBasicMutex registeredInterpolatorsMutex; This is a typedef for a pointer to a function with the following signature: - \code - QVariant myInterpolator(const QVariant &from, const QVariant &to, qreal progress); - \endcode + \snippet code/src_corelib_animation_qvariantanimation.cpp 1 */ |