diff options
Diffstat (limited to 'pokemod/Store.cpp')
| -rw-r--r-- | pokemod/Store.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/pokemod/Store.cpp b/pokemod/Store.cpp index 10c40dbd..4fb10abe 100644 --- a/pokemod/Store.cpp +++ b/pokemod/Store.cpp @@ -21,31 +21,31 @@ // Pokemod includes #include "Pokemod.h" -Store::Store(const Store& store) : +Pokemod::Store::Store(const Store& store) : Object("Store", store.parent(), store.id()) { *this = store; } -Store::Store(const Pokemod* parent, const int id) : +Pokemod::Store::Store(const Pokemod* parent, const int id) : Object("Store", parent, id), m_name("") { } -Store::Store(const Store& store, const Pokemod* parent, const int id) : +Pokemod::Store::Store(const Store& store, const Pokemod* parent, const int id) : Object("Store", parent, id) { *this = store; } -Store::Store(const QDomElement& xml, const Pokemod* parent, const int id) : +Pokemod::Store::Store(const QDomElement& xml, const Pokemod* parent, const int id) : Object("Store", parent, id) { load(xml, id); } -void Store::validate() +void Pokemod::Store::validate() { if (m_name.isEmpty()) emit(error("Name is empty")); @@ -57,25 +57,25 @@ void Store::validate() emit(error("No items in the store")); } -void Store::load(const QDomElement& xml, int id) +void Pokemod::Store::load(const QDomElement& xml, int id) { LOAD_ID(); LOAD_LIST(int, item); } -QDomElement Store::save() const +QDomElement Pokemod::Store::save() const { SAVE_CREATE(); SAVE_LIST(int, item); return xml; } -void Store::setName(const QString& name) +void Pokemod::Store::setName(const QString& name) { CHECK(name); } -void Store::setItem(const int item, const bool state) +void Pokemod::Store::setItem(const int item, const bool state) { if (static_cast<const Pokemod*>(pokemod())->itemIndex(item) == INT_MAX) { @@ -94,17 +94,17 @@ void Store::setItem(const int item, const bool state) } } -QString Store::name() const +QString Pokemod::Store::name() const { return m_name; } -bool Store::item(const int item) const +bool Pokemod::Store::item(const int item) const { return m_item.contains(item); } -Store& Store::operator=(const Store& rhs) +Pokemod::Store& Pokemod::Store::operator=(const Store& rhs) { if (this == &rhs) return *this; |
