summaryrefslogtreecommitdiffstats
path: root/sigmodr/MapWarpUI.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'sigmodr/MapWarpUI.cpp')
-rw-r--r--sigmodr/MapWarpUI.cpp86
1 files changed, 43 insertions, 43 deletions
diff --git a/sigmodr/MapWarpUI.cpp b/sigmodr/MapWarpUI.cpp
index 1b4c5798..54b857fb 100644
--- a/sigmodr/MapWarpUI.cpp
+++ b/sigmodr/MapWarpUI.cpp
@@ -18,108 +18,108 @@
// Header include
#include "MapWarpUI.h"
-// Pokemod includes
-#include "../pokemod/Map.h"
-#include "../pokemod/MapWarp.h"
-#include "../pokemod/Pokemod.h"
+// Sigmod includes
+#include "../sigmod/Map.h"
+#include "../sigmod/MapWarp.h"
+#include "../sigmod/Sigmod.h"
-Pokemodr::MapWarpUI::MapWarpUI(Pokemod::MapWarp* warp, QWidget* parent) :
+Sigmodr::MapWarpUI::MapWarpUI(Sigmod::MapWarp* warp, QWidget* parent) :
ObjectUI(parent),
m_lastMap(-1)
{
setupUi(this);
- setObjects(warp, new Pokemod::MapWarp(*warp));
+ setObjects(warp, new Sigmod::MapWarp(*warp));
}
-Pokemodr::MapWarpUI::~MapWarpUI()
+Sigmodr::MapWarpUI::~MapWarpUI()
{
}
-void Pokemodr::MapWarpUI::initGui()
+void Sigmodr::MapWarpUI::initGui()
{
- varType->addItem(Pokemod::MapWarp::TypeStr[Pokemod::MapWarp::Door], QVariant::fromValue(Pokemod::MapWarp::Door));
- varType->addItem(Pokemod::MapWarp::TypeStr[Pokemod::MapWarp::Warp], QVariant::fromValue(Pokemod::MapWarp::Warp));
- varType->addItem(Pokemod::MapWarp::TypeStr[Pokemod::MapWarp::Hole], QVariant::fromValue(Pokemod::MapWarp::Hole));
- varType->addItem(Pokemod::MapWarp::TypeStr[Pokemod::MapWarp::Boundary], QVariant::fromValue(Pokemod::MapWarp::Boundary));
+ varType->addItem(Sigmod::MapWarp::TypeStr[Sigmod::MapWarp::Door], QVariant::fromValue(Sigmod::MapWarp::Door));
+ varType->addItem(Sigmod::MapWarp::TypeStr[Sigmod::MapWarp::Warp], QVariant::fromValue(Sigmod::MapWarp::Warp));
+ varType->addItem(Sigmod::MapWarp::TypeStr[Sigmod::MapWarp::Hole], QVariant::fromValue(Sigmod::MapWarp::Hole));
+ varType->addItem(Sigmod::MapWarp::TypeStr[Sigmod::MapWarp::Boundary], QVariant::fromValue(Sigmod::MapWarp::Boundary));
}
-void Pokemodr::MapWarpUI::refreshGui()
+void Sigmodr::MapWarpUI::refreshGui()
{
- varCoordinate->setMaximum(qobject_cast<const Pokemod::Map*>(original()->parent())->size());
+ varCoordinate->setMaximum(qobject_cast<const Sigmod::Map*>(original()->parent())->size());
varToMap->clear();
- for (int i = 0; i < pokemod()->mapCount(); ++i)
+ for (int i = 0; i < sigmod()->mapCount(); ++i)
{
- const Pokemod::Map* map = pokemod()->map(i);
+ const Sigmod::Map* map = sigmod()->map(i);
varToMap->addItem(map->name(), map->id());
}
}
-void Pokemodr::MapWarpUI::setGui()
+void Sigmodr::MapWarpUI::setGui()
{
- const bool resetWarps = (qobject_cast<Pokemod::MapWarp*>(modified())->toMap() != m_lastMap);
- varName->setText(qobject_cast<Pokemod::MapWarp*>(modified())->name());
- varCoordinate->setValue(qobject_cast<Pokemod::MapWarp*>(modified())->coordinate());
- varType->setCurrentIndex(qobject_cast<Pokemod::MapWarp*>(modified())->type());
- varToMap->setCurrentIndex(varToMap->findData(qobject_cast<Pokemod::MapWarp*>(modified())->toMap()));
- m_lastMap = qobject_cast<Pokemod::MapWarp*>(modified())->toMap();
+ const bool resetWarps = (qobject_cast<Sigmod::MapWarp*>(modified())->toMap() != m_lastMap);
+ varName->setText(qobject_cast<Sigmod::MapWarp*>(modified())->name());
+ varCoordinate->setValue(qobject_cast<Sigmod::MapWarp*>(modified())->coordinate());
+ varType->setCurrentIndex(qobject_cast<Sigmod::MapWarp*>(modified())->type());
+ varToMap->setCurrentIndex(varToMap->findData(qobject_cast<Sigmod::MapWarp*>(modified())->toMap()));
+ m_lastMap = qobject_cast<Sigmod::MapWarp*>(modified())->toMap();
if (resetWarps)
{
varToWarp->clear();
- const Pokemod::Map* map = pokemod()->mapById(qobject_cast<Pokemod::MapWarp*>(modified())->toMap());
+ const Sigmod::Map* map = sigmod()->mapById(qobject_cast<Sigmod::MapWarp*>(modified())->toMap());
if (map)
{
for (int i = 0; i < map->warpCount(); ++i)
{
- const Pokemod::MapWarp* warp = map->warp(i);
+ const Sigmod::MapWarp* warp = map->warp(i);
varToWarp->addItem(warp->name(), warp->id());
}
}
}
- varToWarp->setCurrentIndex(varToMap->findData(qobject_cast<Pokemod::MapWarp*>(modified())->toWarp()));
- varScript->setValue(qobject_cast<Pokemod::MapWarp*>(modified())->script());
+ varToWarp->setCurrentIndex(varToMap->findData(qobject_cast<Sigmod::MapWarp*>(modified())->toWarp()));
+ varScript->setValue(qobject_cast<Sigmod::MapWarp*>(modified())->script());
}
-void Pokemodr::MapWarpUI::apply()
+void Sigmodr::MapWarpUI::apply()
{
- *qobject_cast<Pokemod::MapWarp*>(original()) = *qobject_cast<Pokemod::MapWarp*>(modified());
+ *qobject_cast<Sigmod::MapWarp*>(original()) = *qobject_cast<Sigmod::MapWarp*>(modified());
emit(changed(false));
}
-void Pokemodr::MapWarpUI::discard()
+void Sigmodr::MapWarpUI::discard()
{
- *qobject_cast<Pokemod::MapWarp*>(modified()) = *qobject_cast<Pokemod::MapWarp*>(original());
+ *qobject_cast<Sigmod::MapWarp*>(modified()) = *qobject_cast<Sigmod::MapWarp*>(original());
setGui();
emit(changed(false));
}
-void Pokemodr::MapWarpUI::on_varName_textChanged(const QString& name)
+void Sigmodr::MapWarpUI::on_varName_textChanged(const QString& name)
{
const int cursor = varName->cursorPosition();
- qobject_cast<Pokemod::MapWarp*>(modified())->setName(name);
+ qobject_cast<Sigmod::MapWarp*>(modified())->setName(name);
varName->setCursorPosition(cursor);
}
-void Pokemodr::MapWarpUI::on_varCoordinate_valueChanged(const QPoint& coordinate)
+void Sigmodr::MapWarpUI::on_varCoordinate_valueChanged(const QPoint& coordinate)
{
- qobject_cast<Pokemod::MapWarp*>(modified())->setCoordinate(coordinate);
+ qobject_cast<Sigmod::MapWarp*>(modified())->setCoordinate(coordinate);
}
-void Pokemodr::MapWarpUI::on_varType_activated(const int type)
+void Sigmodr::MapWarpUI::on_varType_activated(const int type)
{
- qobject_cast<Pokemod::MapWarp*>(modified())->setType(varType->itemData(type).value<Pokemod::MapWarp::Type>());
+ qobject_cast<Sigmod::MapWarp*>(modified())->setType(varType->itemData(type).value<Sigmod::MapWarp::Type>());
}
-void Pokemodr::MapWarpUI::on_varToMap_activated(const int toMap)
+void Sigmodr::MapWarpUI::on_varToMap_activated(const int toMap)
{
- qobject_cast<Pokemod::MapWarp*>(modified())->setToMap(toMap);
+ qobject_cast<Sigmod::MapWarp*>(modified())->setToMap(toMap);
}
-void Pokemodr::MapWarpUI::on_varToWarp_activated(const int toWarp)
+void Sigmodr::MapWarpUI::on_varToWarp_activated(const int toWarp)
{
- qobject_cast<Pokemod::MapWarp*>(modified())->setToWarp(toWarp);
+ qobject_cast<Sigmod::MapWarp*>(modified())->setToWarp(toWarp);
}
-void Pokemodr::MapWarpUI::on_varScript_valueChanged(const Pokemod::Script& script)
+void Sigmodr::MapWarpUI::on_varScript_valueChanged(const Sigmod::Script& script)
{
- qobject_cast<Pokemod::MapWarp*>(modified())->setScript(script);
+ qobject_cast<Sigmod::MapWarp*>(modified())->setScript(script);
}