320 #ifndef QT_NO_DEBUG_STREAM 321 #include <QtCore/qdebug.h> 322 #include <QtCore/qstring.h> 325 #ifndef QT_NO_DATASTREAM 326 #include <QtCore/qdatastream.h> 343 qreal overshoot = 1.70158)
369 return _t == other.
_t &&
376 #include "../../3rdparty/easing/easing.cpp" 415 return easeInElastic(t, a, p);
417 return easeOutElastic(t, a, p);
419 return easeInOutElastic(t, a, p);
421 return easeOutInElastic(t, a, p);
446 return easeInBounce(t, a);
448 return easeOutBounce(t, a);
450 return easeInOutBounce(t, a);
452 return easeOutInBounce(t, a);
477 return easeInBack(t, o);
479 return easeOutBack(t, o);
481 return easeInOutBack(t, o);
483 return easeOutInBack(t, o);
500 return &easeInOutQuad;
502 return &easeOutInQuad;
506 return &easeOutCubic;
508 return &easeInOutCubic;
510 return &easeOutInCubic;
514 return &easeOutQuart;
516 return &easeInOutQuart;
518 return &easeOutInQuart;
522 return &easeOutQuint;
524 return &easeInOutQuint;
526 return &easeOutInQuint;
532 return &easeInOutSine;
534 return &easeOutInSine;
540 return &easeInOutExpo;
542 return &easeOutInExpo;
548 return &easeInOutCirc;
550 return &easeOutInCirc;
555 return &easeOutCurve;
557 return &easeSineCurve;
559 return &easeCosineCurve;
785 overshoot = config->_o;
790 if (
isConfigFunction(newType) || (amp != -1.0) || (period != -1.0) || (overshoot != -1.0)) {
796 if (overshoot != -1.0)
802 Q_ASSERT((func == 0) == (config != 0));
814 qWarning(
"QEasingCurve: Invalid curve type %d", type);
835 qWarning(
"Function pointer must not be null");
860 progress = qBound<qreal>(0, progress, 1);
869 #ifndef QT_NO_DEBUG_STREAM 881 #endif // QT_NO_DEBUG_STREAM 883 #ifndef QT_NO_DATASTREAM 941 stream >> config->
_p;
942 stream >> config->
_a;
943 stream >> config->
_o;
948 #endif // QT_NO_DATASTREAM QEasingCurveFunction * copy() const
The QDebug class provides an output stream for debugging information.
QEasingCurveFunction(QEasingCurveFunction::Type type=In, qreal period=0.3, qreal amplitude=1.0, qreal overshoot=1.70158)
qreal valueForProgress(qreal progress) const
Return the effective progress for the easing curve at progress.
QIntegerForSizeof< void * >::Unsigned quintptr
qreal overshoot() const
Returns the overshoot.
#define QT_END_NAMESPACE
This macro expands to.
static QString fromAscii(const char *, int size=-1)
Returns a QString initialized with the first size characters from the string str. ...
The QEasingCurve class provides easing curves for controlling animation.
qreal period() const
Returns the period.
bool operator==(const QEasingCurve &other) const
Compare this easing curve with other and returns true if they are equal.
friend Q_CORE_EXPORT QDebug operator<<(QDebug debug, const QEasingCurve &item)
QEasingCurveFunction * copy() const
void setType_helper(QEasingCurve::Type)
void setCustomType(EasingFunction func)
Sets a custom easing curve that is defined by the user in the function func.
#define QT_END_INCLUDE_NAMESPACE
This macro is equivalent to QT_BEGIN_NAMESPACE.
static Q_DECL_CONSTEXPR bool qFuzzyCompare(double p1, double p2)
long ASN1_INTEGER_get ASN1_INTEGER * a
static QEasingCurve::EasingFunction curveToFunc(QEasingCurve::Type curve)
EasingFunction customType() const
Returns the function pointer to the custom easing curve.
qreal amplitude() const
Returns the amplitude.
QEasingCurve::EasingFunction func
QEasingCurve & operator=(const QEasingCurve &other)
Copy other.
bool operator==(const QEasingCurveFunction &other)
Type type() const
Returns the type of the easing curve.
void setPeriod(qreal period)
Sets the period to period.
#define QT_BEGIN_NAMESPACE
This macro expands to.
QEasingCurvePrivate * d_ptr
QEasingCurveFunction * config
static QEasingCurveFunction * curveToFunctionObject(QEasingCurve::Type type)
Q_CORE_EXPORT void qWarning(const char *,...)
void setOvershoot(qreal overshoot)
Sets the overshoot to overshoot.
virtual qreal value(qreal t)
QEasingCurve(Type type=Linear)
Constructs an easing curve of the given type.
QString arg(qlonglong a, int fieldwidth=0, int base=10, const QChar &fillChar=QLatin1Char(' ')) const Q_REQUIRED_RESULT
QEasingCurveFunction * copy() const
~QEasingCurve()
Destructor.
void setAmplitude(qreal amplitude)
Sets the amplitude to amplitude.
#define QT_BEGIN_INCLUDE_NAMESPACE
This macro is equivalent to QT_END_NAMESPACE.
virtual ~QEasingCurveFunction()
The QDataStream class provides serialization of binary data to a QIODevice.
Type
The type of easing curve.
friend Q_CORE_EXPORT QDataStream & operator>>(QDataStream &, QEasingCurve &)
static bool isConfigFunction(QEasingCurve::Type type)
virtual QEasingCurveFunction * copy() const
void setType(Type type)
Sets the type of the easing curve to type.
qreal(* EasingFunction)(qreal progress)
This is a typedef for a pointer to a function with the following signature: