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
24QT_BEGIN_NAMESPACE
25
26namespace Qt3DCore {
27class QEntity;
28}
29
30namespace Qt3DRender {
31
32Q_DECLARE_LOGGING_CATEGORY(SceneParsers)
33
34class Q_3DRENDERSHARED_PRIVATE_EXPORT QSceneExporter : public QObject
35{
36 Q_OBJECT
37 Q_PROPERTY(QStringList errors READ errors NOTIFY errorsChanged)
38
39public:
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
47Q_SIGNALS:
48 void errorsChanged(const QStringList &errors);
49
50protected:
51 void logError(const QString &error);
52 void logInfo(const QString &info);
53
54private:
55 QStringList m_errors;
56};
57
58} // namespace Qt3DRender
59
60QT_END_NAMESPACE
61
62#endif // QT3DRENDER_QSCENE_EXPORTER_P_H
63

source code of qt3d/src/render/io/qsceneexporter_p.h