22 Q_PROPERTY(
int duration READ duration WRITE setDuration BINDABLE bindableDuration)
23 Q_PROPERTY(
int updateInterval READ updateInterval WRITE setUpdateInterval
24 BINDABLE bindableUpdateInterval)
25 Q_PROPERTY(
int currentTime READ currentTime WRITE setCurrentTime BINDABLE bindableCurrentTime)
26 Q_PROPERTY(Direction direction READ direction WRITE setDirection BINDABLE bindableDirection)
27 Q_PROPERTY(
int loopCount READ loopCount WRITE setLoopCount BINDABLE bindableLoopCount)
28 Q_PROPERTY(QEasingCurve easingCurve READ easingCurve WRITE setEasingCurve
29 BINDABLE bindableEasingCurve)
41 explicit QTimeLine(
int duration = 1000, QObject *parent =
nullptr);
46 int loopCount()
const;
47 void setLoopCount(
int count);
48 QBindable<
int> bindableLoopCount();
50 Direction direction()
const;
51 void setDirection(Direction direction);
52 QBindable<Direction> bindableDirection();
55 void setDuration(
int duration);
56 QBindable<
int> bindableDuration();
58 int startFrame()
const;
59 void setStartFrame(
int frame);
61 void setEndFrame(
int frame);
62 void setFrameRange(
int startFrame,
int endFrame);
64 int updateInterval()
const;
65 void setUpdateInterval(
int interval);
66 QBindable<
int> bindableUpdateInterval();
68 QEasingCurve easingCurve()
const;
69 void setEasingCurve(
const QEasingCurve &curve);
70 QBindable<QEasingCurve> bindableEasingCurve();
72 int currentTime()
const;
73 QBindable<
int> bindableCurrentTime();
74 int currentFrame()
const;
75 qreal currentValue()
const;
77 int frameForTime(
int msec)
const;
78 virtual qreal valueForTime(
int msec)
const;
84 void setPaused(
bool paused);
85 void setCurrentTime(
int msec);
86 void toggleDirection();
89 void valueChanged(qreal x, QPrivateSignal);
90 void frameChanged(
int, QPrivateSignal);
91 void stateChanged(QTimeLine::State newState, QPrivateSignal);
92 void finished(QPrivateSignal);
95 void timerEvent(QTimerEvent *event) override;
98 Q_DISABLE_COPY(QTimeLine)
99 Q_DECLARE_PRIVATE(QTimeLine)