From 511d735dc957934280d63e53bd636df9d78bb249 Mon Sep 17 00:00:00 2001 From: sfb Date: Tue, 31 May 2011 09:28:10 -0500 Subject: [PATCH] Changed: Starting to change the zone manager to handle loading, saving and displaying zones. --- .../zone_painter/zone_painter_plugin.cpp | 2 ++ .../zone_painter/zone_painter_plugin.h | 21 ++++++++++--------- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/zone_painter/zone_painter_plugin.cpp b/code/nel/tools/3d/object_viewer_qt/src/plugins/zone_painter/zone_painter_plugin.cpp index 7b8237ccb..9ccfb9053 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/zone_painter/zone_painter_plugin.cpp +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/zone_painter/zone_painter_plugin.cpp @@ -19,6 +19,8 @@ namespace Plugin { + NLMISC_SAFE_SINGLETON_IMPL(CZoneManager) + ZonePainterPlugin::~ZonePainterPlugin() { Q_FOREACH(QObject *obj, _autoReleaseObjects) diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/zone_painter/zone_painter_plugin.h b/code/nel/tools/3d/object_viewer_qt/src/plugins/zone_painter/zone_painter_plugin.h index 0d5b9296a..2c1dff53e 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/zone_painter/zone_painter_plugin.h +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/zone_painter/zone_painter_plugin.h @@ -7,10 +7,12 @@ #include "zone_painter_main_window.h" // NeL includes -#include "nel/misc/app_context.h" +#include +#include #include #include #include +#include // Qt includes #include @@ -29,16 +31,15 @@ class IPluginSpec; namespace Plugin { - class CZoneManager { + class CZoneManager + { + NLMISC_SAFE_SINGLETON_DECL(CZoneManager) public: - NL3D::CZone zone; - - std::string getZoneInfo() { - NL3D::CZone zone; - zone.getNumPatchs(); - - return ""; - } + //m_painterLandscape = static_cast + + private: + NL3D::CLandscapeModel *m_painterLandscape; + NL3D::CZone *m_currentZone; }; class ZonePainterPlugin : public QObject, public ExtensionSystem::IPlugin