5#ifndef QVARIANTANIMATION_P_H
6#define QVARIANTANIMATION_P_H
20#include <QtCore/qeasingcurve.h>
21#include <QtCore/qmetaobject.h>
23#include "private/qabstractanimation_p.h"
24#include "private/qproperty_p.h"
32class QVariantAnimationPrivate :
public QAbstractAnimationPrivate
34 Q_DECLARE_PUBLIC(QVariantAnimation)
37 QVariantAnimationPrivate();
38 ~QVariantAnimationPrivate() override;
40 static QVariantAnimationPrivate *get(QVariantAnimation *q)
45 void setDefaultStartEndValue(
const QVariant &value);
48 QVariant currentValue;
49 QVariant defaultStartEndValue;
54 QVariantAnimation::KeyValue start, end;
57 void setEasingCurve(
const QEasingCurve &easing) { q_func()->setEasingCurve(easing); }
58 Q_OBJECT_COMPAT_PROPERTY(QVariantAnimationPrivate, QEasingCurve, easing,
59 &QVariantAnimationPrivate::setEasingCurve)
61 void setDuration(
int msecs) { q_func()->setDuration(msecs); }
62 Q_OBJECT_COMPAT_PROPERTY(QVariantAnimationPrivate,
int, duration,
63 &QVariantAnimationPrivate::setDuration)
65 QVariantAnimation::KeyValues keyValues;
66 QVariantAnimation::Interpolator interpolator;
68 void setCurrentValueForProgress(
const qreal progress);
69 void recalculateCurrentInterval(
bool force=
false);
70 void setValueAt(qreal,
const QVariant &);
71 QVariant valueAt(qreal step)
const;
72 void convertValues(
int t);
74 void updateInterpolator();
77 static Q_CORE_EXPORT QVariantAnimation::Interpolator getInterpolator(
int interpolationType);
82typename std::enable_if<
std::is_unsigned<T>::value, T>::
type
85 return T(f + t * progress - f * progress);
90typename std::enable_if<!
std::is_unsigned<T>::value, T>::
type
93 return T(f + (t - f) * progress);
98 return _q_interpolate(from, to, progress);
\inmodule QtCore\compares equality \compareswith equality QLine \endcompareswith
\inmodule QtCore\compares equality \compareswith equality QLineF \endcompareswith
\inmodule QtCore\reentrant
\inmodule QtCore\reentrant
QT_REQUIRE_CONFIG(animation)
static bool animationValueLessThan(const QVariantAnimation::KeyValue &p1, const QVariantAnimation::KeyValue &p2)
static QVariant defaultInterpolator(const void *, const void *, qreal)
QList< QVariantAnimation::Interpolator > QInterpolatorVector
static QVariantAnimation::Interpolator castToInterpolator(QVariant(*func)(const T &from, const T &to, qreal progress))
void qRegisterAnimationInterpolator(QVariant(*func)(const T &from, const T &to, qreal progress))
QVariant _q_interpolateVariant(const T &from, const T &to, qreal progress)
std::enable_if<!std::is_unsigned< T >::value, T >::type _q_interpolate(const T &f, const T &t, qreal progress)
std::enable_if< std::is_unsigned< T >::value, T >::type _q_interpolate(const T &f, const T &t, qreal progress)