Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qquickspritesequence_p.h
Go to the documentation of this file.
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 QQUICKSPRITESEQUENCE_P_H
5#define QQUICKSPRITESEQUENCE_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 <private/qtquickglobal_p.h>
19
20QT_REQUIRE_CONFIG(quick_sprite);
21
22#include <QtQuick/QQuickItem>
23
25
26class QSGContext;
27class QQuickSprite;
30class QSGSpriteNode;
31class Q_QUICK_EXPORT QQuickSpriteSequence : public QQuickItem
32{
34 Q_PROPERTY(bool running READ running WRITE setRunning NOTIFY runningChanged)
35 Q_PROPERTY(bool interpolate READ interpolate WRITE setInterpolate NOTIFY interpolateChanged)
36 Q_PROPERTY(QString goalSprite READ goalSprite WRITE setGoalSprite NOTIFY goalSpriteChanged)
37 Q_PROPERTY(QString currentSprite READ currentSprite NOTIFY currentSpriteChanged)
38 //###try to share similar spriteEngines for less overhead?
40 Q_CLASSINFO("DefaultProperty", "sprites")
41 QML_NAMED_ELEMENT(SpriteSequence)
43
44public:
45 explicit QQuickSpriteSequence(QQuickItem *parent = nullptr);
46
48
49 bool running() const;
50 bool interpolate() const;
51 QString goalSprite() const;
52 QString currentSprite() const;
53
55
56 void runningChanged(bool arg);
57 void interpolateChanged(bool arg);
58 void goalSpriteChanged(const QString &arg);
59 void currentSpriteChanged(const QString &arg);
60
61public Q_SLOTS:
62
63 void jumpTo(const QString &sprite);
64 void setGoalSprite(const QString &sprite);
65 void setRunning(bool arg);
66 void setInterpolate(bool arg);
67
69 void createEngine();
70
71protected:
72 void reset();
73 QSGNode *updatePaintNode(QSGNode *, UpdatePaintNodeData *) override;
75 void prepareNextFrame(QSGSpriteNode *node);
76 QSGSpriteNode* initNode();
77
79 Q_DECLARE_PRIVATE(QQuickSpriteSequence)
80};
81
83
84#endif // QQUICKSPRITESEQUENCE_P_H
The QQmlListProperty class allows applications to expose list-like properties of QObject-derived clas...
Definition qqmllist.h:24
The QQuickItem class provides the most basic of all visual items in \l {Qt Quick}.
Definition qquickitem.h:63
The QSGContext holds the scene graph entry points for one QML engine.
\group qtquick-scenegraph-nodes \title Qt Quick Scene Graph Node classes
Definition qsgnode.h:37
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
Combined button and popup list for selecting options.
static Q_CONSTINIT QBasicAtomicInt running
Engine * createEngine(QGeoServiceProviderPrivate *)
static qreal interpolate(const QPair< QGraphicsAnchorLayoutPrivate::Interval, qreal > &factor, qreal min, qreal minPref, qreal pref, qreal maxPref, qreal max)
GLboolean reset
#define QML_NAMED_ELEMENT(NAME)
#define QML_ADDED_IN_VERSION(MAJOR, MINOR)
SSL_CTX int void * arg
#define QT_REQUIRE_CONFIG(feature)
#define Q_PROPERTY(...)
#define Q_OBJECT
#define Q_CLASSINFO(name, value)
#define Q_SLOTS
#define Q_SIGNALS
#define explicit