summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBen Boeckel <MathStuf@gmail.com>2009-04-02 02:48:29 -0400
committerBen Boeckel <MathStuf@gmail.com>2009-04-02 02:48:29 -0400
commitbfa661013ada083d2999e06fd3c56a80afa687e6 (patch)
tree78114c615179eb55b6b283680da3de9058c8a776
parent0e53a2121587feaa78c7e1ecaeb5d5ea0501c129 (diff)
Connect up the editor
-rw-r--r--sigmodr/widgets/CMakeLists.txt3
-rw-r--r--sigmodr/widgets/GameUI.cpp7
2 files changed, 10 insertions, 0 deletions
diff --git a/sigmodr/widgets/CMakeLists.txt b/sigmodr/widgets/CMakeLists.txt
index e04e16f7..7c86a538 100644
--- a/sigmodr/widgets/CMakeLists.txt
+++ b/sigmodr/widgets/CMakeLists.txt
@@ -85,6 +85,9 @@ set(sigmodrwidgets_SRCS
mapeditor/TileItem.cpp
mapeditor/TrainerItem.cpp
mapeditor/WarpItem.cpp
+ mapeditor/WorldMapEditor.cpp
+ mapeditor/WorldMapItem.cpp
+ mapeditor/WorldMapScene.cpp
)
kde4_add_library(sigmodrwidgets
diff --git a/sigmodr/widgets/GameUI.cpp b/sigmodr/widgets/GameUI.cpp
index 45af24d3..4bbcf950 100644
--- a/sigmodr/widgets/GameUI.cpp
+++ b/sigmodr/widgets/GameUI.cpp
@@ -21,6 +21,7 @@
// Sigmodr widget includes
#include "TypechartModel.h"
+#include "mapeditor/WorldMapEditor.h"
// Sigmodr core widget includes
#include <sigmodr/corewidgets/FractionWidget.h>
@@ -37,6 +38,7 @@
// Qt includes
#include <QtGui/QCheckBox>
+#include <QtGui/QGridLayout>
#include <QtGui/QLabel>
#include <QtGui/QTableView>
@@ -87,6 +89,10 @@ QWidget* GameUI::Private::makeWidgets(ObjectUI* widget)
ui_typechart = form->findChild<QTableView*>("varTypechart");
ui_labelTypes = form->findChild<QLabel*>("labelTypes");
ui_effectiveness = form->findChild<FractionWidget*>("varEffectiveness");
+ QGridLayout* layout = form->findChild<QGridLayout*>("worldMapLayout");
+ ui_worldMapEditor = new WorldMapEditor(m_game, widget);
+ layout->addWidget(ui_worldMapEditor, 0, 0);
+ widget->setTabOrder(ui_effectiveness, ui_worldMapEditor);
connect(ui_title, SIGNAL(textChanged(QString)), this, SLOT(titleChanged(QString)));
connect(ui_version, SIGNAL(textChanged(QString)), this, SLOT(versionChanged(QString)));
connect(ui_description, SIGNAL(textChanged(QString)), this, SLOT(descriptionChanged(QString)));
@@ -116,6 +122,7 @@ void GameUI::Private::resetGui()
ui_description->setText(m_game->description());
ui_singlePlayer->setCheckState(m_game->singlePlayer() ? Qt::Checked : Qt::Unchecked);
ui_startScript->setValue(m_game->startScript());
+ ui_worldMapEditor->setGame(m_game);
}
void GameUI::Private::titleChanged(const QString& title)