6#include <QtCore/qcoreapplication.h>
7#include "private/qpauseanimationjob_p.h"
10#include <private/qobject_p.h>
94 d->pause.setLoopCount(1);
95 d->pause.setDuration(
d->interval);
169 if (repeating !=
d->repeating) {
170 d->repeating = repeating;
196 return d->triggeredOnStart;
247void QQmlTimer::update()
250 if (
d->classBegun && !
d->componentComplete)
254 d->pause.setCurrentTime(0);
255 d->pause.setLoopCount(
d->repeating ? -1 : 1);
256 d->pause.setDuration(
d->interval);
258 if (
d->triggeredOnStart &&
d->firstTick)
266 d->classBegun =
true;
272 d->componentComplete =
true;
281void QQmlTimer::ticked()
284 if (
d->running && (
d->pause.currentTime() > 0 || (
d->triggeredOnStart &&
d->firstTick)))
286 d->firstTick =
false;
295 if (
e->type() == QEvent_MaybeTick) {
296 d->awaitingTick =
false;
299 }
else if (
e->type() == QEvent_Triggered) {
300 if (
d->running &&
d->pause.isStopped()) {
321#include "moc_qqmltimer_p.cpp"
static void postEvent(QObject *receiver, QEvent *event, int priority=Qt::NormalEventPriority)
Type
This enum type defines the valid event types in Qt.
virtual bool event(QEvent *event)
This virtual function receives events to an object and should return true if the event e was recogniz...
void animationCurrentLoopChanged(QAbstractAnimationJob *) override
void animationFinished(QAbstractAnimationJob *) override
void setInterval(int interval)
\qmlproperty int QtQml::Timer::interval
void stop()
\qmlmethod QtQml::Timer::stop()
QQmlTimer(QObject *parent=nullptr)
\qmltype Timer \instantiates QQmlTimer \inqmlmodule QtQml
void triggeredOnStartChanged()
bool isRepeating() const
\qmlproperty bool QtQml::Timer::repeat
void classBegin() override
Invoked after class creation, but before any properties have been set.
void setRunning(bool running)
void start()
\qmlmethod QtQml::Timer::start()
void restart()
\qmlmethod QtQml::Timer::restart()
bool event(QEvent *) override
bool isRunning() const
\qmlproperty bool QtQml::Timer::running
void setTriggeredOnStart(bool triggeredOnStart)
void setRepeating(bool repeating)
void componentComplete() override
Invoked after the root component that caused this instantiation has completed construction.
Combined button and popup list for selecting options.
const QEvent::Type QEvent_Triggered
const QEvent::Type QEvent_MaybeTick
static Q_CONSTINIT QBasicAtomicInt running
GLdouble GLdouble GLdouble GLdouble q
IUIAutomationTreeWalker __RPC__deref_out_opt IUIAutomationElement ** parent