on a57ff95 help sign in
unity8/plugins/Utils/easingcurve.cpp
49 lines 826 B history raw
1#include "easingcurve.h"
4EasingCurve::EasingCurve(QObject *parent):
5 QObject(parent)
6{
8}
10QEasingCurve::Type EasingCurve::type() const
12 return m_easingCurve.type();
15void EasingCurve::setType(const QEasingCurve::Type &type)
17 m_easingCurve.setType(type);
18 Q_EMIT typeChanged();
21qreal EasingCurve::period() const
23 return m_easingCurve.period();
26void EasingCurve::setPeriod(qreal period)
28 m_easingCurve.setPeriod(period);
29 Q_EMIT periodChanged();
32qreal EasingCurve::progress() const
34 return m_progress;
37void EasingCurve::setProgress(qreal progress)
39 if (m_progress != progress) {
40 m_progress = progress;
41 m_value = m_easingCurve.valueForProgress(m_progress);
42 Q_EMIT progressChanged();
43 }
46qreal EasingCurve::value() const
48 return m_value;