diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/world_editor/icons/ic_nel_move.png b/code/nel/tools/3d/object_viewer_qt/src/plugins/world_editor/icons/ic_nel_move.png
new file mode 100644
index 000000000..7039bd070
Binary files /dev/null and b/code/nel/tools/3d/object_viewer_qt/src/plugins/world_editor/icons/ic_nel_move.png differ
diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/world_editor/icons/ic_nel_rotate.png b/code/nel/tools/3d/object_viewer_qt/src/plugins/world_editor/icons/ic_nel_rotate.png
new file mode 100644
index 000000000..73a0be2fe
Binary files /dev/null and b/code/nel/tools/3d/object_viewer_qt/src/plugins/world_editor/icons/ic_nel_rotate.png differ
diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/world_editor/icons/ic_nel_scale.png b/code/nel/tools/3d/object_viewer_qt/src/plugins/world_editor/icons/ic_nel_scale.png
new file mode 100644
index 000000000..e76150ab4
Binary files /dev/null and b/code/nel/tools/3d/object_viewer_qt/src/plugins/world_editor/icons/ic_nel_scale.png differ
diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/world_editor/icons/ic_nel_select.png b/code/nel/tools/3d/object_viewer_qt/src/plugins/world_editor/icons/ic_nel_select.png
new file mode 100644
index 000000000..9a677b8a6
Binary files /dev/null and b/code/nel/tools/3d/object_viewer_qt/src/plugins/world_editor/icons/ic_nel_select.png differ
diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/world_editor/icons/ic_nel_turn.png b/code/nel/tools/3d/object_viewer_qt/src/plugins/world_editor/icons/ic_nel_turn.png
new file mode 100644
index 000000000..b03cb0fd0
Binary files /dev/null and b/code/nel/tools/3d/object_viewer_qt/src/plugins/world_editor/icons/ic_nel_turn.png differ
diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/world_editor/world_editor.qrc b/code/nel/tools/3d/object_viewer_qt/src/plugins/world_editor/world_editor.qrc
index f7c54fd5f..02ffcbe00 100644
--- a/code/nel/tools/3d/object_viewer_qt/src/plugins/world_editor/world_editor.qrc
+++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/world_editor/world_editor.qrc
@@ -1,5 +1,10 @@
+ icons/ic_nel_select.png
+ icons/ic_nel_scale.png
+ icons/ic_nel_rotate.png
+ icons/ic_nel_move.png
+ icons/ic_nel_turn.png
icons/ic_nel_world_editor.png
diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/world_editor/world_editor_window.cpp b/code/nel/tools/3d/object_viewer_qt/src/plugins/world_editor/world_editor_window.cpp
index fc1f0e248..7ddb5484c 100644
--- a/code/nel/tools/3d/object_viewer_qt/src/plugins/world_editor/world_editor_window.cpp
+++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/world_editor/world_editor_window.cpp
@@ -40,6 +40,7 @@
// Qt includes
#include
+#include
#include
namespace WorldEditor
@@ -54,12 +55,28 @@ WorldEditorWindow::WorldEditorWindow(QWidget *parent)
m_ui.setupUi(this);
m_undoStack = new QUndoStack(this);
+ QActionGroup *sceneModeGroup = new QActionGroup(this);
+ sceneModeGroup->addAction(m_ui.selectAction);
+ sceneModeGroup->addAction(m_ui.moveAction);
+ sceneModeGroup->addAction(m_ui.rotateAction);
+ sceneModeGroup->addAction(m_ui.scaleAction);
+ sceneModeGroup->addAction(m_ui.turnAction);
+ sceneModeGroup->addAction(m_ui.radiusAction);
+ m_ui.selectAction->setChecked(true);
+
+ m_ui.newWorldEditAction->setIcon(QIcon(Core::Constants::ICON_NEW));
+ m_ui.saveWorldEditAction->setIcon(QIcon(Core::Constants::ICON_SAVE));
+
m_primitivesModel = new PrimitivesTreeModel();
m_ui.treePrimitivesView->setModel(m_primitivesModel);
createMenus();
createToolBars();
readSettings();
+
+ connect(m_ui.newWorldEditAction, SIGNAL(triggered()), this, SLOT(newWorldEditFile()));
+ connect(m_ui.saveWorldEditAction, SIGNAL(triggered()), this, SLOT(saveAllWorldEditFiles()));
+
}
WorldEditorWindow::~WorldEditorWindow()
@@ -96,6 +113,14 @@ void WorldEditorWindow::loadPrimitive(const QString &fileName)
m_primitivesModel->loadPrimitive(fileName);
}
+void WorldEditorWindow::newWorldEditFile()
+{
+}
+
+void WorldEditorWindow::saveAllWorldEditFiles()
+{
+}
+
void WorldEditorWindow::openProjectSettings()
{
/*
@@ -119,8 +144,11 @@ void WorldEditorWindow::createToolBars()
Core::IMenuManager *menuManager = Core::ICore::instance()->menuManager();
//QAction *action = menuManager->action(Core::Constants::NEW);
//m_ui.fileToolBar->addAction(action);
+
+ m_ui.fileToolBar->addAction(m_ui.newWorldEditAction);
QAction *action = menuManager->action(Core::Constants::OPEN);
m_ui.fileToolBar->addAction(action);
+ m_ui.fileToolBar->addAction(m_ui.saveWorldEditAction);
m_ui.fileToolBar->addSeparator();
action = menuManager->action(Core::Constants::UNDO);
diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/world_editor/world_editor_window.h b/code/nel/tools/3d/object_viewer_qt/src/plugins/world_editor/world_editor_window.h
index 39e741716..1b2937dad 100644
--- a/code/nel/tools/3d/object_viewer_qt/src/plugins/world_editor/world_editor_window.h
+++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/world_editor/world_editor_window.h
@@ -43,6 +43,8 @@ public Q_SLOTS:
void open();
private Q_SLOTS:
+ void newWorldEditFile();
+ void saveAllWorldEditFiles();
void openProjectSettings();
private:
diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/world_editor/world_editor_window.ui b/code/nel/tools/3d/object_viewer_qt/src/plugins/world_editor/world_editor_window.ui
index 179a78830..331dc34ff 100644
--- a/code/nel/tools/3d/object_viewer_qt/src/plugins/world_editor/world_editor_window.ui
+++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/world_editor/world_editor_window.ui
@@ -45,10 +45,19 @@
false
-
-
+
+
+
+
+
+
+
+
+
+ Primitives
+
2
@@ -82,6 +91,23 @@
+
+
+ toolBar
+
+
+ TopToolBarArea
+
+
+ false
+
+
+
+
+
+
+
+
loadPrimitive
@@ -92,6 +118,162 @@
newPrimitive
+
+
+
+ :/icons/ic_nel_zonel.png:/icons/ic_nel_zonel.png
+
+
+ loadLand
+
+
+
+
+
+ :/icons/ic_nel_landscape_settings.png:/icons/ic_nel_landscape_settings.png
+
+
+ LandSettings
+
+
+
+
+ true
+
+
+ S/H Land
+
+
+
+
+ true
+
+
+ S/H Primitives
+
+
+
+
+ true
+
+
+ S/H Layers
+
+
+
+
+ true
+
+
+ S/H Details
+
+
+
+
+ true
+
+
+
+ :/icons/ic_grid.png:/icons/ic_grid.png
+
+
+ S/H Grid
+
+
+
+
+ true
+
+
+ S/H Grid points
+
+
+
+
+ New World Edit file
+
+
+
+
+ Save World Edit file
+
+
+
+
+ true
+
+
+
+ :/icons/ic_nel_select.png:/icons/ic_nel_select.png
+
+
+ Select
+
+
+
+
+ true
+
+
+
+ :/icons/ic_nel_move.png:/icons/ic_nel_move.png
+
+
+ Move
+
+
+
+
+ true
+
+
+
+ :/icons/ic_nel_rotate.png:/icons/ic_nel_rotate.png
+
+
+ Rotate
+
+
+
+
+ true
+
+
+
+ :/icons/ic_nel_scale.png:/icons/ic_nel_scale.png
+
+
+ Scale
+
+
+
+
+ true
+
+
+
+ :/icons/ic_nel_turn.png:/icons/ic_nel_turn.png
+
+
+ Turn
+
+
+
+
+ true
+
+
+ Radius
+
+
+
+
+ true
+
+
+ Edit points
+
+
@@ -107,6 +289,7 @@
+