Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
qqmltimer_p.h
Go to the documentation of this file.
1// Copyright (C) 2016 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#ifndef QQMLTIMER_H
5#define QQMLTIMER_H
6
7//
8// W A R N I N G
9// -------------
10//
11// This file is not part of the Qt API. It exists purely as an
12// implementation detail. This header file may change from version to
13// version without notice, or even be removed.
14//
15// We mean it.
16//
17
18#include <qqml.h>
19
20#include <QtCore/qobject.h>
21
22#include <private/qtqmlglobal_p.h>
23
24QT_REQUIRE_CONFIG(qml_animation);
25
27
29class Q_QML_PRIVATE_EXPORT QQmlTimer : public QObject, public QQmlParserStatus
30{
32 Q_DECLARE_PRIVATE(QQmlTimer)
34 Q_PROPERTY(int interval READ interval WRITE setInterval NOTIFY intervalChanged)
35 Q_PROPERTY(bool running READ isRunning WRITE setRunning NOTIFY runningChanged)
36 Q_PROPERTY(bool repeat READ isRepeating WRITE setRepeating NOTIFY repeatChanged)
37 Q_PROPERTY(bool triggeredOnStart READ triggeredOnStart WRITE setTriggeredOnStart NOTIFY triggeredOnStartChanged)
38 Q_PROPERTY(QObject *parent READ parent CONSTANT)
39 Q_CLASSINFO("ParentProperty", "parent")
42
43public:
44 QQmlTimer(QObject *parent=nullptr);
45
46 void setInterval(int interval);
47 int interval() const;
48
49 bool isRunning() const;
50 void setRunning(bool running);
51
52 bool isRepeating() const;
53 void setRepeating(bool repeating);
54
55 bool triggeredOnStart() const;
56 void setTriggeredOnStart(bool triggeredOnStart);
57
58protected:
59 void classBegin() override;
60 void componentComplete() override;
61
62 bool event(QEvent *) override;
63
64public Q_SLOTS:
65 void start();
66 void stop();
67 void restart();
68
70 void triggered();
75
76private:
77 void update();
78
79private Q_SLOTS:
80 void ticked();
81};
82
84
86
87#endif
\inmodule QtCore
Definition qcoreevent.h:45
\inmodule QtCore
Definition qobject.h:90
The QQmlParserStatus class provides updates on the QML parser state.
virtual void classBegin()=0
Invoked after class creation, but before any properties have been set.
virtual void componentComplete()=0
Invoked after the root component that caused this instantiation has completed construction.
void triggered()
void intervalChanged()
void triggeredOnStartChanged()
void repeatChanged()
void runningChanged()
Combined button and popup list for selecting options.
static Q_CONSTINIT QBasicAtomicInt running
GLuint start
struct _cl_event * event
#define QML_DECLARE_TYPE(TYPE)
Definition qqml.h:19
#define QML_NAMED_ELEMENT(NAME)
#define QML_ADDED_IN_VERSION(MAJOR, MINOR)
static bool isRunning()
Definition main.cpp:358
#define QT_REQUIRE_CONFIG(feature)
#define Q_PROPERTY(...)
#define Q_OBJECT
#define Q_CLASSINFO(name, value)
#define Q_INTERFACES(x)
#define Q_SLOTS
#define Q_SIGNALS
IUIAutomationTreeWalker __RPC__deref_out_opt IUIAutomationElement ** parent