1 | // Copyright (C) 2017 Klaralvdalens Datakonsult AB (KDAB). |
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 QT3DANIMATION_QCLOCK_H |
5 | #define QT3DANIMATION_QCLOCK_H |
6 | |
7 | #include <Qt3DAnimation/qt3danimation_global.h> |
8 | #include <Qt3DCore/qnode.h> |
9 | |
10 | QT_BEGIN_NAMESPACE |
11 | |
12 | namespace Qt3DAnimation { |
13 | |
14 | class QClockPrivate; |
15 | |
16 | class Q_3DANIMATIONSHARED_EXPORT QClock : public Qt3DCore::QNode |
17 | { |
18 | Q_OBJECT |
19 | Q_PROPERTY(double playbackRate READ playbackRate WRITE setPlaybackRate NOTIFY playbackRateChanged) |
20 | |
21 | public: |
22 | explicit QClock(Qt3DCore::QNode *parent = nullptr); |
23 | ~QClock(); |
24 | |
25 | double playbackRate() const; |
26 | void setPlaybackRate(double playbackRate); |
27 | |
28 | Q_SIGNALS: |
29 | void playbackRateChanged(double playbackRate); |
30 | |
31 | protected: |
32 | QClock(QClockPrivate &dd, Qt3DCore::QNode *parent = nullptr); |
33 | |
34 | private: |
35 | Q_DECLARE_PRIVATE(QClock) |
36 | }; |
37 | |
38 | } // namespace Qt3DAnimation |
39 | |
40 | QT_END_NAMESPACE |
41 | |
42 | #endif // QT3DANIMATION_QCLOCK_H |
43 | |