From 798def21764a62cb41daa627949a1c644e852884 Mon Sep 17 00:00:00 2001 From: Paul Lemire Date: Thu, 11 Sep 2014 16:45:15 +0200 Subject: Renamed QScene to QSceneLoader Change-Id: I075aaf1ac7a02dee89cb6646e2d1cd029373767e Reviewed-by: Sean Harmer --- examples/assimp/main.qml | 2 +- examples/bigmodel-qml/main.qml | 2 +- examples/cpp_example/main.cpp | 4 +- examples/multiviewport/main.qml | 2 +- examples/simple-qml/main.qml | 2 +- examples/torus-cpp/main.cpp | 2 +- .../imports/render/qt3dquick3drenderplugin.cpp | 4 +- src/render/frontend/qscene.cpp | 60 -------------------- src/render/frontend/qscene.h | 65 ---------------------- src/render/frontend/qsceneloader.cpp | 60 ++++++++++++++++++++ src/render/frontend/qsceneloader.h | 65 ++++++++++++++++++++++ src/render/frontend/render-frontend.pri | 4 +- 12 files changed, 136 insertions(+), 136 deletions(-) delete mode 100644 src/render/frontend/qscene.cpp delete mode 100644 src/render/frontend/qscene.h create mode 100644 src/render/frontend/qsceneloader.cpp create mode 100644 src/render/frontend/qsceneloader.h diff --git a/examples/assimp/main.qml b/examples/assimp/main.qml index 1f2a7db21..b69f26812 100644 --- a/examples/assimp/main.qml +++ b/examples/assimp/main.qml @@ -79,7 +79,7 @@ Entity } } - Scene + SceneLoader { id: scene source: ":/assets/test_scene.dae" diff --git a/examples/bigmodel-qml/main.qml b/examples/bigmodel-qml/main.qml index a2d3c19dd..eb8c7927f 100644 --- a/examples/bigmodel-qml/main.qml +++ b/examples/bigmodel-qml/main.qml @@ -87,6 +87,6 @@ Entity { Instantiator { model: _meshFileNames - delegate: Scene { source: modelData; } + delegate: SceneLoader { source: modelData; } } } diff --git a/examples/cpp_example/main.cpp b/examples/cpp_example/main.cpp index 0e4c15df7..738603f69 100644 --- a/examples/cpp_example/main.cpp +++ b/examples/cpp_example/main.cpp @@ -55,7 +55,7 @@ #include #include #include -#include +#include #include #include @@ -107,7 +107,7 @@ int main(int ac, char **av) // Scene file Qt3D::QEntity *sceneEntity = new Qt3D::QEntity(); - Qt3D::QScene *scene = new Qt3D::QScene(); + Qt3D::QSceneLoader *scene = new Qt3D::QSceneLoader(); scene->setObjectName(QStringLiteral("scene")); Qt3D::QTransform *sceneTransform = new Qt3D::QTransform(); Qt3D::QTranslateTransform *sceneTranslateTransform = new Qt3D::QTranslateTransform(); diff --git a/examples/multiviewport/main.qml b/examples/multiviewport/main.qml index c570df8d8..07a58c543 100644 --- a/examples/multiviewport/main.qml +++ b/examples/multiviewport/main.qml @@ -173,7 +173,7 @@ Entity { } - Scene { + SceneLoader { id: scene source: ":/assets/test_scene.dae" components : [Transform { diff --git a/examples/simple-qml/main.qml b/examples/simple-qml/main.qml index 0e13d35cf..b2558ff2f 100644 --- a/examples/simple-qml/main.qml +++ b/examples/simple-qml/main.qml @@ -512,7 +512,7 @@ Entity { } } - Scene + SceneLoader { id: scene source: ":/assets/test_scene.dae" diff --git a/examples/torus-cpp/main.cpp b/examples/torus-cpp/main.cpp index 230810156..e9f6ea261 100644 --- a/examples/torus-cpp/main.cpp +++ b/examples/torus-cpp/main.cpp @@ -53,7 +53,7 @@ #include #include #include -#include +#include #include #include diff --git a/src/quick3d/imports/render/qt3dquick3drenderplugin.cpp b/src/quick3d/imports/render/qt3dquick3drenderplugin.cpp index 1e254a932..997881f46 100644 --- a/src/quick3d/imports/render/qt3dquick3drenderplugin.cpp +++ b/src/quick3d/imports/render/qt3dquick3drenderplugin.cpp @@ -43,7 +43,7 @@ #include #include "qt3dquick3drenderplugin.h" #include -#include +#include #include #include #include @@ -105,7 +105,7 @@ void Qt3DQuick3DRenderPlugin::registerTypes(const char *uri) { // @uri Qt3D.Render qmlRegisterUncreatableType(uri, 2, 0, "QAbstractSceneLoader", "QAbstractScene is abstract"); - qmlRegisterExtendedType(uri, 2, 0, "Scene"); + qmlRegisterExtendedType(uri, 2, 0, "SceneLoader"); // qmlRegisterCustomType(uri, 2, 0, "Effect", new Qt3D::Render::Quick::ShaderPropertyParser()); qmlRegisterExtendedType(uri, 2, 0, "Effect"); qmlRegisterExtendedType(uri, 2, 0, "Technique"); diff --git a/src/render/frontend/qscene.cpp b/src/render/frontend/qscene.cpp deleted file mode 100644 index 91dafc528..000000000 --- a/src/render/frontend/qscene.cpp +++ /dev/null @@ -1,60 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2014 Klaralvdalens Datakonsult AB (KDAB). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the Qt3D module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information -** use the contact form at http://qt.digia.com/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "qscene.h" - -QT_BEGIN_NAMESPACE - -namespace Qt3D { - -QScene::QScene(QNode *parent) - : Render::QAbstractSceneLoader(parent) -{ -} - -QNode *QScene::doClone(QNode *clonedParent) const -{ - return new QScene(clonedParent); -} - -} // Qt3D - -QT_END_NAMESPACE diff --git a/src/render/frontend/qscene.h b/src/render/frontend/qscene.h deleted file mode 100644 index b402ae7b0..000000000 --- a/src/render/frontend/qscene.h +++ /dev/null @@ -1,65 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2014 Klaralvdalens Datakonsult AB (KDAB). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the Qt3D module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information -** use the contact form at http://qt.digia.com/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QT3D_QSCENE_H -#define QT3D_QSCENE_H - -#include - -QT_BEGIN_NAMESPACE - -namespace Qt3D { - -class QT3DRENDERERSHARED_EXPORT QScene : public Render::QAbstractSceneLoader -{ - Q_OBJECT -public: - explicit QScene(QNode *parent = 0); - -protected: - QNode *doClone(QNode *clonedParent) const Q_DECL_OVERRIDE; -}; - -} // Qt3D - -QT_END_NAMESPACE - -#endif // QT3D_QSCENE_H diff --git a/src/render/frontend/qsceneloader.cpp b/src/render/frontend/qsceneloader.cpp new file mode 100644 index 000000000..62ed87ac8 --- /dev/null +++ b/src/render/frontend/qsceneloader.cpp @@ -0,0 +1,60 @@ +/**************************************************************************** +** +** Copyright (C) 2014 Klaralvdalens Datakonsult AB (KDAB). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt3D module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "qsceneloader.h" + +QT_BEGIN_NAMESPACE + +namespace Qt3D { + +QSceneLoader::QSceneLoader(QNode *parent) + : Render::QAbstractSceneLoader(parent) +{ +} + +QNode *QSceneLoader::doClone(QNode *clonedParent) const +{ + return new QSceneLoader(clonedParent); +} + +} // Qt3D + +QT_END_NAMESPACE diff --git a/src/render/frontend/qsceneloader.h b/src/render/frontend/qsceneloader.h new file mode 100644 index 000000000..418547660 --- /dev/null +++ b/src/render/frontend/qsceneloader.h @@ -0,0 +1,65 @@ +/**************************************************************************** +** +** Copyright (C) 2014 Klaralvdalens Datakonsult AB (KDAB). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt3D module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QT3D_QSCENE_H +#define QT3D_QSCENE_H + +#include + +QT_BEGIN_NAMESPACE + +namespace Qt3D { + +class QT3DRENDERERSHARED_EXPORT QSceneLoader : public Render::QAbstractSceneLoader +{ + Q_OBJECT +public: + explicit QSceneLoader(QNode *parent = 0); + +protected: + QNode *doClone(QNode *clonedParent) const Q_DECL_OVERRIDE; +}; + +} // Qt3D + +QT_END_NAMESPACE + +#endif // QT3D_QSCENE_H diff --git a/src/render/frontend/render-frontend.pri b/src/render/frontend/render-frontend.pri index 15c90be5d..4553c2a00 100644 --- a/src/render/frontend/render-frontend.pri +++ b/src/render/frontend/render-frontend.pri @@ -16,7 +16,7 @@ HEADERS += \ $$PWD/sphere.h \ $$PWD/qabstractsceneloader.h \ $$PWD/qeffect.h \ - $$PWD/qscene.h \ + $$PWD/qsceneloader.h \ $$PWD/qcriterion.h \ $$PWD/qparameter.h \ $$PWD/qparameter_p.h \ @@ -75,7 +75,7 @@ SOURCES += \ $$PWD/sphere.cpp \ $$PWD/qabstractsceneloader.cpp \ $$PWD/qeffect.cpp \ - $$PWD/qscene.cpp \ + $$PWD/qsceneloader.cpp \ $$PWD/qcriterion.cpp \ $$PWD/qparameter.cpp \ $$PWD/qparametermapper.cpp \ -- cgit v1.2.3