From a264e86e1300135866ce7bcf942853a512ca32e2 Mon Sep 17 00:00:00 2001 From: Marc Zinnschlag Date: Tue, 4 Mar 2014 14:47:43 +0100 Subject: [PATCH] subclasses scene widget for worldspace scenes --- apps/opencs/CMakeLists.txt | 2 +- apps/opencs/view/render/worldspacewidget.cpp | 6 ++++++ apps/opencs/view/render/worldspacewidget.hpp | 18 ++++++++++++++++++ apps/opencs/view/world/scenesubview.cpp | 4 ++-- 4 files changed, 27 insertions(+), 3 deletions(-) create mode 100644 apps/opencs/view/render/worldspacewidget.cpp create mode 100644 apps/opencs/view/render/worldspacewidget.hpp diff --git a/apps/opencs/CMakeLists.txt b/apps/opencs/CMakeLists.txt index 119280f13..72757556d 100644 --- a/apps/opencs/CMakeLists.txt +++ b/apps/opencs/CMakeLists.txt @@ -64,7 +64,7 @@ opencs_units (view/world ) opencs_units (view/render - scenewidget + scenewidget worldspacewidget ) opencs_units_noqt (view/render diff --git a/apps/opencs/view/render/worldspacewidget.cpp b/apps/opencs/view/render/worldspacewidget.cpp new file mode 100644 index 000000000..c88821a62 --- /dev/null +++ b/apps/opencs/view/render/worldspacewidget.cpp @@ -0,0 +1,6 @@ + +#include "worldspacewidget.hpp" + +CSVRender::WorldspaceWidget::WorldspaceWidget (QWidget *parent) +: SceneWidget (parent) +{} \ No newline at end of file diff --git a/apps/opencs/view/render/worldspacewidget.hpp b/apps/opencs/view/render/worldspacewidget.hpp new file mode 100644 index 000000000..1c122c935 --- /dev/null +++ b/apps/opencs/view/render/worldspacewidget.hpp @@ -0,0 +1,18 @@ +#ifndef OPENCS_VIEW_WORLDSPACEWIDGET_H +#define OPENCS_VIEW_WORLDSPACEWIDGET_H + +#include "scenewidget.hpp" + +namespace CSVRender +{ + class WorldspaceWidget : public SceneWidget + { + Q_OBJECT + + public: + + WorldspaceWidget (QWidget *parent = 0); + }; +} + +#endif \ No newline at end of file diff --git a/apps/opencs/view/world/scenesubview.cpp b/apps/opencs/view/world/scenesubview.cpp index a23931950..516a5db80 100644 --- a/apps/opencs/view/world/scenesubview.cpp +++ b/apps/opencs/view/world/scenesubview.cpp @@ -9,7 +9,7 @@ #include "../filter/filterbox.hpp" -#include "../render/scenewidget.hpp" +#include "../render/worldspacewidget.hpp" #include "tablebottombox.hpp" #include "creator.hpp" @@ -44,7 +44,7 @@ CSVWorld::SceneSubView::SceneSubView (const CSMWorld::UniversalId& id, CSMDoc::D layout2->addWidget (toolbar, 0); - mScene = new CSVRender::SceneWidget(this); + mScene = new CSVRender::WorldspaceWidget (this); layout2->addWidget (mScene, 1);