mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-12-30 12:50:53 +00:00
Changed: #1193 Updated landscape editor and world editor plugins with latest API changes to OVQT plugin system. Added the plugin-spec files for each plugin.
This commit is contained in:
parent
a164f178c2
commit
ede23b7077
9 changed files with 40 additions and 87 deletions
|
@ -67,33 +67,6 @@ void LandscapeEditorPlugin::setNelContext(NLMISC::INelContext *nelContext)
|
||||||
m_libContext = new NLMISC::CLibraryContext(*nelContext);
|
m_libContext = new NLMISC::CLibraryContext(*nelContext);
|
||||||
}
|
}
|
||||||
|
|
||||||
QString LandscapeEditorPlugin::name() const
|
|
||||||
{
|
|
||||||
return tr("LandscapeEditor");
|
|
||||||
}
|
|
||||||
|
|
||||||
QString LandscapeEditorPlugin::version() const
|
|
||||||
{
|
|
||||||
return "0.8";
|
|
||||||
}
|
|
||||||
|
|
||||||
QString LandscapeEditorPlugin::vendor() const
|
|
||||||
{
|
|
||||||
return "GSoC2011_dnk-88";
|
|
||||||
}
|
|
||||||
|
|
||||||
QString LandscapeEditorPlugin::description() const
|
|
||||||
{
|
|
||||||
return "Landscape editor ovqt plugin.";
|
|
||||||
}
|
|
||||||
|
|
||||||
QStringList LandscapeEditorPlugin::dependencies() const
|
|
||||||
{
|
|
||||||
QStringList list;
|
|
||||||
list.append(Core::Constants::OVQT_CORE_PLUGIN);
|
|
||||||
return list;
|
|
||||||
}
|
|
||||||
|
|
||||||
void LandscapeEditorPlugin::addAutoReleasedObject(QObject *obj)
|
void LandscapeEditorPlugin::addAutoReleasedObject(QObject *obj)
|
||||||
{
|
{
|
||||||
m_plugMan->addObject(obj);
|
m_plugMan->addObject(obj);
|
||||||
|
|
|
@ -54,15 +54,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:
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
#include "snapshot_dialog.h"
|
#include "snapshot_dialog.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"
|
||||||
|
|
||||||
// NeL includes
|
// NeL includes
|
||||||
|
@ -348,12 +348,12 @@ void LandscapeEditorWindow::updateStatusBar()
|
||||||
|
|
||||||
void LandscapeEditorWindow::createMenus()
|
void LandscapeEditorWindow::createMenus()
|
||||||
{
|
{
|
||||||
Core::IMenuManager *menuManager = Core::ICore::instance()->menuManager();
|
Core::MenuManager *menuManager = Core::ICore::instance()->menuManager();
|
||||||
}
|
}
|
||||||
|
|
||||||
void LandscapeEditorWindow::createToolBars()
|
void LandscapeEditorWindow::createToolBars()
|
||||||
{
|
{
|
||||||
Core::IMenuManager *menuManager = Core::ICore::instance()->menuManager();
|
Core::MenuManager *menuManager = Core::ICore::instance()->menuManager();
|
||||||
//QAction *action = menuManager->action(Core::Constants::NEW);
|
//QAction *action = menuManager->action(Core::Constants::NEW);
|
||||||
//m_ui.fileToolBar->addAction(action);
|
//m_ui.fileToolBar->addAction(action);
|
||||||
//action = menuManager->action(Core::Constants::SAVE);
|
//action = menuManager->action(Core::Constants::SAVE);
|
||||||
|
|
|
@ -0,0 +1,10 @@
|
||||||
|
<plugin-spec>
|
||||||
|
<library-name>ovqt_plugin_landscape_editor</library-name>
|
||||||
|
<name>LandscapeEditor</name>
|
||||||
|
<version>0.8</version>
|
||||||
|
<vendor>GSoC2011_dnk-88</vendor>
|
||||||
|
<description>Landscape editor ovqt plugin.</description>
|
||||||
|
<dependencies>
|
||||||
|
<dependency plugin-name="Core" version="0.8"/>
|
||||||
|
</dependencies>
|
||||||
|
</plugin-spec>
|
|
@ -0,0 +1,11 @@
|
||||||
|
<plugin-spec>
|
||||||
|
<library-name>ovqt_plugin_world_editor</library-name>
|
||||||
|
<name>WorldEditor</name>
|
||||||
|
<version>0.6</version>
|
||||||
|
<vendor>GSoC2011_dnk-88</vendor>
|
||||||
|
<description>Landscape editor ovqt plugin.</description>
|
||||||
|
<dependencies>
|
||||||
|
<dependency plugin-name="Core" version="0.8"/>
|
||||||
|
<dependency plugin-name="LandscapeEditor" version="0.6"/>
|
||||||
|
</dependencies>
|
||||||
|
</plugin-spec>
|
|
@ -158,7 +158,6 @@ void addNewGraphicsItems(const QModelIndex &primIndex, PrimitivesTreeModel *mode
|
||||||
primitive->getPropertyByName ("Color", color);
|
primitive->getPropertyByName ("Color", color);
|
||||||
|
|
||||||
item->setColor(QColor(color.R, color.G, color.B));
|
item->setColor(QColor(color.R, color.G, color.B));
|
||||||
}
|
|
||||||
|
|
||||||
QVariant variantNode;
|
QVariant variantNode;
|
||||||
variantNode.setValue<Node *>(node);
|
variantNode.setValue<Node *>(node);
|
||||||
|
@ -173,6 +172,7 @@ void addNewGraphicsItems(const QModelIndex &primIndex, PrimitivesTreeModel *mode
|
||||||
persistenVariant.setValue<QPersistentModelIndex *>(persistentIndex);
|
persistenVariant.setValue<QPersistentModelIndex *>(persistentIndex);
|
||||||
item->setData(Constants::NODE_PERISTENT_INDEX, persistenVariant);
|
item->setData(Constants::NODE_PERISTENT_INDEX, persistenVariant);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
int count = model->rowCount(primIndex);
|
int count = model->rowCount(primIndex);
|
||||||
for (int i = 0; i < count; ++i)
|
for (int i = 0; i < count; ++i)
|
||||||
|
|
|
@ -103,33 +103,6 @@ void WorldEditorPlugin::setNelContext(NLMISC::INelContext *nelContext)
|
||||||
m_libContext = new NLMISC::CLibraryContext(*nelContext);
|
m_libContext = new NLMISC::CLibraryContext(*nelContext);
|
||||||
}
|
}
|
||||||
|
|
||||||
QString WorldEditorPlugin::name() const
|
|
||||||
{
|
|
||||||
return tr("WorldEditor");
|
|
||||||
}
|
|
||||||
|
|
||||||
QString WorldEditorPlugin::version() const
|
|
||||||
{
|
|
||||||
return "0.1";
|
|
||||||
}
|
|
||||||
|
|
||||||
QString WorldEditorPlugin::vendor() const
|
|
||||||
{
|
|
||||||
return "GSoC2011_dnk-88";
|
|
||||||
}
|
|
||||||
|
|
||||||
QString WorldEditorPlugin::description() const
|
|
||||||
{
|
|
||||||
return "World editor ovqt plugin.";
|
|
||||||
}
|
|
||||||
|
|
||||||
QStringList WorldEditorPlugin::dependencies() const
|
|
||||||
{
|
|
||||||
QStringList list;
|
|
||||||
list.append(Core::Constants::OVQT_CORE_PLUGIN);
|
|
||||||
return list;
|
|
||||||
}
|
|
||||||
|
|
||||||
void WorldEditorPlugin::addAutoReleasedObject(QObject *obj)
|
void WorldEditorPlugin::addAutoReleasedObject(QObject *obj)
|
||||||
{
|
{
|
||||||
m_plugMan->addObject(obj);
|
m_plugMan->addObject(obj);
|
||||||
|
|
|
@ -56,15 +56,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:
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
|
|
||||||
// Core
|
// Core
|
||||||
#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"
|
||||||
|
|
||||||
// Lanscape Editor plugin
|
// Lanscape Editor plugin
|
||||||
|
@ -347,12 +347,12 @@ void WorldEditorWindow::hideEvent(QHideEvent *hideEvent)
|
||||||
|
|
||||||
void WorldEditorWindow::createMenus()
|
void WorldEditorWindow::createMenus()
|
||||||
{
|
{
|
||||||
Core::IMenuManager *menuManager = Core::ICore::instance()->menuManager();
|
Core::MenuManager *menuManager = Core::ICore::instance()->menuManager();
|
||||||
}
|
}
|
||||||
|
|
||||||
void WorldEditorWindow::createToolBars()
|
void WorldEditorWindow::createToolBars()
|
||||||
{
|
{
|
||||||
Core::IMenuManager *menuManager = Core::ICore::instance()->menuManager();
|
Core::MenuManager *menuManager = Core::ICore::instance()->menuManager();
|
||||||
//QAction *action = menuManager->action(Core::Constants::NEW);
|
//QAction *action = menuManager->action(Core::Constants::NEW);
|
||||||
//m_ui.fileToolBar->addAction(action);
|
//m_ui.fileToolBar->addAction(action);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue