Changed: #1193 Updated object viewer plugin with latest API changes to OVQT plugin system. Added the plugin-spec file.

This commit is contained in:
dnk-88 2011-09-26 01:36:02 +03:00
parent 54b76eec02
commit 7471561ba0
9 changed files with 78 additions and 102 deletions

View file

@ -52,7 +52,7 @@
#include "object_viewer_constants.h" #include "object_viewer_constants.h"
#include "../core/icore.h" #include "../core/icore.h"
#include "../core/imenu_manager.h" #include "../core/menu_manager.h"
#include "../core/core_constants.h" #include "../core/core_constants.h"
using namespace std; using namespace std;
@ -259,7 +259,7 @@ void CMainWindow::createActions()
void CMainWindow::createMenus() void CMainWindow::createMenus()
{ {
Core::IMenuManager *menuManager = Core::ICore::instance()->menuManager(); Core::MenuManager *menuManager = Core::ICore::instance()->menuManager();
_openAction = menuManager->action(Core::Constants::OPEN); _openAction = menuManager->action(Core::Constants::OPEN);

View file

@ -56,33 +56,6 @@ void ObjectViewerPlugin::setNelContext(NLMISC::INelContext *nelContext)
_LibContext = new NLMISC::CLibraryContext(*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) void ObjectViewerPlugin::addAutoReleasedObject(QObject *obj)
{ {
_plugMan->addObject(obj); _plugMan->addObject(obj);

View file

@ -36,15 +36,8 @@ public:
bool initialize(ExtensionSystem::IPluginManager *pluginManager, QString *errorString); bool initialize(ExtensionSystem::IPluginManager *pluginManager, QString *errorString);
void extensionsInitialized(); void extensionsInitialized();
void shutdown(); void shutdown();
void setNelContext(NLMISC::INelContext *nelContext); void setNelContext(NLMISC::INelContext *nelContext);
QString name() const;
QString version() const;
QString vendor() const;
QString description() const;
QStringList dependencies() const;
void addAutoReleasedObject(QObject *obj); void addAutoReleasedObject(QObject *obj);
protected: protected:

View file

@ -0,0 +1,10 @@
<plugin-spec>
<library-name>ovqt_plugin_object_viewer</library-name>
<name>ObjectViewer</name>
<version>0.8</version>
<vendor>Ryzom Core</vendor>
<description>Object Viewer plugin.</description>
<dependencies>
<dependency plugin-name="Core" version="0.8"/>
</dependencies>
</plugin-spec>