From 0b4b89cf8efdc15e5a8d4b6cb24a5c8a025227d9 Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Sat, 6 Sep 2008 04:12:30 +0000 Subject: [FIX] Renamed everything (in use) away from Poké- prefixes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: https://pokegen.svn.sourceforge.net/svnroot/pokegen/trunk@250 6ecfd1a5-f3ed-3746-8530-beee90d26b22 --- sigmodr/MoveUI.cpp | 90 +++++++++++++++++++++++++++--------------------------- 1 file changed, 45 insertions(+), 45 deletions(-) (limited to 'sigmodr/MoveUI.cpp') diff --git a/sigmodr/MoveUI.cpp b/sigmodr/MoveUI.cpp index 59a6c6c7..9d1010c9 100644 --- a/sigmodr/MoveUI.cpp +++ b/sigmodr/MoveUI.cpp @@ -18,109 +18,109 @@ // Header include #include "MoveUI.h" -// Pokemod includes -#include "../pokemod/Move.h" -#include "../pokemod/Pokemod.h" -#include "../pokemod/Type.h" +// Sigmod includes +#include "../sigmod/Move.h" +#include "../sigmod/Sigmod.h" +#include "../sigmod/Type.h" -Pokemodr::MoveUI::MoveUI(Pokemod::Move* move, QWidget* parent) : +Sigmodr::MoveUI::MoveUI(Sigmod::Move* move, QWidget* parent) : ObjectUI(parent) { setupUi(this); - setObjects(move, new Pokemod::Move(*move)); + setObjects(move, new Sigmod::Move(*move)); } -Pokemodr::MoveUI::~MoveUI() +Sigmodr::MoveUI::~MoveUI() { } -void Pokemodr::MoveUI::refreshGui() +void Sigmodr::MoveUI::refreshGui() { varType->clear(); - for (int i = 0; i < pokemod()->typeCount(); ++i) + for (int i = 0; i < sigmod()->typeCount(); ++i) { - const Pokemod::Type* type = pokemod()->type(i); + const Sigmod::Type* type = sigmod()->type(i); varType->addItem(type->name(), type->id()); } } -void Pokemodr::MoveUI::setGui() +void Sigmodr::MoveUI::setGui() { - varName->setText(qobject_cast(modified())->name()); - varPriority->setValue(qobject_cast(modified())->priority()); - varAccuracy->setValue(qobject_cast(modified())->accuracy()); - varPower->setValue(qobject_cast(modified())->power()); - varType->setCurrentIndex(varType->findData(qobject_cast(modified())->type())); - varPowerPoints->setValue(qobject_cast(modified())->powerPoints()); - varSpecial->setChecked(qobject_cast(modified())->special() ? Qt::Checked : Qt::Unchecked); - varDescription->setText(qobject_cast(modified())->description()); - varBattleScript->setValue(qobject_cast(modified())->battleScript()); - varWorldScript->setValue(qobject_cast(modified())->worldScript()); + varName->setText(qobject_cast(modified())->name()); + varPriority->setValue(qobject_cast(modified())->priority()); + varAccuracy->setValue(qobject_cast(modified())->accuracy()); + varPower->setValue(qobject_cast(modified())->power()); + varType->setCurrentIndex(varType->findData(qobject_cast(modified())->type())); + varPowerPoints->setValue(qobject_cast(modified())->powerPoints()); + varSpecial->setChecked(qobject_cast(modified())->special() ? Qt::Checked : Qt::Unchecked); + varDescription->setText(qobject_cast(modified())->description()); + varBattleScript->setValue(qobject_cast(modified())->battleScript()); + varWorldScript->setValue(qobject_cast(modified())->worldScript()); } -void Pokemodr::MoveUI::apply() +void Sigmodr::MoveUI::apply() { - *qobject_cast(original()) = *qobject_cast(modified()); + *qobject_cast(original()) = *qobject_cast(modified()); emit(changed(false)); } -void Pokemodr::MoveUI::discard() +void Sigmodr::MoveUI::discard() { - *qobject_cast(modified()) = *qobject_cast(original()); + *qobject_cast(modified()) = *qobject_cast(original()); setGui(); emit(changed(false)); } -void Pokemodr::MoveUI::on_varName_textChanged(const QString& name) +void Sigmodr::MoveUI::on_varName_textChanged(const QString& name) { const int cursor = varName->cursorPosition(); - qobject_cast(modified())->setName(name); + qobject_cast(modified())->setName(name); varName->setCursorPosition(cursor); } -void Pokemodr::MoveUI::on_varPriority_valueChanged(const int priority) +void Sigmodr::MoveUI::on_varPriority_valueChanged(const int priority) { - qobject_cast(modified())->setPriority(priority); + qobject_cast(modified())->setPriority(priority); } -void Pokemodr::MoveUI::on_varAccuracy_valueChanged(const Pokemod::Fraction& accuracy) +void Sigmodr::MoveUI::on_varAccuracy_valueChanged(const Sigmod::Fraction& accuracy) { - qobject_cast(modified())->setAccuracy(accuracy); + qobject_cast(modified())->setAccuracy(accuracy); } -void Pokemodr::MoveUI::on_varPower_valueChanged(const int power) +void Sigmodr::MoveUI::on_varPower_valueChanged(const int power) { - qobject_cast(modified())->setPower(power); + qobject_cast(modified())->setPower(power); } -void Pokemodr::MoveUI::on_varType_activated(const int type) +void Sigmodr::MoveUI::on_varType_activated(const int type) { - qobject_cast(modified())->setType(varType->itemData(type).toInt()); + qobject_cast(modified())->setType(varType->itemData(type).toInt()); } -void Pokemodr::MoveUI::on_varPowerPoints_valueChanged(const int powerPoints) +void Sigmodr::MoveUI::on_varPowerPoints_valueChanged(const int powerPoints) { - qobject_cast(modified())->setPowerPoints(powerPoints); + qobject_cast(modified())->setPowerPoints(powerPoints); } -void Pokemodr::MoveUI::on_varSpecial_toggled(const bool special) +void Sigmodr::MoveUI::on_varSpecial_toggled(const bool special) { - qobject_cast(modified())->setSpecial(special); + qobject_cast(modified())->setSpecial(special); } -void Pokemodr::MoveUI::on_varDescription_textChanged(const QString& description) +void Sigmodr::MoveUI::on_varDescription_textChanged(const QString& description) { const int cursor = varDescription->cursorPosition(); - qobject_cast(modified())->setDescription(description); + qobject_cast(modified())->setDescription(description); varDescription->setCursorPosition(cursor); } -void Pokemodr::MoveUI::on_varBattleScript_valueChanged(const Pokemod::Script& battleScript) +void Sigmodr::MoveUI::on_varBattleScript_valueChanged(const Sigmod::Script& battleScript) { - qobject_cast(modified())->setBattleScript(battleScript); + qobject_cast(modified())->setBattleScript(battleScript); } -void Pokemodr::MoveUI::on_varWorldScript_valueChanged(const Pokemod::Script& worldScript) +void Sigmodr::MoveUI::on_varWorldScript_valueChanged(const Sigmod::Script& worldScript) { - qobject_cast(modified())->setWorldScript(worldScript); + qobject_cast(modified())->setWorldScript(worldScript); } -- cgit