diff options
Diffstat (limited to 'sigmodr/StoreUI.cpp')
| -rw-r--r-- | sigmodr/StoreUI.cpp | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/sigmodr/StoreUI.cpp b/sigmodr/StoreUI.cpp index 38eb9883..28132186 100644 --- a/sigmodr/StoreUI.cpp +++ b/sigmodr/StoreUI.cpp @@ -18,64 +18,64 @@ // Header include #include "StoreUI.h" -// Pokemod includes -#include "../pokemod/Item.h" -#include "../pokemod/Pokemod.h" -#include "../pokemod/Store.h" +// Sigmod includes +#include "../sigmod/Item.h" +#include "../sigmod/Sigmod.h" +#include "../sigmod/Store.h" -Pokemodr::StoreUI::StoreUI(Pokemod::Store* store, QWidget* parent) : +Sigmodr::StoreUI::StoreUI(Sigmod::Store* store, QWidget* parent) : ObjectUI(parent) { setupUi(this); - setObjects(store, new Pokemod::Store(*store)); + setObjects(store, new Sigmod::Store(*store)); } -Pokemodr::StoreUI::~StoreUI() +Sigmodr::StoreUI::~StoreUI() { } -void Pokemodr::StoreUI::refreshGui() +void Sigmodr::StoreUI::refreshGui() { varItems->clear(); - for (int i = 0; i < pokemod()->itemCount(); ++i) + for (int i = 0; i < sigmod()->itemCount(); ++i) { - const Pokemod::Item* item = pokemod()->item(i); + const Sigmod::Item* item = sigmod()->item(i); QListWidgetItem* widgetItem = new QListWidgetItem(item->name(), varItems); widgetItem->setData(Qt::UserRole, item->id()); } } -void Pokemodr::StoreUI::setGui() +void Sigmodr::StoreUI::setGui() { - varName->setText(qobject_cast<Pokemod::Store*>(modified())->name()); + varName->setText(qobject_cast<Sigmod::Store*>(modified())->name()); for (int i = 0; i < varItems->count(); ++i) { QListWidgetItem* widgetItem = varItems->item(i); - widgetItem->setSelected(qobject_cast<Pokemod::Store*>(modified())->item(widgetItem->data(Qt::UserRole).toInt())); + widgetItem->setSelected(qobject_cast<Sigmod::Store*>(modified())->item(widgetItem->data(Qt::UserRole).toInt())); } } -void Pokemodr::StoreUI::apply() +void Sigmodr::StoreUI::apply() { - *qobject_cast<Pokemod::Store*>(original()) = *qobject_cast<Pokemod::Store*>(modified()); + *qobject_cast<Sigmod::Store*>(original()) = *qobject_cast<Sigmod::Store*>(modified()); emit(changed(false)); } -void Pokemodr::StoreUI::discard() +void Sigmodr::StoreUI::discard() { - *qobject_cast<Pokemod::Store*>(modified()) = *qobject_cast<Pokemod::Store*>(original()); + *qobject_cast<Sigmod::Store*>(modified()) = *qobject_cast<Sigmod::Store*>(original()); setGui(); emit(changed(false)); } -void Pokemodr::StoreUI::on_varName_textChanged(const QString& name) +void Sigmodr::StoreUI::on_varName_textChanged(const QString& name) { const int cursor = varName->cursorPosition(); - qobject_cast<Pokemod::Store*>(modified())->setName(name); + qobject_cast<Sigmod::Store*>(modified())->setName(name); varName->setCursorPosition(cursor); } -void Pokemodr::StoreUI::on_varItems_itemClicked(QListWidgetItem* item) +void Sigmodr::StoreUI::on_varItems_itemClicked(QListWidgetItem* item) { - qobject_cast<Pokemod::Store*>(modified())->setItem(item->data(Qt::UserRole).toInt(), item->isSelected()); + qobject_cast<Sigmod::Store*>(modified())->setItem(item->data(Qt::UserRole).toInt(), item->isSelected()); } |
