Changed: #1193 Updated other plugins with latest API changes to OVQT plugin system. Added the plugin-spec files for each plugin.
parent
7471561ba0
commit
5f8789e98f
@ -0,0 +1,10 @@
|
|||||||
|
<plugin-spec>
|
||||||
|
<library-name>ovqt_plugin_disp_sheet_id</library-name>
|
||||||
|
<name>DisplaySheetId</name>
|
||||||
|
<version>1.0</version>
|
||||||
|
<vendor>pemeon</vendor>
|
||||||
|
<description>Display sheet id.</description>
|
||||||
|
<dependencies>
|
||||||
|
<dependency plugin-name="Core" version="0.8"/>
|
||||||
|
</dependencies>
|
||||||
|
</plugin-spec>
|
@ -0,0 +1,83 @@
|
|||||||
|
// Project includes
|
||||||
|
#include "example_plugin.h"
|
||||||
|
#include "example_settings_page.h"
|
||||||
|
#include "simple_viewer.h"
|
||||||
|
|
||||||
|
#include "../core/icore.h"
|
||||||
|
#include "../core/core_constants.h"
|
||||||
|
#include "../core/menu_manager.h"
|
||||||
|
|
||||||
|
#include "../../extension_system/iplugin_spec.h"
|
||||||
|
|
||||||
|
// NeL includes
|
||||||
|
#include "nel/misc/debug.h"
|
||||||
|
|
||||||
|
// Qt includes
|
||||||
|
#include <QtCore/QObject>
|
||||||
|
#include <QtGui/QMessageBox>
|
||||||
|
#include <QtGui/QMainWindow>
|
||||||
|
#include <QtGui/QMenu>
|
||||||
|
#include <QtGui/QAction>
|
||||||
|
#include <QtGui/QMenuBar>
|
||||||
|
|
||||||
|
namespace Plugin
|
||||||
|
{
|
||||||
|
|
||||||
|
ExamplePlugin::ExamplePlugin()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
ExamplePlugin::~ExamplePlugin()
|
||||||
|
{
|
||||||
|
Q_FOREACH(QObject *obj, m_autoReleaseObjects)
|
||||||
|
{
|
||||||
|
m_plugMan->removeObject(obj);
|
||||||
|
}
|
||||||
|
qDeleteAll(m_autoReleaseObjects);
|
||||||
|
m_autoReleaseObjects.clear();
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ExamplePlugin::initialize(ExtensionSystem::IPluginManager *pluginManager, QString *errorString)
|
||||||
|
{
|
||||||
|
Q_UNUSED(errorString);
|
||||||
|
m_plugMan = pluginManager;
|
||||||
|
|
||||||
|
addAutoReleasedObject(new ExampleSettingsPage(this));
|
||||||
|
addAutoReleasedObject(new ExampleContext(this));
|
||||||
|
addAutoReleasedObject(new ExampleCoreListener(this));
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ExamplePlugin::extensionsInitialized()
|
||||||
|
{
|
||||||
|
Core::ICore *core = Core::ICore::instance();
|
||||||
|
Core::MenuManager *menuManager = core->menuManager();
|
||||||
|
QAction *exampleAction1 = new QAction("Example1", this);
|
||||||
|
QAction *exampleAction2 = new QAction("Example2", this);
|
||||||
|
QAction *aboutQtAction = menuManager->action(Core::Constants::ABOUT_QT);
|
||||||
|
QMenu *helpMenu = menuManager->menu(Core::Constants::M_HELP);
|
||||||
|
helpMenu->insertAction(aboutQtAction, exampleAction1);
|
||||||
|
helpMenu->addSeparator();
|
||||||
|
helpMenu->addAction(exampleAction2);
|
||||||
|
menuManager->menuBar()->addMenu("ExampleMenu");
|
||||||
|
}
|
||||||
|
|
||||||
|
void ExamplePlugin::setNelContext(NLMISC::INelContext *nelContext)
|
||||||
|
{
|
||||||
|
#ifdef NL_OS_WINDOWS
|
||||||
|
// Ensure that a context doesn't exist yet.
|
||||||
|
// This only applies to platforms without PIC, e.g. Windows.
|
||||||
|
nlassert(!NLMISC::INelContext::isContextInitialised());
|
||||||
|
#endif // NL_OS_WINDOWS
|
||||||
|
m_LibContext = new NLMISC::CLibraryContext(*nelContext);
|
||||||
|
}
|
||||||
|
|
||||||
|
void ExamplePlugin::addAutoReleasedObject(QObject *obj)
|
||||||
|
{
|
||||||
|
m_plugMan->addObject(obj);
|
||||||
|
m_autoReleaseObjects.prepend(obj);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
Q_EXPORT_PLUGIN(Plugin::ExamplePlugin)
|
@ -0,0 +1,10 @@
|
|||||||
|
<plugin-spec>
|
||||||
|
<library-name>ovqt_plugin_example</library-name>
|
||||||
|
<name>ExamplePlugin</name>
|
||||||
|
<version>0.2</version>
|
||||||
|
<vendor>dnk-88</vendor>
|
||||||
|
<description>Example ovqt plugin.</description>
|
||||||
|
<dependencies>
|
||||||
|
<dependency plugin-name="Core" version="0.8"/>
|
||||||
|
</dependencies>
|
||||||
|
</plugin-spec>
|
@ -1,120 +0,0 @@
|
|||||||
// Project includes
|
|
||||||
#include "plugin1.h"
|
|
||||||
#include "example_settings_page.h"
|
|
||||||
#include "simple_viewer.h"
|
|
||||||
#include "../core/icore.h"
|
|
||||||
#include "../core/core_constants.h"
|
|
||||||
#include "../core/imenu_manager.h"
|
|
||||||
#include "../../extension_system/iplugin_spec.h"
|
|
||||||
|
|
||||||
// NeL includes
|
|
||||||
#include "nel/misc/debug.h"
|
|
||||||
|
|
||||||
// Qt includes
|
|
||||||
#include <QtCore/QObject>
|
|
||||||
#include <QtGui/QMessageBox>
|
|
||||||
#include <QtGui/QMainWindow>
|
|
||||||
#include <QtGui/QMenu>
|
|
||||||
#include <QtGui/QAction>
|
|
||||||
#include <QtGui/QMenuBar>
|
|
||||||
|
|
||||||
namespace Plugin
|
|
||||||
{
|
|
||||||
MyPlugin::~MyPlugin()
|
|
||||||
{
|
|
||||||
Q_FOREACH(QObject *obj, _autoReleaseObjects)
|
|
||||||
{
|
|
||||||
_plugMan->removeObject(obj);
|
|
||||||
}
|
|
||||||
qDeleteAll(_autoReleaseObjects);
|
|
||||||
_autoReleaseObjects.clear();
|
|
||||||
}
|
|
||||||
|
|
||||||
bool MyPlugin::initialize(ExtensionSystem::IPluginManager *pluginManager, QString *errorString)
|
|
||||||
{
|
|
||||||
Q_UNUSED(errorString);
|
|
||||||
_plugMan = pluginManager;
|
|
||||||
|
|
||||||
addAutoReleasedObject(new CExampleSettingsPage(this));
|
|
||||||
addAutoReleasedObject(new CExampleContext(this));
|
|
||||||
addAutoReleasedObject(new CCoreListener(this));
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
void MyPlugin::extensionsInitialized()
|
|
||||||
{
|
|
||||||
Core::ICore *core = Core::ICore::instance();
|
|
||||||
Core::IMenuManager *menuManager = core->menuManager();
|
|
||||||
//menuManager = _plugMan->getObject<Core::IMenuManager>();
|
|
||||||
QAction *exampleAction1 = new QAction("Example1", this);
|
|
||||||
QAction *exampleAction2 = new QAction("Example2", this);
|
|
||||||
QAction *aboutQtAction = menuManager->action(Core::Constants::ABOUT_QT);
|
|
||||||
QMenu *helpMenu = menuManager->menu(Core::Constants::M_HELP);
|
|
||||||
helpMenu->insertAction(aboutQtAction, exampleAction1);
|
|
||||||
helpMenu->addSeparator();
|
|
||||||
helpMenu->addAction(exampleAction2);
|
|
||||||
menuManager->menuBar()->addMenu("ExampleMenu");
|
|
||||||
}
|
|
||||||
|
|
||||||
void MyPlugin::setNelContext(NLMISC::INelContext *nelContext)
|
|
||||||
{
|
|
||||||
#ifdef NL_OS_WINDOWS
|
|
||||||
// Ensure that a context doesn't exist yet.
|
|
||||||
// This only applies to platforms without PIC, e.g. Windows.
|
|
||||||
nlassert(!NLMISC::INelContext::isContextInitialised());
|
|
||||||
#endif // NL_OS_WINDOWS
|
|
||||||
_LibContext = new NLMISC::CLibraryContext(*nelContext);
|
|
||||||
}
|
|
||||||
|
|
||||||
QString MyPlugin::name() const
|
|
||||||
{
|
|
||||||
return "ExamplePlugin";
|
|
||||||
}
|
|
||||||
|
|
||||||
QString MyPlugin::version() const
|
|
||||||
{
|
|
||||||
return "0.2";
|
|
||||||
}
|
|
||||||
|
|
||||||
QString MyPlugin::vendor() const
|
|
||||||
{
|
|
||||||
return "dnk-88";
|
|
||||||
}
|
|
||||||
|
|
||||||
QString MyPlugin::description() const
|
|
||||||
{
|
|
||||||
return "Example ovqt plugin.";
|
|
||||||
}
|
|
||||||
|
|
||||||
QStringList MyPlugin::dependencies() const
|
|
||||||
{
|
|
||||||
QStringList list;
|
|
||||||
list.append(Core::Constants::OVQT_CORE_PLUGIN);
|
|
||||||
return list;
|
|
||||||
}
|
|
||||||
|
|
||||||
void MyPlugin::addAutoReleasedObject(QObject *obj)
|
|
||||||
{
|
|
||||||
_plugMan->addObject(obj);
|
|
||||||
_autoReleaseObjects.prepend(obj);
|
|
||||||
}
|
|
||||||
|
|
||||||
QObject* MyPlugin::objectByName(const QString &name) const
|
|
||||||
{
|
|
||||||
Q_FOREACH (QObject *qobj, _plugMan->allObjects())
|
|
||||||
if (qobj->objectName() == name)
|
|
||||||
return qobj;
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
ExtensionSystem::IPluginSpec *MyPlugin::pluginByName(const QString &name) const
|
|
||||||
{
|
|
||||||
Q_FOREACH (ExtensionSystem::IPluginSpec *spec, _plugMan->plugins())
|
|
||||||
if (spec->name() == name)
|
|
||||||
return spec;
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
Q_EXPORT_PLUGIN(Plugin::MyPlugin)
|
|
@ -0,0 +1,10 @@
|
|||||||
|
<plugin-spec>
|
||||||
|
<library-name>ovqt_plugin_georges_editor</library-name>
|
||||||
|
<name>GeorgesEditor</name>
|
||||||
|
<version>0.4</version>
|
||||||
|
<vendor>aquiles</vendor>
|
||||||
|
<description>Tool to create and edit sheets or forms.</description>
|
||||||
|
<dependencies>
|
||||||
|
<dependency plugin-name="Core" version="0.8"/>
|
||||||
|
</dependencies>
|
||||||
|
</plugin-spec>
|
@ -0,0 +1,10 @@
|
|||||||
|
<plugin-spec>
|
||||||
|
<library-name>ovqt_plugin_log</library-name>
|
||||||
|
<name>LogPlugin</name>
|
||||||
|
<version>1.1</version>
|
||||||
|
<vendor>aquiles</vendor>
|
||||||
|
<description>DockWidget to display all log messages from NeL.</description>
|
||||||
|
<dependencies>
|
||||||
|
<dependency plugin-name="Core" version="0.8"/>
|
||||||
|
</dependencies>
|
||||||
|
</plugin-spec>
|
@ -0,0 +1,10 @@
|
|||||||
|
<plugin-spec>
|
||||||
|
<library-name>ovqt_plugin_mission_compiler</library-name>
|
||||||
|
<name>MissionCompiler</name>
|
||||||
|
<version>0.1</version>
|
||||||
|
<vendor>Ryzom Core</vendor>
|
||||||
|
<description>Mission Compiler Plugin</description>
|
||||||
|
<dependencies>
|
||||||
|
<dependency plugin-name="Core" version="0.8"/>
|
||||||
|
</dependencies>
|
||||||
|
</plugin-spec>
|
@ -0,0 +1,10 @@
|
|||||||
|
<plugin-spec>
|
||||||
|
<library-name>ovqt_plugin_sheet_builder</library-name>
|
||||||
|
<name>SheetBuilder</name>
|
||||||
|
<version>1.0</version>
|
||||||
|
<vendor>kharvd</vendor>
|
||||||
|
<description>make_sheet_id equivalent</description>
|
||||||
|
<dependencies>
|
||||||
|
<dependency plugin-name="Core" version="0.8"/>
|
||||||
|
</dependencies>
|
||||||
|
</plugin-spec>
|
@ -0,0 +1,10 @@
|
|||||||
|
<plugin-spec>
|
||||||
|
<library-name>ovqt_plugin_zone_painter</library-name>
|
||||||
|
<name>ZonePainter</name>
|
||||||
|
<version>0.0</version>
|
||||||
|
<vendor>Ryzom Core</vendor>
|
||||||
|
<description>Zone Painter Plugin</description>
|
||||||
|
<dependencies>
|
||||||
|
<dependency plugin-name="Core" version="0.8"/>
|
||||||
|
</dependencies>
|
||||||
|
</plugin-spec>
|
Loading…
Reference in New Issue