1 | // Copyright (C) 2018 The Qt Company Ltd. |
---|---|
2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only |
3 | |
4 | #ifndef BMREPEATER_P_H |
5 | #define BMREPEATER_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 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 <QtBodymovin/bmglobal.h> |
19 | #include <QtBodymovin/private/bmshape_p.h> |
20 | #include <QtBodymovin/private/bmproperty_p.h> |
21 | #include <QtBodymovin/private/bmrepeatertransform_p.h> |
22 | |
23 | QT_BEGIN_NAMESPACE |
24 | |
25 | class QJsonObject; |
26 | |
27 | class BODYMOVIN_EXPORT BMRepeater : public BMShape |
28 | { |
29 | public: |
30 | BMRepeater() = default; |
31 | explicit BMRepeater(const BMRepeater &other) = default; |
32 | BMRepeater(const QJsonObject &definition, const QVersionNumber &version, |
33 | BMBase *parent = nullptr); |
34 | |
35 | BMBase *clone() const override; |
36 | |
37 | void construct(const QJsonObject &definition, const QVersionNumber &version); |
38 | |
39 | void updateProperties(int frame) override; |
40 | void render(LottieRenderer &renderer) const override; |
41 | |
42 | int copies() const; |
43 | qreal offset() const; |
44 | const BMRepeaterTransform &transform() const; |
45 | |
46 | protected: |
47 | BMProperty<int> m_copies; |
48 | BMProperty<qreal> m_offset; |
49 | BMRepeaterTransform m_transform; |
50 | }; |
51 | |
52 | QT_END_NAMESPACE |
53 | |
54 | #endif // BMREPEATER_P_H |
55 |