diff options
| author | Ben Boeckel <MathStuf@gmail.com> | 2008-09-06 04:12:30 +0000 |
|---|---|---|
| committer | Ben Boeckel <MathStuf@gmail.com> | 2008-09-06 04:12:30 +0000 |
| commit | 0b4b89cf8efdc15e5a8d4b6cb24a5c8a025227d9 (patch) | |
| tree | a2031b9d0016fcbd49a51c0d1a2292d1f2d8b566 /sigmodr/ItemUI.cpp | |
| parent | b81f5bffa2772eb9bd3c67fb35485ab1ee2d96e7 (diff) | |
| download | sigen-0b4b89cf8efdc15e5a8d4b6cb24a5c8a025227d9.tar.gz sigen-0b4b89cf8efdc15e5a8d4b6cb24a5c8a025227d9.tar.xz sigen-0b4b89cf8efdc15e5a8d4b6cb24a5c8a025227d9.zip | |
[FIX] Renamed everything (in use) away from Poké- prefixes
git-svn-id: https://pokegen.svn.sourceforge.net/svnroot/pokegen/trunk@250 6ecfd1a5-f3ed-3746-8530-beee90d26b22
Diffstat (limited to 'sigmodr/ItemUI.cpp')
| -rw-r--r-- | sigmodr/ItemUI.cpp | 70 |
1 files changed, 35 insertions, 35 deletions
diff --git a/sigmodr/ItemUI.cpp b/sigmodr/ItemUI.cpp index 70fb20a4..41207c14 100644 --- a/sigmodr/ItemUI.cpp +++ b/sigmodr/ItemUI.cpp @@ -18,85 +18,85 @@ // Header include #include "ItemUI.h" -// Pokemod includes -#include "../pokemod/Item.h" -#include "../pokemod/ItemType.h" -#include "../pokemod/Pokemod.h" -#include "../pokemod/Rules.h" +// Sigmod includes +#include "../sigmod/Item.h" +#include "../sigmod/ItemType.h" +#include "../sigmod/Rules.h" +#include "../sigmod/Sigmod.h" -Pokemodr::ItemUI::ItemUI(Pokemod::Item* item, QWidget* parent) : +Sigmodr::ItemUI::ItemUI(Sigmod::Item* item, QWidget* parent) : ObjectUI(parent) { setupUi(this); - setObjects(item, new Pokemod::Item(*item)); + setObjects(item, new Sigmod::Item(*item)); } -Pokemodr::ItemUI::~ItemUI() +Sigmodr::ItemUI::~ItemUI() { } -void Pokemodr::ItemUI::refreshGui() +void Sigmodr::ItemUI::refreshGui() { varType->clear(); - for (int i = 0; i < pokemod()->itemTypeCount(); ++i) + for (int i = 0; i < sigmod()->itemTypeCount(); ++i) { - const Pokemod::ItemType* itemType = pokemod()->itemType(i); + const Sigmod::ItemType* itemType = sigmod()->itemType(i); varType->addItem(itemType->name(), itemType->id()); } - varPrice->setMaximum(pokemod()->rules()->maxMoney()); + varPrice->setMaximum(sigmod()->rules()->maxMoney()); } -void Pokemodr::ItemUI::setGui() +void Sigmodr::ItemUI::setGui() { - varName->setText(qobject_cast<Pokemod::Item*>(modified())->name()); - boxSellable->setChecked(qobject_cast<Pokemod::Item*>(modified())->sellable() ? Qt::Checked : Qt::Unchecked); - varType->setCurrentIndex(varType->findData(qobject_cast<Pokemod::Item*>(modified())->type())); - varPrice->setValue(qobject_cast<Pokemod::Item*>(modified())->price()); - varDescription->setText(qobject_cast<Pokemod::Item*>(modified())->description()); - varScript->setValue(qobject_cast<Pokemod::Item*>(modified())->script()); + varName->setText(qobject_cast<Sigmod::Item*>(modified())->name()); + boxSellable->setChecked(qobject_cast<Sigmod::Item*>(modified())->sellable() ? Qt::Checked : Qt::Unchecked); + varType->setCurrentIndex(varType->findData(qobject_cast<Sigmod::Item*>(modified())->type())); + varPrice->setValue(qobject_cast<Sigmod::Item*>(modified())->price()); + varDescription->setText(qobject_cast<Sigmod::Item*>(modified())->description()); + varScript->setValue(qobject_cast<Sigmod::Item*>(modified())->script()); } -void Pokemodr::ItemUI::apply() +void Sigmodr::ItemUI::apply() { - *qobject_cast<Pokemod::Item*>(original()) = *qobject_cast<Pokemod::Item*>(modified()); + *qobject_cast<Sigmod::Item*>(original()) = *qobject_cast<Sigmod::Item*>(modified()); emit(changed(false)); } -void Pokemodr::ItemUI::discard() +void Sigmodr::ItemUI::discard() { - *qobject_cast<Pokemod::Item*>(modified()) = *qobject_cast<Pokemod::Item*>(original()); + *qobject_cast<Sigmod::Item*>(modified()) = *qobject_cast<Sigmod::Item*>(original()); setGui(); emit(changed(false)); } -void Pokemodr::ItemUI::on_varName_textChanged(const QString& name) +void Sigmodr::ItemUI::on_varName_textChanged(const QString& name) { const int cursor = varName->cursorPosition(); - qobject_cast<Pokemod::Item*>(modified())->setName(name); + qobject_cast<Sigmod::Item*>(modified())->setName(name); varName->setCursorPosition(cursor); } -void Pokemodr::ItemUI::on_boxSellable_toggled(const bool sellable) +void Sigmodr::ItemUI::on_boxSellable_toggled(const bool sellable) { - qobject_cast<Pokemod::Item*>(modified())->setSellable(sellable); + qobject_cast<Sigmod::Item*>(modified())->setSellable(sellable); } -void Pokemodr::ItemUI::on_varType_activated(const int type) +void Sigmodr::ItemUI::on_varType_activated(const int type) { - qobject_cast<Pokemod::Item*>(modified())->setType(varType->itemData(type).toInt()); + qobject_cast<Sigmod::Item*>(modified())->setType(varType->itemData(type).toInt()); } -void Pokemodr::ItemUI::on_varPrice_valueChanged(const int price) +void Sigmodr::ItemUI::on_varPrice_valueChanged(const int price) { - qobject_cast<Pokemod::Item*>(modified())->setPrice(price); + qobject_cast<Sigmod::Item*>(modified())->setPrice(price); } -void Pokemodr::ItemUI::on_varDescription_textChanged(const QString& description) +void Sigmodr::ItemUI::on_varDescription_textChanged(const QString& description) { - qobject_cast<Pokemod::Item*>(modified())->setDescription(description); + qobject_cast<Sigmod::Item*>(modified())->setDescription(description); } -void Pokemodr::ItemUI::on_varScript_valueChanged(const Pokemod::Script& script) +void Sigmodr::ItemUI::on_varScript_valueChanged(const Sigmod::Script& script) { - qobject_cast<Pokemod::Item*>(modified())->setScript(script); + qobject_cast<Sigmod::Item*>(modified())->setScript(script); } |
