From 9a420946f8cc178a9f60ffab9296419a1e0d6fda Mon Sep 17 00:00:00 2001 From: dnk-88 Date: Mon, 26 Sep 2011 01:36:02 +0300 Subject: [PATCH] Changed: #1193 Updated object viewer plugin with latest API changes to OVQT plugin system. Added the plugin-spec file. --- .../src/plugins/object_viewer/main_window.cpp | 4 +- .../object_viewer/object_viewer_constants.h | 124 +++++++++--------- .../object_viewer/object_viewer_plugin.cpp | 27 ---- .../object_viewer/object_viewer_plugin.h | 7 - .../ovqt_plugin_object_viewer.xml | 10 ++ .../object_viewer/particle_force_page.h | 2 +- .../src/plugins/object_viewer/particle_node.h | 2 +- .../src/plugins/object_viewer/ps_mover_page.h | 2 +- .../plugins/object_viewer/sound_system.cpp | 2 +- 9 files changed, 78 insertions(+), 102 deletions(-) create mode 100644 code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/ovqt_plugin_object_viewer.xml diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/main_window.cpp b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/main_window.cpp index e1962cf5b..a65f510c4 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/main_window.cpp +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/main_window.cpp @@ -52,7 +52,7 @@ #include "object_viewer_constants.h" #include "../core/icore.h" -#include "../core/imenu_manager.h" +#include "../core/menu_manager.h" #include "../core/core_constants.h" using namespace std; @@ -259,7 +259,7 @@ void CMainWindow::createActions() void CMainWindow::createMenus() { - Core::IMenuManager *menuManager = Core::ICore::instance()->menuManager(); + Core::MenuManager *menuManager = Core::ICore::instance()->menuManager(); _openAction = menuManager->action(Core::Constants::OPEN); diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/object_viewer_constants.h b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/object_viewer_constants.h index 30a9b4c45..deb0c84ce 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/object_viewer_constants.h +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/object_viewer_constants.h @@ -22,76 +22,76 @@ namespace NLQT { namespace Constants { -const char * const OBJECT_VIEWER_PLUGIN = "ObjectViewer"; +const char *const OBJECT_VIEWER_PLUGIN = "ObjectViewer"; //mainwindow -const char * const MAIN_WINDOW = "ObjectViewer.MainWindow"; +const char *const MAIN_WINDOW = "ObjectViewer.MainWindow"; //settings -const char * const OBJECT_VIEWER_SECTION = "ObjectViewer"; -const char * const GRAPHICS_DRIVER = "GraphicsDriver"; -const char * const ENABLE_BLOOM = "EnableBloom"; -const char * const ENABLE_SQUARE_BLOOM = "EnableSquareBloom"; -const char * const BLOOM_DENSITY = "BloomDensity"; -const char * const QT_STYLE = "QtStyle"; -const char * const QT_PALETTE = "QtPalette"; -const char * const FONT = "Font"; +const char *const OBJECT_VIEWER_SECTION = "ObjectViewer"; +const char *const GRAPHICS_DRIVER = "GraphicsDriver"; +const char *const ENABLE_BLOOM = "EnableBloom"; +const char *const ENABLE_SQUARE_BLOOM = "EnableSquareBloom"; +const char *const BLOOM_DENSITY = "BloomDensity"; +const char *const QT_STYLE = "QtStyle"; +const char *const QT_PALETTE = "QtPalette"; +const char *const FONT = "Font"; -const char * const SOUND_ENABLE = "SoundEnable"; -const char * const SOUND_DRIVER = "SoundDriver"; -const char * const SOUND_DEVICE = "SoundDevice"; -const char * const SOUND_AUTO_LOAD_SAMPLE = "SoundAutoLoadSample"; -const char * const SOUND_ENABLE_OCCLUDE_OBSTRUCT = "SoundEnableOccludeObstruct"; -const char * const SOUND_ENABLE_REVERB = "SoundEnableReverb"; -const char * const SOUND_MANUAL_ROLL_OFF = "SoundManualRolloff"; -const char * const SOUND_FORCE_SOFTWARE = "SoundForceSoftware"; -const char * const SOUND_USE_ADCPM = "SoundUseADPCM"; -const char * const SOUND_MAX_TRACK = "SoundMaxTrack"; -const char * const SOUND_PACKED_SHEET_PATH = "SoundPackedSheetPath"; -const char * const SOUND_SAMPLE_PATH = "SoundSamplePath"; +const char *const SOUND_ENABLE = "SoundEnable"; +const char *const SOUND_DRIVER = "SoundDriver"; +const char *const SOUND_DEVICE = "SoundDevice"; +const char *const SOUND_AUTO_LOAD_SAMPLE = "SoundAutoLoadSample"; +const char *const SOUND_ENABLE_OCCLUDE_OBSTRUCT = "SoundEnableOccludeObstruct"; +const char *const SOUND_ENABLE_REVERB = "SoundEnableReverb"; +const char *const SOUND_MANUAL_ROLL_OFF = "SoundManualRolloff"; +const char *const SOUND_FORCE_SOFTWARE = "SoundForceSoftware"; +const char *const SOUND_USE_ADCPM = "SoundUseADPCM"; +const char *const SOUND_MAX_TRACK = "SoundMaxTrack"; +const char *const SOUND_PACKED_SHEET_PATH = "SoundPackedSheetPath"; +const char *const SOUND_SAMPLE_PATH = "SoundSamplePath"; -const char * const VEGET_TILE_BANK = "VegetTileBank"; -const char * const VEGET_TILE_FAR_BANK = "VegetTileFarBank"; -const char * const VEGET_TEXTURE = "VegetTexture"; -const char * const VEGET_LANDSCAPE_ZONES = "VegetLandscapeZones"; -const char * const COARSE_MESH_TEXTURE = "CoarseMeshTexture"; +const char *const VEGET_TILE_BANK = "VegetTileBank"; +const char *const VEGET_TILE_FAR_BANK = "VegetTileFarBank"; +const char *const VEGET_TEXTURE = "VegetTexture"; +const char *const VEGET_LANDSCAPE_ZONES = "VegetLandscapeZones"; +const char *const COARSE_MESH_TEXTURE = "CoarseMeshTexture"; -const char * const ICON_ADD_ITEM = ":/icons/ic_nel_add_item.png"; -const char * const ICON_INSERT_ITEM = ":/icons/ic_nel_insert_item.png"; -const char * const ICON_DELETE_ITEM = ":/icons/ic_nel_delete_item.png"; -const char * const ICON_DOWN_ITEM = ":/icons/ic_nel_down_item.png"; -const char * const ICON_UP_ITEM = ":/icons/ic_nel_up_item.png"; -const char * const ICON_CAMERA_ADD = ":/icons/ic_nel_camera_add.png"; -const char * const ICON_CAMERA_DEL = ":/icons/ic_nel_camera_del.png"; -const char * const ICON_CAMERA_3DEDIT = ":/icons/ic_nel_camera_3dedit.png"; -const char * const ICON_CAMERA_FPS = ":/icons/ic_nel_camera_fps.png"; -const char * const ICON_RESET_CAMERA = ":/icons/ic_nel_reset_camera.png"; -const char * const ICON_ANIM = ":/icons/ic_nel_anim.png"; -const char * const ICON_ANIMSET = ":/icons/ic_nel_animset.png"; -const char * const ICON_BGCOLOR = ":/icons/ic_nel_bgcolor.png"; -const char * const ICON_DAYNIGHT = ":/icons/ic_nel_daynight.png"; -const char * const ICON_FRAMEDELAY = ":/icons/ic_nel_framedelay.png"; -const char * const ICON_MIXER = ":/icons/ic_nel_mixer.png"; -const char * const ICON_MRM_MESH = ":/icons/ic_nel_mrm_mesh.png"; -const char * const ICON_PARTICLES = ":/icons/ic_nel_particles.png"; -const char * const ICON_SKELSCALE = ":/icons/ic_nel_skelscale.png"; -const char * const ICON_VEGET = ":/icons/ic_nel_veget.png"; -const char * const ICON_VEGETSET = ":/icons/ic_nel_vegetset.png"; -const char * const ICON_WATER = ":/icons/ic_nel_water.png"; -const char * const ICON_WIND = ":/icons/ic_nel_wind.png"; +const char *const ICON_ADD_ITEM = ":/icons/ic_nel_add_item.png"; +const char *const ICON_INSERT_ITEM = ":/icons/ic_nel_insert_item.png"; +const char *const ICON_DELETE_ITEM = ":/icons/ic_nel_delete_item.png"; +const char *const ICON_DOWN_ITEM = ":/icons/ic_nel_down_item.png"; +const char *const ICON_UP_ITEM = ":/icons/ic_nel_up_item.png"; +const char *const ICON_CAMERA_ADD = ":/icons/ic_nel_camera_add.png"; +const char *const ICON_CAMERA_DEL = ":/icons/ic_nel_camera_del.png"; +const char *const ICON_CAMERA_3DEDIT = ":/icons/ic_nel_camera_3dedit.png"; +const char *const ICON_CAMERA_FPS = ":/icons/ic_nel_camera_fps.png"; +const char *const ICON_RESET_CAMERA = ":/icons/ic_nel_reset_camera.png"; +const char *const ICON_ANIM = ":/icons/ic_nel_anim.png"; +const char *const ICON_ANIMSET = ":/icons/ic_nel_animset.png"; +const char *const ICON_BGCOLOR = ":/icons/ic_nel_bgcolor.png"; +const char *const ICON_DAYNIGHT = ":/icons/ic_nel_daynight.png"; +const char *const ICON_FRAMEDELAY = ":/icons/ic_nel_framedelay.png"; +const char *const ICON_MIXER = ":/icons/ic_nel_mixer.png"; +const char *const ICON_MRM_MESH = ":/icons/ic_nel_mrm_mesh.png"; +const char *const ICON_PARTICLES = ":/icons/ic_nel_particles.png"; +const char *const ICON_SKELSCALE = ":/icons/ic_nel_skelscale.png"; +const char *const ICON_VEGET = ":/icons/ic_nel_veget.png"; +const char *const ICON_VEGETSET = ":/icons/ic_nel_vegetset.png"; +const char *const ICON_WATER = ":/icons/ic_nel_water.png"; +const char *const ICON_WIND = ":/icons/ic_nel_wind.png"; -const char * const ICON_COLLISION_ZONE_ITEM_SMALL = ":/icons/particles_system_24/ic_nel_collision_zone_item_24.png"; -const char * const ICON_EMITTER_ITEM_SMALL = ":/icons/particles_system_24/ic_nel_emitter_item_24.png"; -const char * const ICON_FORCE_ITEM_SMALL = ":/icons/particles_system_24/ic_nel_force_item_24.png"; -const char * const ICON_INSTANCE_ITEM_SMALL = ":/icons/particles_system_24/ic_nel_instance_item_24.png"; -const char * const ICON_LIGHT_ITEM_SMALL = ":/icons/particles_system_24/ic_nel_light_item_24.png"; -const char * const ICON_LOCATED_ITEM_SMALL = ":/icons/particles_system_24/ic_nel_located_item_24.png"; -const char * const ICON_PARTICLE_ITEM_SMALL = ":/icons/particles_system_24/ic_nel_particle_item_24.png"; -const char * const ICON_PARTICLE_SYSTEM_SMALL = ":/icons/particles_system_24/ic_nel_particle_system_24.png"; -const char * const ICON_PARTICLE_SYSTEM_CLOSE_SMALL = ":/icons/particles_system_24/ic_nel_particle_system_close_24.png"; -const char * const ICON_PARTICLES_SMALL = ":/icons/particles_system_24/ic_nel_particles_24.png"; -const char * const ICON_SOUND_ITEM_SMALL = ":/icons/particles_system_24/ic_nel_sound_item_24.png"; -const char * const ICON_WORKSPACE_ITEM_SMALL = ":/icons/particles_system_24/ic_nel_workspace_item_24.png"; +const char *const ICON_COLLISION_ZONE_ITEM_SMALL = ":/icons/particles_system_24/ic_nel_collision_zone_item_24.png"; +const char *const ICON_EMITTER_ITEM_SMALL = ":/icons/particles_system_24/ic_nel_emitter_item_24.png"; +const char *const ICON_FORCE_ITEM_SMALL = ":/icons/particles_system_24/ic_nel_force_item_24.png"; +const char *const ICON_INSTANCE_ITEM_SMALL = ":/icons/particles_system_24/ic_nel_instance_item_24.png"; +const char *const ICON_LIGHT_ITEM_SMALL = ":/icons/particles_system_24/ic_nel_light_item_24.png"; +const char *const ICON_LOCATED_ITEM_SMALL = ":/icons/particles_system_24/ic_nel_located_item_24.png"; +const char *const ICON_PARTICLE_ITEM_SMALL = ":/icons/particles_system_24/ic_nel_particle_item_24.png"; +const char *const ICON_PARTICLE_SYSTEM_SMALL = ":/icons/particles_system_24/ic_nel_particle_system_24.png"; +const char *const ICON_PARTICLE_SYSTEM_CLOSE_SMALL = ":/icons/particles_system_24/ic_nel_particle_system_close_24.png"; +const char *const ICON_PARTICLES_SMALL = ":/icons/particles_system_24/ic_nel_particles_24.png"; +const char *const ICON_SOUND_ITEM_SMALL = ":/icons/particles_system_24/ic_nel_sound_item_24.png"; +const char *const ICON_WORKSPACE_ITEM_SMALL = ":/icons/particles_system_24/ic_nel_workspace_item_24.png"; } // namespace Constants } // namespace NLQT diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/object_viewer_plugin.cpp b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/object_viewer_plugin.cpp index f82789e66..ec21cef33 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/object_viewer_plugin.cpp +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/object_viewer_plugin.cpp @@ -56,33 +56,6 @@ void ObjectViewerPlugin::setNelContext(NLMISC::INelContext *nelContext) _LibContext = new NLMISC::CLibraryContext(*nelContext); } -QString ObjectViewerPlugin::name() const -{ - return "ObjectViewer"; -} - -QString ObjectViewerPlugin::version() const -{ - return "0.8"; -} - -QString ObjectViewerPlugin::vendor() const -{ - return Core::Constants::OVQT_VENDOR; -} - -QString ObjectViewerPlugin::description() const -{ - return "Object Viewer plugin."; -} - -QStringList ObjectViewerPlugin::dependencies() const -{ - QStringList list; - list.append(Core::Constants::OVQT_CORE_PLUGIN); - return list; -} - void ObjectViewerPlugin::addAutoReleasedObject(QObject *obj) { _plugMan->addObject(obj); diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/object_viewer_plugin.h b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/object_viewer_plugin.h index f0f23d398..5018501bf 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/object_viewer_plugin.h +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/object_viewer_plugin.h @@ -36,15 +36,8 @@ public: bool initialize(ExtensionSystem::IPluginManager *pluginManager, QString *errorString); void extensionsInitialized(); void shutdown(); - void setNelContext(NLMISC::INelContext *nelContext); - QString name() const; - QString version() const; - QString vendor() const; - QString description() const; - QStringList dependencies() const; - void addAutoReleasedObject(QObject *obj); protected: diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/ovqt_plugin_object_viewer.xml b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/ovqt_plugin_object_viewer.xml new file mode 100644 index 000000000..cc951cdcb --- /dev/null +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/ovqt_plugin_object_viewer.xml @@ -0,0 +1,10 @@ + + ovqt_plugin_object_viewer + ObjectViewer + 0.8 + Ryzom Core + Object Viewer plugin. + + + + \ No newline at end of file diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_force_page.h b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_force_page.h index 1bc23224f..1518bdd63 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_force_page.h +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_force_page.h @@ -43,7 +43,7 @@ namespace NLQT class CLocatedItem: public QListWidgetItem { public: - CLocatedItem ( const QString & text, QListWidget *parent = 0, int type = UserType ): + CLocatedItem ( const QString &text, QListWidget *parent = 0, int type = UserType ): QListWidgetItem(text, parent, type), _loc(NULL) {} void setUserData(NL3D::CPSLocated *loc) diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_node.h b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_node.h index acf7dfcd6..e9da65b5c 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_node.h +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_node.h @@ -332,7 +332,7 @@ public: /// Restick all objects, useful after loading void restickAllObjects(); - TNodeVect& getNodeList() + TNodeVect &getNodeList() { return _Nodes; } diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/ps_mover_page.h b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/ps_mover_page.h index a548b789a..74caadc5c 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/ps_mover_page.h +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/ps_mover_page.h @@ -44,7 +44,7 @@ namespace NLQT class CLocatedBindableItem: public QListWidgetItem { public: - CLocatedBindableItem ( const QString & text, QListWidget * parent = 0, int type = UserType ): + CLocatedBindableItem ( const QString &text, QListWidget *parent = 0, int type = UserType ): QListWidgetItem(text, parent, type), _lb(NULL) {} void setUserData(NL3D::CPSLocatedBindable *loc) diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/sound_system.cpp b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/sound_system.cpp index 07101aa85..a8a204c96 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/sound_system.cpp +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/sound_system.cpp @@ -190,7 +190,7 @@ NLSOUND::USource *CSoundSystem::create(const std::string &soundName) return NULL; } -void CSoundSystem::playAnimation(std::string& name, float lastTime, float curTime, NLSOUND::CSoundContext &context) +void CSoundSystem::playAnimation(std::string &name, float lastTime, float curTime, NLSOUND::CSoundContext &context) { if (_AnimManager == NULL) {