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);
|
||||
}
|
||||
|
||||
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)
|
||||
{
|
||||
m_plugMan->addObject(obj);
|
||||
|
|
|
@ -54,15 +54,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:
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
#include "snapshot_dialog.h"
|
||||
|
||||
#include "../core/icore.h"
|
||||
#include "../core/imenu_manager.h"
|
||||
#include "../core/menu_manager.h"
|
||||
#include "../core/core_constants.h"
|
||||
|
||||
// NeL includes
|
||||
|
@ -348,12 +348,12 @@ void LandscapeEditorWindow::updateStatusBar()
|
|||
|
||||
void LandscapeEditorWindow::createMenus()
|
||||
{
|
||||
Core::IMenuManager *menuManager = Core::ICore::instance()->menuManager();
|
||||
Core::MenuManager *menuManager = Core::ICore::instance()->menuManager();
|
||||
}
|
||||
|
||||
void LandscapeEditorWindow::createToolBars()
|
||||
{
|
||||
Core::IMenuManager *menuManager = Core::ICore::instance()->menuManager();
|
||||
Core::MenuManager *menuManager = Core::ICore::instance()->menuManager();
|
||||
//QAction *action = menuManager->action(Core::Constants::NEW);
|
||||
//m_ui.fileToolBar->addAction(action);
|
||||
//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,20 +158,20 @@ void addNewGraphicsItems(const QModelIndex &primIndex, PrimitivesTreeModel *mode
|
|||
primitive->getPropertyByName ("Color", color);
|
||||
|
||||
item->setColor(QColor(color.R, color.G, color.B));
|
||||
|
||||
QVariant variantNode;
|
||||
variantNode.setValue<Node *>(node);
|
||||
item->setData(Constants::WORLD_EDITOR_NODE, variantNode);
|
||||
|
||||
QVariant graphicsData;
|
||||
graphicsData.setValue<AbstractWorldItem *>(item);
|
||||
node->setData(Constants::GRAPHICS_DATA_QT4_2D, graphicsData);
|
||||
|
||||
QVariant persistenVariant;
|
||||
QPersistentModelIndex *persistentIndex = new QPersistentModelIndex(primIndex);
|
||||
persistenVariant.setValue<QPersistentModelIndex *>(persistentIndex);
|
||||
item->setData(Constants::NODE_PERISTENT_INDEX, persistenVariant);
|
||||
}
|
||||
|
||||
QVariant variantNode;
|
||||
variantNode.setValue<Node *>(node);
|
||||
item->setData(Constants::WORLD_EDITOR_NODE, variantNode);
|
||||
|
||||
QVariant graphicsData;
|
||||
graphicsData.setValue<AbstractWorldItem *>(item);
|
||||
node->setData(Constants::GRAPHICS_DATA_QT4_2D, graphicsData);
|
||||
|
||||
QVariant persistenVariant;
|
||||
QPersistentModelIndex *persistentIndex = new QPersistentModelIndex(primIndex);
|
||||
persistenVariant.setValue<QPersistentModelIndex *>(persistentIndex);
|
||||
item->setData(Constants::NODE_PERISTENT_INDEX, persistenVariant);
|
||||
}
|
||||
|
||||
int count = model->rowCount(primIndex);
|
||||
|
|
|
@ -103,33 +103,6 @@ void WorldEditorPlugin::setNelContext(NLMISC::INelContext *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)
|
||||
{
|
||||
m_plugMan->addObject(obj);
|
||||
|
|
|
@ -56,15 +56,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:
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
|
||||
// Core
|
||||
#include "../core/icore.h"
|
||||
#include "../core/imenu_manager.h"
|
||||
#include "../core/menu_manager.h"
|
||||
#include "../core/core_constants.h"
|
||||
|
||||
// Lanscape Editor plugin
|
||||
|
@ -347,12 +347,12 @@ void WorldEditorWindow::hideEvent(QHideEvent *hideEvent)
|
|||
|
||||
void WorldEditorWindow::createMenus()
|
||||
{
|
||||
Core::IMenuManager *menuManager = Core::ICore::instance()->menuManager();
|
||||
Core::MenuManager *menuManager = Core::ICore::instance()->menuManager();
|
||||
}
|
||||
|
||||
void WorldEditorWindow::createToolBars()
|
||||
{
|
||||
Core::IMenuManager *menuManager = Core::ICore::instance()->menuManager();
|
||||
Core::MenuManager *menuManager = Core::ICore::instance()->menuManager();
|
||||
//QAction *action = menuManager->action(Core::Constants::NEW);
|
||||
//m_ui.fileToolBar->addAction(action);
|
||||
|
||||
|
|
Loading…
Reference in a new issue