| 1 | // Copyright (C) 2017 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 QT3DRENDER_QUICK3DSCENE2D_QSCENE2D_P_H |
| 5 | #define QT3DRENDER_QUICK3DSCENE2D_QSCENE2D_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 for the convenience |
| 12 | // of other Qt classes. 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 <Qt3DQuickScene2D/qscene2d.h> |
| 19 | |
| 20 | #include <private/qnode_p.h> |
| 21 | #include <private/scene2dsharedobject_p.h> |
| 22 | #include <private/qt3dquick3dscene2d_p.h> |
| 23 | |
| 24 | QT_BEGIN_NAMESPACE |
| 25 | |
| 26 | namespace Qt3DCore { |
| 27 | class QScene; |
| 28 | } |
| 29 | |
| 30 | namespace Qt3DRender { |
| 31 | |
| 32 | namespace Quick { |
| 33 | |
| 34 | class QScene2D; |
| 35 | class Scene2DManager; |
| 36 | |
| 37 | class QScene2dForeign { |
| 38 | Q_GADGET |
| 39 | |
| 40 | QML_FOREIGN(Qt3DRender::Quick::QScene2D) |
| 41 | QML_NAMED_ELEMENT(Scene2D) |
| 42 | QML_EXTENDED(Qt3DRender::Render::Quick::QQuick3DScene2D) |
| 43 | QML_ADDED_IN_VERSION(2, 9); |
| 44 | }; |
| 45 | |
| 46 | class Q_AUTOTEST_EXPORT QScene2DPrivate : public Qt3DCore::QNodePrivate |
| 47 | { |
| 48 | public: |
| 49 | Q_DECLARE_PUBLIC(QScene2D) |
| 50 | |
| 51 | QScene2DPrivate(); |
| 52 | ~QScene2DPrivate(); |
| 53 | |
| 54 | Scene2DManager *m_renderManager; |
| 55 | QMetaObject::Connection m_textureDestroyedConnection; |
| 56 | Qt3DRender::QRenderTargetOutput *m_output; |
| 57 | QList<Qt3DCore::QEntity *> m_entities; |
| 58 | }; |
| 59 | |
| 60 | struct QScene2DData |
| 61 | { |
| 62 | QScene2D::RenderPolicy renderPolicy; |
| 63 | Scene2DSharedObjectPtr sharedObject; |
| 64 | Qt3DCore::QNodeId output; |
| 65 | QList<Qt3DCore::QNodeId> entityIds; |
| 66 | bool mouseEnabled; |
| 67 | }; |
| 68 | |
| 69 | } // namespace Quick |
| 70 | } // namespace Qt3DRender |
| 71 | |
| 72 | QT_END_NAMESPACE |
| 73 | |
| 74 | #endif // QT3DRENDER_QUICK3DSCENE2D_QSCENE2D_P_H |
| 75 | |