diff options
| author | Ben Boeckel <MathStuf@gmail.com> | 2009-02-24 12:56:24 -0500 |
|---|---|---|
| committer | Ben Boeckel <MathStuf@gmail.com> | 2009-02-24 12:56:24 -0500 |
| commit | 97fac7d7b30058574dc15d7c18382f104bafd833 (patch) | |
| tree | 2e7f5e612c34c82a70f454069a2e9868ca261b7d /sigmod/Sound.cpp | |
| parent | 21a57c920ffd9038053650a403fc6271a0d4e243 (diff) | |
| download | sigen-97fac7d7b30058574dc15d7c18382f104bafd833.tar.gz sigen-97fac7d7b30058574dc15d7c18382f104bafd833.tar.xz sigen-97fac7d7b30058574dc15d7c18382f104bafd833.zip | |
Add using namespace Sigmod and Sigcore to sigmod sources for cleaner code
Diffstat (limited to 'sigmod/Sound.cpp')
| -rw-r--r-- | sigmod/Sound.cpp | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/sigmod/Sound.cpp b/sigmod/Sound.cpp index 32a66994..c0f62820 100644 --- a/sigmod/Sound.cpp +++ b/sigmod/Sound.cpp @@ -26,15 +26,17 @@ #include "Macros.h" #include "Sigmod.h" -const QStringList Sigmod::Sound::TypeStr = QStringList() << "Sound Effect" << "Music"; +using namespace Sigmod; -Sigmod::Sound::Sound(const Sound& sound) : +const QStringList Sound::TypeStr = QStringList() << "Sound Effect" << "Music"; + +Sound::Sound(const Sound& sound) : Object(sound.parent(), sound.id()) { *this = sound; } -Sigmod::Sound::Sound(const Sigmod* parent, const int id) : +Sound::Sound(const Sigmod* parent, const int id) : Object(parent, id), m_name(""), m_type(SoundEffect), @@ -42,20 +44,20 @@ Sigmod::Sound::Sound(const Sigmod* parent, const int id) : { } -Sigmod::Sound::Sound(const Sound& sound, const Sigmod* parent, const int id) : +Sound::Sound(const Sound& sound, const Sigmod* parent, const int id) : Object(parent, id) { *this = sound; } -Sigmod::Sound::Sound(const QDomElement& xml, const Sigmod* parent, const int id) : +Sound::Sound(const QDomElement& xml, const Sigmod* parent, const int id) : Object(parent, id) { LOAD_ID(); load(xml); } -void Sigmod::Sound::validate() +void Sound::validate() { TEST_BEGIN(); if (m_name.isEmpty()) @@ -65,7 +67,7 @@ void Sigmod::Sound::validate() TEST_END(); } -void Sigmod::Sound::load(const QDomElement& xml) +void Sound::load(const QDomElement& xml) { LOAD_BEGIN(); LOAD(name); @@ -73,7 +75,7 @@ void Sigmod::Sound::load(const QDomElement& xml) LOAD(data); } -QDomElement Sigmod::Sound::save() const +QDomElement Sound::save() const { SAVE_CREATE(); SAVE(name); @@ -87,14 +89,14 @@ SETTER(Sound, Type, Type, type) SETTER(Sound, QByteArray&, Data, data) GETTER(Sound, QString, name) -GETTER(Sound, Sigmod::Sound::Type, type) +GETTER(Sound, Sound::Type, type) GETTER(Sound, QByteArray, data) CHECK(Sound, QString&, name) CHECK(Sound, Type, type) CHECK(Sound, QByteArray&, data) -Sigmod::Sound& Sigmod::Sound::operator=(const Sound& rhs) +Sound& Sound::operator=(const Sound& rhs) { if (this == &rhs) return *this; |
