| 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 QQUICKANIMATEDIMAGE_P_P_H |
| 5 | #define QQUICKANIMATEDIMAGE_P_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 <QtQuick/qtquickglobal.h> |
| 19 | |
| 20 | QT_REQUIRE_CONFIG(quick_animatedimage); |
| 21 | |
| 22 | #include "qquickimage_p_p.h" |
| 23 | |
| 24 | QT_BEGIN_NAMESPACE |
| 25 | |
| 26 | class QMovie; |
| 27 | #if QT_CONFIG(qml_network) |
| 28 | class QNetworkReply; |
| 29 | #endif |
| 30 | |
| 31 | class QQuickAnimatedImagePrivate : public QQuickImagePrivate |
| 32 | { |
| 33 | Q_DECLARE_PUBLIC(QQuickAnimatedImage) |
| 34 | |
| 35 | public: |
| 36 | QQuickAnimatedImagePrivate() |
| 37 | : playing(true), paused(false), oldPlaying(false) |
| 38 | { |
| 39 | } |
| 40 | |
| 41 | QQuickPixmap *infoForCurrentFrame(QQmlEngine *engine); |
| 42 | void setMovie(QMovie *movie); |
| 43 | void clearCache(); |
| 44 | |
| 45 | qreal speed = 1; |
| 46 | QMovie *movie = nullptr; |
| 47 | int presetCurrentFrame = 0; |
| 48 | QMap<int, QQuickPixmap *> frameMap; |
| 49 | |
| 50 | #if QT_CONFIG(qml_network) |
| 51 | QNetworkReply *reply = nullptr; |
| 52 | #endif |
| 53 | |
| 54 | bool playing : 1; |
| 55 | bool paused : 1; |
| 56 | bool oldPlaying : 1; |
| 57 | }; |
| 58 | |
| 59 | QT_END_NAMESPACE |
| 60 | |
| 61 | #endif // QQUICKANIMATEDIMAGE_P_P_H |
| 62 |
