1// Copyright (C) 2020 Klaralvdalens Datakonsult AB (KDAB).
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3#ifndef QT3DEXTRAS_EXTRAS_QUICK_QUICK3DSPRITESHEET_P_H
4#define QT3DEXTRAS_EXTRAS_QUICK_QUICK3DSPRITESHEET_P_H
5
6//
7// W A R N I N G
8// -------------
9//
10// This file is not part of the Qt API. It exists for the convenience
11// of other Qt classes. This header file may change from version to
12// version without notice, or even be removed.
13//
14// We mean it.
15//
16
17#include <Qt3DQuickExtras/qt3dquickextras_global.h>
18#include <Qt3DExtras/qspritesheet.h>
19#include <QtQml/QQmlListProperty>
20#include <private/qglobal_p.h>
21
22QT_BEGIN_NAMESPACE
23
24namespace Qt3DExtras {
25namespace Extras {
26namespace Quick {
27
28class Q_3DQUICKEXTRASSHARED_EXPORT Quick3DSpriteSheet : public QObject
29{
30 Q_OBJECT
31 Q_PROPERTY(QQmlListProperty<Qt3DExtras::QSpriteSheetItem> sprites READ sprites CONSTANT)
32 Q_CLASSINFO("DefaultProperty", "sprites")
33public:
34 explicit Quick3DSpriteSheet(QObject *parent = 0);
35 ~Quick3DSpriteSheet();
36
37 QQmlListProperty<Qt3DExtras::QSpriteSheetItem> sprites();
38 inline QSpriteSheet *parentSpriteSheet() const { return qobject_cast<QSpriteSheet *>(object: parent()); }
39};
40
41} // namespace Quick
42} // namespace Extras
43} // namespace Qt3DExtras
44
45QT_END_NAMESPACE
46
47#endif // QT3DEXTRAS_EXTRAS_QUICK_QUICK3DSPRITESHEET_P_H
48

source code of qt3d/src/quick3d/quick3dextras/items/quick3dspritesheet_p.h