| 1 | // Copyright (C) 2018 The Qt Company Ltd. |
| 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only |
| 3 | |
| 4 | #ifndef QLOTTIEREPEATER_P_H |
| 5 | #define QLOTTIEREPEATER_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 <QtLottie/qtlottieexports.h> |
| 19 | #include <QtLottie/private/qlottieshape_p.h> |
| 20 | #include <QtLottie/private/qlottieproperty_p.h> |
| 21 | #include <QtLottie/private/qlottierepeatertransform_p.h> |
| 22 | |
| 23 | QT_BEGIN_NAMESPACE |
| 24 | |
| 25 | class QJsonObject; |
| 26 | |
| 27 | class Q_LOTTIE_EXPORT QLottieRepeater : public QLottieShape |
| 28 | { |
| 29 | public: |
| 30 | QLottieRepeater() = default; |
| 31 | explicit QLottieRepeater(const QLottieRepeater &other) = default; |
| 32 | QLottieRepeater(const QJsonObject &definition, QLottieBase *parent = nullptr); |
| 33 | |
| 34 | QLottieBase *clone() const override; |
| 35 | |
| 36 | void construct(const QJsonObject &definition); |
| 37 | |
| 38 | void updateProperties(int frame) override; |
| 39 | void render(QLottieRenderer &renderer) const override; |
| 40 | |
| 41 | int copies() const; |
| 42 | qreal offset() const; |
| 43 | const QLottieRepeaterTransform &transform() const; |
| 44 | |
| 45 | protected: |
| 46 | QLottieProperty<int> m_copies; |
| 47 | QLottieProperty<qreal> m_offset; |
| 48 | QLottieRepeaterTransform m_transform; |
| 49 | }; |
| 50 | |
| 51 | QT_END_NAMESPACE |
| 52 | |
| 53 | #endif // QLOTTIEREPEATER_P_H |
| 54 | |