summaryrefslogtreecommitdiffstats
path: root/sigmodr/BadgeUI.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'sigmodr/BadgeUI.cpp')
-rw-r--r--sigmodr/BadgeUI.cpp86
1 files changed, 43 insertions, 43 deletions
diff --git a/sigmodr/BadgeUI.cpp b/sigmodr/BadgeUI.cpp
index af7e033b..e6c02d04 100644
--- a/sigmodr/BadgeUI.cpp
+++ b/sigmodr/BadgeUI.cpp
@@ -18,101 +18,101 @@
// Header include
#include "BadgeUI.h"
-// Pokemod includes
-#include "../pokemod/Badge.h"
-#include "../pokemod/Pokemod.h"
-#include "../pokemod/Rules.h"
-#include "../pokemod/Sprite.h"
+// Sigmod includes
+#include "../sigmod/Badge.h"
+#include "../sigmod/Rules.h"
+#include "../sigmod/Sigmod.h"
+#include "../sigmod/Sprite.h"
-Pokemodr::BadgeUI::BadgeUI(Pokemod::Badge* badge, QWidget* parent) :
+Sigmodr::BadgeUI::BadgeUI(Sigmod::Badge* badge, QWidget* parent) :
ObjectUI(parent)
{
setupUi(this);
- setObjects(badge, new Pokemod::Badge(*badge));
+ setObjects(badge, new Sigmod::Badge(*badge));
}
-Pokemodr::BadgeUI::~BadgeUI()
+Sigmodr::BadgeUI::~BadgeUI()
{
}
-void Pokemodr::BadgeUI::initGui()
+void Sigmodr::BadgeUI::initGui()
{
connect(varStat, SIGNAL(activated(const int)), this, SLOT(setGui()));
}
-void Pokemodr::BadgeUI::refreshGui()
+void Sigmodr::BadgeUI::refreshGui()
{
- varObey->setMaximum(pokemod()->rules()->maxLevel());
+ varObey->setMaximum(sigmod()->rules()->maxLevel());
varFace->clear();
varBadge->clear();
- for (int i = 0; i < pokemod()->spriteCount(); ++i)
+ for (int i = 0; i < sigmod()->spriteCount(); ++i)
{
- const Pokemod::Sprite* sprite = pokemod()->sprite(i);
+ const Sigmod::Sprite* sprite = sigmod()->sprite(i);
varFace->addItem(QPixmap::fromImage(sprite->sprite()), sprite->name(), sprite->id());
varBadge->addItem(QPixmap::fromImage(sprite->sprite()), sprite->name(), sprite->id());
}
varStat->clear();
- const bool isSplit = pokemod()->rules()->specialSplit();
- const QStringList& statNames = (isSplit ? Pokemod::StatGSCStr : Pokemod::StatRBYStr);
- varStat->addItem(statNames[Pokemod::ST_Attack], QVariant::fromValue(Pokemod::ST_Attack));
- varStat->addItem(statNames[Pokemod::ST_Defense], QVariant::fromValue(Pokemod::ST_Defense));
- varStat->addItem(statNames[Pokemod::ST_Speed], QVariant::fromValue(Pokemod::ST_Speed));
+ const bool isSplit = sigmod()->rules()->specialSplit();
+ const QStringList& statNames = (isSplit ? Sigmod::StatGSCStr : Sigmod::StatRBYStr);
+ varStat->addItem(statNames[Sigmod::ST_Attack], QVariant::fromValue(Sigmod::ST_Attack));
+ varStat->addItem(statNames[Sigmod::ST_Defense], QVariant::fromValue(Sigmod::ST_Defense));
+ varStat->addItem(statNames[Sigmod::ST_Speed], QVariant::fromValue(Sigmod::ST_Speed));
if (isSplit)
{
- varStat->addItem(statNames[Pokemod::ST_SpecialAttack], QVariant::fromValue(Pokemod::ST_SpecialAttack));
- varStat->addItem(statNames[Pokemod::ST_SpecialDefense], QVariant::fromValue(Pokemod::ST_SpecialDefense));
+ varStat->addItem(statNames[Sigmod::ST_SpecialAttack], QVariant::fromValue(Sigmod::ST_SpecialAttack));
+ varStat->addItem(statNames[Sigmod::ST_SpecialDefense], QVariant::fromValue(Sigmod::ST_SpecialDefense));
}
else
- varStat->addItem(statNames[Pokemod::ST_Special], QVariant::fromValue(Pokemod::ST_Special));
+ varStat->addItem(statNames[Sigmod::ST_Special], QVariant::fromValue(Sigmod::ST_Special));
}
-void Pokemodr::BadgeUI::setGui()
+void Sigmodr::BadgeUI::setGui()
{
- varName->setText(qobject_cast<Pokemod::Badge*>(modified())->name());
- varObey->setValue(qobject_cast<Pokemod::Badge*>(modified())->obey());
- varFace->setCurrentIndex(varFace->findData(qobject_cast<Pokemod::Badge*>(modified())->face()));
- varBadge->setCurrentIndex(varBadge->findData(qobject_cast<Pokemod::Badge*>(modified())->badge()));
- Pokemod::Stat stat = varStat->itemData(varStat->currentIndex()).value<Pokemod::Stat>();
- Pokemod::Fraction multiplier = qobject_cast<Pokemod::Badge*>(modified())->stat(stat);
- varStatMultiplier->setValue(qobject_cast<Pokemod::Badge*>(modified())->stat(varStat->itemData(varStat->currentIndex()).value<Pokemod::Stat>()));
+ varName->setText(qobject_cast<Sigmod::Badge*>(modified())->name());
+ varObey->setValue(qobject_cast<Sigmod::Badge*>(modified())->obey());
+ varFace->setCurrentIndex(varFace->findData(qobject_cast<Sigmod::Badge*>(modified())->face()));
+ varBadge->setCurrentIndex(varBadge->findData(qobject_cast<Sigmod::Badge*>(modified())->badge()));
+ Sigmod::Stat stat = varStat->itemData(varStat->currentIndex()).value<Sigmod::Stat>();
+ Sigmod::Fraction multiplier = qobject_cast<Sigmod::Badge*>(modified())->stat(stat);
+ varStatMultiplier->setValue(qobject_cast<Sigmod::Badge*>(modified())->stat(varStat->itemData(varStat->currentIndex()).value<Sigmod::Stat>()));
}
-void Pokemodr::BadgeUI::apply()
+void Sigmodr::BadgeUI::apply()
{
- *qobject_cast<Pokemod::Badge*>(original()) = *qobject_cast<Pokemod::Badge*>(modified());
+ *qobject_cast<Sigmod::Badge*>(original()) = *qobject_cast<Sigmod::Badge*>(modified());
emit(changed(false));
}
-void Pokemodr::BadgeUI::discard()
+void Sigmodr::BadgeUI::discard()
{
- *qobject_cast<Pokemod::Badge*>(modified()) = *qobject_cast<Pokemod::Badge*>(original());
+ *qobject_cast<Sigmod::Badge*>(modified()) = *qobject_cast<Sigmod::Badge*>(original());
setGui();
emit(changed(false));
}
-void Pokemodr::BadgeUI::on_varName_textChanged(const QString& name)
+void Sigmodr::BadgeUI::on_varName_textChanged(const QString& name)
{
const int cursor = varName->cursorPosition();
- qobject_cast<Pokemod::Badge*>(modified())->setName(name);
+ qobject_cast<Sigmod::Badge*>(modified())->setName(name);
varName->setCursorPosition(cursor);
}
-void Pokemodr::BadgeUI::on_varObey_valueChanged(const int obey)
+void Sigmodr::BadgeUI::on_varObey_valueChanged(const int obey)
{
- qobject_cast<Pokemod::Badge*>(modified())->setObey(obey);
+ qobject_cast<Sigmod::Badge*>(modified())->setObey(obey);
}
-void Pokemodr::BadgeUI::on_varFace_currentIndexChanged(const int face)
+void Sigmodr::BadgeUI::on_varFace_currentIndexChanged(const int face)
{
- qobject_cast<Pokemod::Badge*>(modified())->setFace(varFace->itemData(face).toInt());
+ qobject_cast<Sigmod::Badge*>(modified())->setFace(varFace->itemData(face).toInt());
}
-void Pokemodr::BadgeUI::on_varBadge_currentIndexChanged(const int badge)
+void Sigmodr::BadgeUI::on_varBadge_currentIndexChanged(const int badge)
{
- qobject_cast<Pokemod::Badge*>(modified())->setBadge(varFace->itemData(badge).toInt());
+ qobject_cast<Sigmod::Badge*>(modified())->setBadge(varFace->itemData(badge).toInt());
}
-void Pokemodr::BadgeUI::on_varStatMultiplier_valueChanged(const Pokemod::Fraction& multiplier)
+void Sigmodr::BadgeUI::on_varStatMultiplier_valueChanged(const Sigmod::Fraction& multiplier)
{
- qobject_cast<Pokemod::Badge*>(modified())->setStat(varStat->itemData(varStat->currentIndex()).value<Pokemod::Stat>(), multiplier);
+ qobject_cast<Sigmod::Badge*>(modified())->setStat(varStat->itemData(varStat->currentIndex()).value<Sigmod::Stat>(), multiplier);
}