1 | // Copyright (C) 2016 The Qt Company Ltd and/or its subsidiary(-ies). |
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_QSCENE_EXPORTER_P_H |
5 | #define QT3DRENDER_QSCENE_EXPORTER_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/qt3drender_global_p.h> |
19 | |
20 | #include <QtCore/qobject.h> |
21 | #include <QtCore/qstringlist.h> |
22 | #include <QtCore/qloggingcategory.h> |
23 | |
24 | QT_BEGIN_NAMESPACE |
25 | |
26 | namespace Qt3DCore { |
27 | class QEntity; |
28 | } |
29 | |
30 | namespace Qt3DRender { |
31 | |
32 | Q_DECLARE_LOGGING_CATEGORY(SceneParsers) |
33 | |
34 | class Q_3DRENDERSHARED_PRIVATE_EXPORT QSceneExporter : public QObject |
35 | { |
36 | Q_OBJECT |
37 | Q_PROPERTY(QStringList errors READ errors NOTIFY errorsChanged) |
38 | |
39 | public: |
40 | QSceneExporter(); |
41 | virtual ~QSceneExporter(); |
42 | |
43 | virtual bool exportScene(Qt3DCore::QEntity *sceneRoot, const QString &outDir, |
44 | const QString &exportName, const QVariantHash &options) = 0; |
45 | QStringList errors() const; |
46 | |
47 | Q_SIGNALS: |
48 | void errorsChanged(const QStringList &errors); |
49 | |
50 | protected: |
51 | void logError(const QString &error); |
52 | void logInfo(const QString &info); |
53 | |
54 | private: |
55 | QStringList m_errors; |
56 | }; |
57 | |
58 | } // namespace Qt3DRender |
59 | |
60 | QT_END_NAMESPACE |
61 | |
62 | #endif // QT3DRENDER_QSCENE_EXPORTER_P_H |
63 | |