diff options
Diffstat (limited to 'sigmod/CoinListItem.cpp')
-rw-r--r-- | sigmod/CoinListItem.cpp | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/sigmod/CoinListItem.cpp b/sigmod/CoinListItem.cpp index d9b50228..16c68067 100644 --- a/sigmod/CoinListItem.cpp +++ b/sigmod/CoinListItem.cpp @@ -27,15 +27,17 @@ #include "Macros.h" #include "Sigmod.h" -const QStringList Sigmod::CoinListItem::TypeStr = QStringList() << "Item" << "Team Member"; +using namespace Sigmod; -Sigmod::CoinListItem::CoinListItem(const CoinListItem& item) : +const QStringList CoinListItem::TypeStr = QStringList() << "Item" << "Team Member"; + +CoinListItem::CoinListItem(const CoinListItem& item) : Object(item.parent(), item.id()) { *this = item; } -Sigmod::CoinListItem::CoinListItem(const CoinList* parent, const int id) : +CoinListItem::CoinListItem(const CoinList* parent, const int id) : Object(parent, id), m_type(Item), m_object(-1), @@ -43,20 +45,20 @@ Sigmod::CoinListItem::CoinListItem(const CoinList* parent, const int id) : { } -Sigmod::CoinListItem::CoinListItem(const CoinListItem& item, const CoinList* parent, const int id) : +CoinListItem::CoinListItem(const CoinListItem& item, const CoinList* parent, const int id) : Object(parent, id) { *this = item; } -Sigmod::CoinListItem::CoinListItem(const QDomElement& xml, const CoinList* parent, const int id) : +CoinListItem::CoinListItem(const QDomElement& xml, const CoinList* parent, const int id) : Object(parent, id) { LOAD_ID(); load(xml); } -void Sigmod::CoinListItem::validate() +void CoinListItem::validate() { TEST_BEGIN(); TEST(object); @@ -64,7 +66,7 @@ void Sigmod::CoinListItem::validate() TEST_END(); } -void Sigmod::CoinListItem::load(const QDomElement& xml) +void CoinListItem::load(const QDomElement& xml) { LOAD_BEGIN(); LOAD_ENUM(type, Type); @@ -72,7 +74,7 @@ void Sigmod::CoinListItem::load(const QDomElement& xml) LOAD(cost); } -QDomElement Sigmod::CoinListItem::save() const +QDomElement CoinListItem::save() const { SAVE_CREATE(); SAVE_ENUM(type, Type); @@ -85,7 +87,7 @@ SETTER(CoinListItem, Type, Type, type) SETTER(CoinListItem, int, Object, object) SETTER(CoinListItem, int, Cost, cost) -GETTER(CoinListItem, Sigmod::CoinListItem::Type, type) +GETTER(CoinListItem, CoinListItem::Type, type) GETTER(CoinListItem, int, object) GETTER(CoinListItem, int, cost) @@ -103,7 +105,7 @@ CHECK_BEGIN(CoinListItem, int, object) CHECK_END() CHECK_BOUNDS(CoinListItem, int, cost, 1, INT_MAX) -Sigmod::CoinListItem& Sigmod::CoinListItem::operator=(const CoinListItem& rhs) +CoinListItem& CoinListItem::operator=(const CoinListItem& rhs) { if (this == &rhs) return *this; |