diff options
author | Sean Harmer <sean.harmer@kdab.com> | 2015-10-12 20:45:19 +0100 |
---|---|---|
committer | Paul Lemire <paul.lemire@kdab.com> | 2015-10-13 13:19:50 +0000 |
commit | 7c971e0e7791ab38d7d3d8ebc25468c44cbe49c5 (patch) | |
tree | 53197a9e5eb7501d6f5b497f70c25dad9c265a6f /src/render/io | |
parent | 0bfd20ad3b8eb3edec8d6317af9eb5504f8c0871 (diff) |
Move Qt3DCore into Qt3DCore namespace
Update other aspects, tests and examples accordingly.
Change-Id: Ib1bcf0bdf4f5aec4422dc0c80bfc32b27fb1a317
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
Diffstat (limited to 'src/render/io')
-rw-r--r-- | src/render/io/abstractsceneparser_p.h | 6 | ||||
-rw-r--r-- | src/render/io/objloader.cpp | 2 | ||||
-rw-r--r-- | src/render/io/qabstractsceneloader.cpp | 2 | ||||
-rw-r--r-- | src/render/io/qabstractsceneloader.h | 8 | ||||
-rw-r--r-- | src/render/io/qabstractsceneloader_p.h | 2 | ||||
-rw-r--r-- | src/render/io/qsceneloader.cpp | 4 | ||||
-rw-r--r-- | src/render/io/qsceneloader.h | 4 | ||||
-rw-r--r-- | src/render/io/scene.cpp | 14 | ||||
-rw-r--r-- | src/render/io/scene_p.h | 18 | ||||
-rw-r--r-- | src/render/io/scenemanager.cpp | 12 | ||||
-rw-r--r-- | src/render/io/scenemanager_p.h | 18 | ||||
-rw-r--r-- | src/render/io/uniformbuffer_p.h | 2 |
12 files changed, 46 insertions, 46 deletions
diff --git a/src/render/io/abstractsceneparser_p.h b/src/render/io/abstractsceneparser_p.h index f3cb5fd5a..a4b5ab92d 100644 --- a/src/render/io/abstractsceneparser_p.h +++ b/src/render/io/abstractsceneparser_p.h @@ -56,7 +56,7 @@ QT_BEGIN_NAMESPACE -namespace Qt3D { +namespace Qt3DCore { class QEntity; } @@ -84,8 +84,8 @@ public: virtual void setSource(const QUrl &source) = 0; virtual bool isExtensionSupported(const QUrl &source) const = 0; - virtual Qt3D::QEntity *scene(const QString &id = QString()) = 0; - virtual Qt3D::QEntity *node(const QString &id) = 0; + virtual Qt3DCore::QEntity *scene(const QString &id = QString()) = 0; + virtual Qt3DCore::QEntity *node(const QString &id) = 0; ParserStatus parserStatus() const; QStringList errors() const; diff --git a/src/render/io/objloader.cpp b/src/render/io/objloader.cpp index 89c5ee672..09ab6985c 100644 --- a/src/render/io/objloader.cpp +++ b/src/render/io/objloader.cpp @@ -429,7 +429,7 @@ void ObjLoader::center( QVector<QVector3D>& points ) if ( points.isEmpty() ) return; - Qt3D::QAxisAlignedBoundingBox bb(points); + Qt3DCore::QAxisAlignedBoundingBox bb(points); QVector3D center = bb.center(); // Translate center of the AABB to the origin diff --git a/src/render/io/qabstractsceneloader.cpp b/src/render/io/qabstractsceneloader.cpp index d0e9a8838..110da9fa9 100644 --- a/src/render/io/qabstractsceneloader.cpp +++ b/src/render/io/qabstractsceneloader.cpp @@ -68,7 +68,7 @@ QAbstractSceneLoader::QAbstractSceneLoader(QNode *parent) QAbstractSceneLoader::~QAbstractSceneLoader() { - Q_ASSERT_X(Qt3D::QNodePrivate::get(this)->m_wasCleanedUp, Q_FUNC_INFO, "QNode::cleanup should have been called by now. A Qt3DRender::QAbstractSceneLoader subclass didn't call QNode::cleanup in its destructor"); + Q_ASSERT_X(Qt3DCore::QNodePrivate::get(this)->m_wasCleanedUp, Q_FUNC_INFO, "QNode::cleanup should have been called by now. A Qt3DRender::QAbstractSceneLoader subclass didn't call QNode::cleanup in its destructor"); } void QAbstractSceneLoader::copy(const QNode *ref) diff --git a/src/render/io/qabstractsceneloader.h b/src/render/io/qabstractsceneloader.h index 88af95577..66b41d265 100644 --- a/src/render/io/qabstractsceneloader.h +++ b/src/render/io/qabstractsceneloader.h @@ -49,13 +49,13 @@ namespace Qt3DRender { class QAbstractSceneLoader; class QAbstractSceneLoaderPrivate; -class QT3DRENDERERSHARED_EXPORT QAbstractSceneLoader : public Qt3D::QComponent +class QT3DRENDERERSHARED_EXPORT QAbstractSceneLoader : public Qt3DCore::QComponent { Q_OBJECT Q_PROPERTY(QUrl source READ source WRITE setSource NOTIFY sourceChanged) Q_PROPERTY(Status status READ status NOTIFY statusChanged) public: - explicit QAbstractSceneLoader(Qt3D::QNode *parent = 0); + explicit QAbstractSceneLoader(Qt3DCore::QNode *parent = 0); ~QAbstractSceneLoader(); enum Status { @@ -76,8 +76,8 @@ Q_SIGNALS: void statusChanged(); protected: - QAbstractSceneLoader(QAbstractSceneLoaderPrivate &dd, Qt3D::QNode *parent = 0); - void copy(const Qt3D::QNode *ref) Q_DECL_OVERRIDE; + QAbstractSceneLoader(QAbstractSceneLoaderPrivate &dd, Qt3DCore::QNode *parent = 0); + void copy(const Qt3DCore::QNode *ref) Q_DECL_OVERRIDE; private: Q_DECLARE_PRIVATE(QAbstractSceneLoader) diff --git a/src/render/io/qabstractsceneloader_p.h b/src/render/io/qabstractsceneloader_p.h index cc7dbd61b..e62a588fb 100644 --- a/src/render/io/qabstractsceneloader_p.h +++ b/src/render/io/qabstractsceneloader_p.h @@ -58,7 +58,7 @@ namespace Qt3DRender { class AbstractSceneParser; -class QT3DRENDERERSHARED_EXPORT QAbstractSceneLoaderPrivate : public Qt3D::QComponentPrivate +class QT3DRENDERERSHARED_EXPORT QAbstractSceneLoaderPrivate : public Qt3DCore::QComponentPrivate { public: QAbstractSceneLoaderPrivate(); diff --git a/src/render/io/qsceneloader.cpp b/src/render/io/qsceneloader.cpp index b5b4975e7..70eb15533 100644 --- a/src/render/io/qsceneloader.cpp +++ b/src/render/io/qsceneloader.cpp @@ -44,7 +44,7 @@ QT_BEGIN_NAMESPACE -using namespace Qt3D; +using namespace Qt3DCore; namespace Qt3DRender { @@ -59,7 +59,7 @@ QSceneLoader::~QSceneLoader() } // Called in main thread -void QSceneLoader::sceneChangeEvent(const Qt3D::QSceneChangePtr &change) +void QSceneLoader::sceneChangeEvent(const Qt3DCore::QSceneChangePtr &change) { QAbstractSceneLoaderPrivate *d = static_cast<QAbstractSceneLoaderPrivate*>(QNodePrivate::get(this)); QScenePropertyChangePtr e = qSharedPointerCast<QScenePropertyChange>(change); diff --git a/src/render/io/qsceneloader.h b/src/render/io/qsceneloader.h index adbed1dda..5ca560fdd 100644 --- a/src/render/io/qsceneloader.h +++ b/src/render/io/qsceneloader.h @@ -47,9 +47,9 @@ class QT3DRENDERERSHARED_EXPORT QSceneLoader : public QAbstractSceneLoader { Q_OBJECT public: - explicit QSceneLoader(Qt3D::QNode *parent = 0); + explicit QSceneLoader(Qt3DCore::QNode *parent = 0); ~QSceneLoader(); - void sceneChangeEvent(const Qt3D::QSceneChangePtr &change) Q_DECL_OVERRIDE; + void sceneChangeEvent(const Qt3DCore::QSceneChangePtr &change) Q_DECL_OVERRIDE; protected: QT3D_CLONEABLE(QSceneLoader) diff --git a/src/render/io/scene.cpp b/src/render/io/scene.cpp index a92dc1fd8..8874db279 100644 --- a/src/render/io/scene.cpp +++ b/src/render/io/scene.cpp @@ -44,7 +44,7 @@ QT_BEGIN_NAMESPACE -using namespace Qt3D; +using namespace Qt3DCore; namespace Qt3DRender { namespace Render { @@ -55,7 +55,7 @@ Scene::Scene() { } -void Scene::updateFromPeer(Qt3D::QNode *peer) +void Scene::updateFromPeer(Qt3DCore::QNode *peer) { QAbstractSceneLoader *loader = static_cast<QAbstractSceneLoader *>(peer); @@ -63,7 +63,7 @@ void Scene::updateFromPeer(Qt3D::QNode *peer) m_sceneManager->addSceneData(m_source, peerUuid()); } -void Scene::sceneChangeEvent(const Qt3D::QSceneChangePtr &e) +void Scene::sceneChangeEvent(const Qt3DCore::QSceneChangePtr &e) { QScenePropertyChangePtr propertyChange = qSharedPointerCast<QScenePropertyChange>(e); if (propertyChange->propertyName() == QByteArrayLiteral("source")) { @@ -77,7 +77,7 @@ QUrl Scene::source() const return m_source; } -void Scene::setSceneSubtree(Qt3D::QEntity *subTree) +void Scene::setSceneSubtree(Qt3DCore::QEntity *subTree) { QBackendScenePropertyChangePtr e(new QBackendScenePropertyChange(NodeUpdated, peerUuid())); e->setPropertyName("scene"); @@ -104,7 +104,7 @@ RenderSceneFunctor::RenderSceneFunctor(SceneManager *sceneManager) { } -Qt3D::QBackendNode *RenderSceneFunctor::create(Qt3D::QNode *frontend, const Qt3D::QBackendNodeFactory *factory) const +Qt3DCore::QBackendNode *RenderSceneFunctor::create(Qt3DCore::QNode *frontend, const Qt3DCore::QBackendNodeFactory *factory) const { Scene *scene = m_sceneManager->getOrCreateResource(frontend->id()); scene->setFactory(factory); @@ -113,12 +113,12 @@ Qt3D::QBackendNode *RenderSceneFunctor::create(Qt3D::QNode *frontend, const Qt3D return scene; } -Qt3D::QBackendNode *RenderSceneFunctor::get(const Qt3D::QNodeId &id) const +Qt3DCore::QBackendNode *RenderSceneFunctor::get(const Qt3DCore::QNodeId &id) const { return m_sceneManager->lookupResource(id); } -void RenderSceneFunctor::destroy(const Qt3D::QNodeId &id) const +void RenderSceneFunctor::destroy(const Qt3DCore::QNodeId &id) const { m_sceneManager->releaseResource(id); } diff --git a/src/render/io/scene_p.h b/src/render/io/scene_p.h index 090bc64d4..cd9e5d50e 100644 --- a/src/render/io/scene_p.h +++ b/src/render/io/scene_p.h @@ -54,7 +54,7 @@ QT_BEGIN_NAMESPACE -namespace Qt3D { +namespace Qt3DCore { class QEntity; } @@ -63,17 +63,17 @@ namespace Render { class SceneManager; -class Scene : public Qt3D::QBackendNode +class Scene : public Qt3DCore::QBackendNode { public: Scene(); - void updateFromPeer(Qt3D::QNode *peer) Q_DECL_OVERRIDE; + void updateFromPeer(Qt3DCore::QNode *peer) Q_DECL_OVERRIDE; // QObserverInterface interface - void sceneChangeEvent(const Qt3D::QSceneChangePtr &e) Q_DECL_OVERRIDE; + void sceneChangeEvent(const Qt3DCore::QSceneChangePtr &e) Q_DECL_OVERRIDE; QUrl source() const; - void setSceneSubtree(Qt3D::QEntity *subTree); + void setSceneSubtree(Qt3DCore::QEntity *subTree); void setSceneManager(SceneManager *manager); private: @@ -81,13 +81,13 @@ private: QUrl m_source; }; -class RenderSceneFunctor : public Qt3D::QBackendNodeFunctor +class RenderSceneFunctor : public Qt3DCore::QBackendNodeFunctor { public: explicit RenderSceneFunctor(SceneManager *sceneManager); - Qt3D::QBackendNode *create(Qt3D::QNode *frontend, const Qt3D::QBackendNodeFactory *factory) const Q_DECL_OVERRIDE; - Qt3D::QBackendNode *get(const Qt3D::QNodeId &id) const Q_DECL_OVERRIDE; - void destroy(const Qt3D::QNodeId &id) const Q_DECL_OVERRIDE; + Qt3DCore::QBackendNode *create(Qt3DCore::QNode *frontend, const Qt3DCore::QBackendNodeFactory *factory) const Q_DECL_OVERRIDE; + Qt3DCore::QBackendNode *get(const Qt3DCore::QNodeId &id) const Q_DECL_OVERRIDE; + void destroy(const Qt3DCore::QNodeId &id) const Q_DECL_OVERRIDE; private: SceneManager *m_sceneManager; diff --git a/src/render/io/scenemanager.cpp b/src/render/io/scenemanager.cpp index 52fd2a627..f7223cd46 100644 --- a/src/render/io/scenemanager.cpp +++ b/src/render/io/scenemanager.cpp @@ -42,14 +42,14 @@ namespace Qt3DRender { namespace Render { SceneManager::SceneManager() : QResourceManager<Scene, - Qt3D::QNodeId, + Qt3DCore::QNodeId, 8, - Qt3D::ArrayAllocatingPolicy, - Qt3D::ObjectLevelLockingPolicy>() + Qt3DCore::ArrayAllocatingPolicy, + Qt3DCore::ObjectLevelLockingPolicy>() { } -void SceneManager::addSceneData(const QUrl &source, const Qt3D::QNodeId &sceneUuid) +void SceneManager::addSceneData(const QUrl &source, const Qt3DCore::QNodeId &sceneUuid) { LoadSceneJobPtr newJob(new LoadSceneJob(source, sceneUuid)); @@ -68,13 +68,13 @@ QVector<LoadSceneJobPtr> SceneManager::pendingSceneLoaderJobs() return copy; } -void SceneManager::addLoadedSceneTree(const QUrl &source, Qt3D::QEntity *tree) +void SceneManager::addLoadedSceneTree(const QUrl &source, Qt3DCore::QEntity *tree) { SceneManager::Locker lock(this); m_loadedSceneTrees.insert(source, tree); } -Qt3D::QEntity *SceneManager::sceneTreeFromSource(const QUrl &source) +Qt3DCore::QEntity *SceneManager::sceneTreeFromSource(const QUrl &source) { SceneManager::Locker lock(this); return m_loadedSceneTrees.value(source); diff --git a/src/render/io/scenemanager_p.h b/src/render/io/scenemanager_p.h index 7bb845998..7baccd006 100644 --- a/src/render/io/scenemanager_p.h +++ b/src/render/io/scenemanager_p.h @@ -55,30 +55,30 @@ QT_BEGIN_NAMESPACE -namespace Qt3D { +namespace Qt3DCore { class QEntity; } namespace Qt3DRender { namespace Render { -class SceneManager : public Qt3D::QResourceManager<Scene, - Qt3D::QNodeId, +class SceneManager : public Qt3DCore::QResourceManager<Scene, + Qt3DCore::QNodeId, 8, - Qt3D::ArrayAllocatingPolicy, - Qt3D::ObjectLevelLockingPolicy> + Qt3DCore::ArrayAllocatingPolicy, + Qt3DCore::ObjectLevelLockingPolicy> { public: SceneManager(); - void addSceneData(const QUrl &source, const Qt3D::QNodeId &sceneUuid); + void addSceneData(const QUrl &source, const Qt3DCore::QNodeId &sceneUuid); QVector<LoadSceneJobPtr> pendingSceneLoaderJobs(); - void addLoadedSceneTree(const QUrl &source, Qt3D::QEntity *tree); - Qt3D::QEntity *sceneTreeFromSource(const QUrl &source); + void addLoadedSceneTree(const QUrl &source, Qt3DCore::QEntity *tree); + Qt3DCore::QEntity *sceneTreeFromSource(const QUrl &source); private: - QHash<QUrl, Qt3D::QEntity *> m_loadedSceneTrees; + QHash<QUrl, Qt3DCore::QEntity *> m_loadedSceneTrees; QVector<LoadSceneJobPtr> m_pendingJobs; }; diff --git a/src/render/io/uniformbuffer_p.h b/src/render/io/uniformbuffer_p.h index 5859a9078..49db79f51 100644 --- a/src/render/io/uniformbuffer_p.h +++ b/src/render/io/uniformbuffer_p.h @@ -59,7 +59,7 @@ namespace Render { class GraphicsContext; -typedef QPair<Qt3D::QNodeId, Qt3D::QNodeId> ShaderDataShaderUboKey; +typedef QPair<Qt3DCore::QNodeId, Qt3DCore::QNodeId> ShaderDataShaderUboKey; class UniformBuffer { |