| 1 | // Copyright (C) 2014 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 | |
| 4 | #include "qsceneimporter_p.h" |
| 5 | #include <Qt3DRender/private/renderlogging_p.h> |
| 6 | #include <QStringList> |
| 7 | |
| 8 | QT_BEGIN_NAMESPACE |
| 9 | |
| 10 | namespace Qt3DRender { |
| 11 | |
| 12 | QSceneImporter::QSceneImporter() : QObject(), |
| 13 | m_status(Empty) |
| 14 | { |
| 15 | } |
| 16 | |
| 17 | QSceneImporter::~QSceneImporter() |
| 18 | { |
| 19 | } |
| 20 | |
| 21 | QSceneImporter::ParserStatus QSceneImporter::status() const |
| 22 | { |
| 23 | return m_status; |
| 24 | } |
| 25 | |
| 26 | QStringList QSceneImporter::errors() const |
| 27 | { |
| 28 | return m_errors; |
| 29 | } |
| 30 | |
| 31 | void QSceneImporter::setStatus(ParserStatus status) |
| 32 | { |
| 33 | if (status != m_status) { |
| 34 | m_status = status; |
| 35 | emit statusChanged(status); |
| 36 | } |
| 37 | } |
| 38 | |
| 39 | void QSceneImporter::logError(const QString &error) |
| 40 | { |
| 41 | m_errors.append(t: error); |
| 42 | emit errorsChanged(errors: m_errors); |
| 43 | } |
| 44 | |
| 45 | void QSceneImporter::logInfo(const QString &info) |
| 46 | { |
| 47 | qCDebug(Render::Io) << info; |
| 48 | } |
| 49 | |
| 50 | } // namespace Qt3DRender |
| 51 | |
| 52 | QT_END_NAMESPACE |
| 53 | |
| 54 | #include "moc_qsceneimporter_p.cpp" |
| 55 |
