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 |
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 | |
22 | QT_BEGIN_NAMESPACE |
23 | |
24 | namespace Qt3DExtras { |
25 | namespace Extras { |
26 | namespace Quick { |
27 | |
28 | class Q_3DQUICKEXTRASSHARED_EXPORT : public QObject |
29 | { |
30 | Q_OBJECT |
31 | Q_PROPERTY(QQmlListProperty<Qt3DExtras::QSpriteSheetItem> sprites READ sprites CONSTANT) |
32 | Q_CLASSINFO("DefaultProperty" , "sprites" ) |
33 | public: |
34 | explicit (QObject *parent = 0); |
35 | (); |
36 | |
37 | QQmlListProperty<Qt3DExtras::QSpriteSheetItem> (); |
38 | inline QSpriteSheet *() const { return qobject_cast<QSpriteSheet *>(object: parent()); } |
39 | }; |
40 | |
41 | } // namespace Quick |
42 | } // namespace Extras |
43 | } // namespace Qt3DExtras |
44 | |
45 | QT_END_NAMESPACE |
46 | |
47 | #endif // QT3DEXTRAS_EXTRAS_QUICK_QUICK3DSPRITESHEET_P_H |
48 | |