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_ANIMATION_CLOCK_P_H
5#define QT3DANIMATION_ANIMATION_CLOCK_P_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 for the convenience
12// of other Qt classes. 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 <Qt3DAnimation/private/backendnode_p.h>
19#include <Qt3DCore/qnodeid.h>
20
21QT_BEGIN_NAMESPACE
22
23namespace Qt3DAnimation {
24namespace Animation {
25
26class Q_AUTOTEST_EXPORT Clock : public BackendNode
27{
28public:
29 Clock();
30
31 void syncFromFrontEnd(const Qt3DCore::QNode *frontEnd, bool firstTime) override;
32 void cleanup();
33
34 void setPlaybackRate(double playbackRate) { m_playbackRate = playbackRate; }
35 double playbackRate() const { return m_playbackRate; }
36
37private:
38 double m_playbackRate;
39};
40
41} // namespace Animation
42} // namespace Qt3DAnimation
43
44
45QT_END_NAMESPACE
46
47#endif // QT3DANIMATION_ANIMATION_CLOCK_P_H
48

source code of qt3d/src/animation/backend/clock_p.h