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 QQUICKANIMATEDSPRITE_P_P_H
5#define QQUICKANIMATEDSPRITE_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_sprite);
21
22#include "qquickitem_p.h"
23#include "qquicksprite_p.h"
24#include "qquickanimatedsprite_p.h"
25
26QT_BEGIN_NAMESPACE
27
28class QQuickAnimatedSpritePrivate : public QQuickItemPrivate
29{
30 Q_DECLARE_PUBLIC(QQuickAnimatedSprite)
31
32public:
33 QQuickAnimatedSpritePrivate()
34 : m_sprite(nullptr)
35 , m_spriteEngine(nullptr)
36 , m_curFrame(0)
37 , m_pleaseReset(false)
38 , m_running(true)
39 , m_paused(false)
40 , m_interpolate(true)
41 , m_loops(-1)
42 , m_curLoop(0)
43 , m_pauseOffset(0)
44 , m_finishBehavior(QQuickAnimatedSprite::FinishAtInitialFrame)
45 {
46 }
47
48 QQuickSprite* m_sprite;
49 QQuickSpriteEngine* m_spriteEngine;
50 QElapsedTimer m_timestamp;
51 int m_curFrame;
52 bool m_pleaseReset;
53 bool m_running;
54 bool m_paused;
55 bool m_interpolate;
56 QSize m_sheetSize;
57 int m_loops;
58 int m_curLoop;
59 int m_pauseOffset;
60 QQuickAnimatedSprite::FinishBehavior m_finishBehavior;
61};
62
63QT_END_NAMESPACE
64
65#endif // QQUICKANIMATEDSPRITE_P_P_H
66

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