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

source code of qtdeclarative/src/quick/items/qquickanimatedimage_p_p.h