diff options
| author | Ben Boeckel <MathStuf@gmail.com> | 2008-06-09 00:50:59 +0000 |
|---|---|---|
| committer | Ben Boeckel <MathStuf@gmail.com> | 2008-06-09 00:50:59 +0000 |
| commit | 60a2ed8ee8aa994c83d382af2ec477e171beb950 (patch) | |
| tree | 6fea6867adee00f22b9d775a6dce15ed875d75e6 /pokemodr/NatureUI.cpp | |
| parent | 0737b455ca94351c574aa1a8c83ea30c5b7bc443 (diff) | |
| download | sigen-60a2ed8ee8aa994c83d382af2ec477e171beb950.tar.gz sigen-60a2ed8ee8aa994c83d382af2ec477e171beb950.tar.xz sigen-60a2ed8ee8aa994c83d382af2ec477e171beb950.zip | |
[FIX] All modules now use their own namespace
git-svn-id: https://pokegen.svn.sourceforge.net/svnroot/pokegen/trunk@201 6ecfd1a5-f3ed-3746-8530-beee90d26b22
Diffstat (limited to 'pokemodr/NatureUI.cpp')
| -rw-r--r-- | pokemodr/NatureUI.cpp | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/pokemodr/NatureUI.cpp b/pokemodr/NatureUI.cpp index 7d1a2e88..67a0390c 100644 --- a/pokemodr/NatureUI.cpp +++ b/pokemodr/NatureUI.cpp @@ -23,62 +23,62 @@ #include "../pokemod/Pokemod.h" #include "../pokemod/Rules.h" -NatureUI::NatureUI(Nature* nature, QWidget* parent) : +Pokemodr::NatureUI::NatureUI(Pokemod::Nature* nature, QWidget* parent) : ObjectUI(parent) { setupUi(this); - setObjects(nature, new Nature(*nature)); + setObjects(nature, new Pokemod::Nature(*nature)); } -NatureUI::~NatureUI() +Pokemodr::NatureUI::~NatureUI() { } -void NatureUI::initGui() +void Pokemodr::NatureUI::initGui() { connect(varStat, SIGNAL(activated()), this, SLOT(setGui())); } -void NatureUI::refreshGui() +void Pokemodr::NatureUI::refreshGui() { varStat->clear(); const bool isSplit = pokemod()->rules()->specialSplit(); varStat->addItems((isSplit ? Pokemod::StatGSCStr : Pokemod::StatRBYStr).mid(0, isSplit ? Pokemod::ST_End_RBY : Pokemod::ST_End_GSC)); } -void NatureUI::setGui() +void Pokemodr::NatureUI::setGui() { - varName->setText(static_cast<Nature*>(modified())->name()); - varStatMultiplier->setValue(static_cast<Nature*>(modified())->stat(varStat->currentIndex())); - varWeight->setValue(static_cast<Nature*>(modified())->weight()); + varName->setText(static_cast<Pokemod::Nature*>(modified())->name()); + varStatMultiplier->setValue(static_cast<Pokemod::Nature*>(modified())->stat(varStat->currentIndex())); + varWeight->setValue(static_cast<Pokemod::Nature*>(modified())->weight()); } -void NatureUI::apply() +void Pokemodr::NatureUI::apply() { - *static_cast<Nature*>(original()) = *static_cast<Nature*>(modified()); + *static_cast<Pokemod::Nature*>(original()) = *static_cast<Pokemod::Nature*>(modified()); emit(changed(false)); } -void NatureUI::discard() +void Pokemodr::NatureUI::discard() { - *static_cast<Nature*>(modified()) = *static_cast<Nature*>(original()); + *static_cast<Pokemod::Nature*>(modified()) = *static_cast<Pokemod::Nature*>(original()); setGui(); emit(changed(false)); } -void NatureUI::on_varName_textChanged(const QString& name) +void Pokemodr::NatureUI::on_varName_textChanged(const QString& name) { const int cursor = varName->cursorPosition(); - static_cast<Nature*>(modified())->setName(name); + static_cast<Pokemod::Nature*>(modified())->setName(name); varName->setCursorPosition(cursor); } -void NatureUI::on_varStatMultiplier_valueChanged(const Fraction& statMultiplier) +void Pokemodr::NatureUI::on_varStatMultiplier_valueChanged(const Pokemod::Fraction& statMultiplier) { - static_cast<Nature*>(modified())->setStat(varStat->currentIndex(), statMultiplier); + static_cast<Pokemod::Nature*>(modified())->setStat(varStat->currentIndex(), statMultiplier); } -void NatureUI::on_varWeight_valueChanged(const int weight) +void Pokemodr::NatureUI::on_varWeight_valueChanged(const int weight) { - static_cast<Nature*>(modified())->setWeight(weight); + static_cast<Pokemod::Nature*>(modified())->setWeight(weight); } |
