19 #include "easingcurve.h"
22 EasingCurve::EasingCurve(QObject *parent):
30 QEasingCurve::Type EasingCurve::type()
const
32 return m_easingCurve.type();
35 void EasingCurve::setType(
const QEasingCurve::Type &type)
38 QEasingCurve newCurve;
39 newCurve.setType(type);
40 newCurve.setPeriod(m_easingCurve.period());
41 m_easingCurve = newCurve;
45 qreal EasingCurve::period()
const
47 return m_easingCurve.period();
50 void EasingCurve::setPeriod(qreal period)
52 m_easingCurve.setPeriod(period);
53 Q_EMIT periodChanged();
56 qreal EasingCurve::progress()
const
61 void EasingCurve::setProgress(qreal progress)
63 if (m_progress != progress) {
64 m_progress = progress;
65 m_value = m_easingCurve.valueForProgress(m_progress);
66 Q_EMIT progressChanged();
70 qreal EasingCurve::value()
const