Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
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_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();
71 void runningChanged();
72 void intervalChanged();
73 void repeatChanged();
74 void triggeredOnStartChanged();
75
77 void update();
78
80 void ticked();
81};
82
84
85#endif
\inmodule QtCore
Definition qcoreevent.h:45
\inmodule QtCore
Definition qobject.h:103
The QQmlParserStatus class provides updates on the QML parser state.
Combined button and popup list for selecting options.
static Q_CONSTINIT QBasicAtomicInt running
GLuint start
struct _cl_event * event
#define QML_NAMED_ELEMENT(NAME)
#define QML_ADDED_IN_VERSION(MAJOR, MINOR)
static bool isRunning()
Definition main.cpp:452
#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