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/models/SoundGroupModel.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/models/SoundGroupModel.cpp')
| -rw-r--r-- | sigmodr/models/SoundGroupModel.cpp | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/sigmodr/models/SoundGroupModel.cpp b/sigmodr/models/SoundGroupModel.cpp index 252ed4da..1f755029 100644 --- a/sigmodr/models/SoundGroupModel.cpp +++ b/sigmodr/models/SoundGroupModel.cpp @@ -21,9 +21,9 @@ // Model includes #include "SoundModel.h" -// Pokemod includes -#include "../../pokemod/Pokemod.h" -#include "../../pokemod/Sound.h" +// Sigmod includes +#include "../../sigmod/Sigmod.h" +#include "../../sigmod/Sound.h" // Qt includes #include <QtCore/QFile> @@ -31,31 +31,31 @@ // KDE includes #include <KMenu> -Pokemodr::SoundGroupModel::SoundGroupModel(BaseModel* parent, Pokemod::Pokemod* pokemod) : - GroupModel(parent, pokemod, "Sounds") +Sigmodr::SoundGroupModel::SoundGroupModel(BaseModel* parent, Sigmod::Sigmod* sigmod) : + GroupModel(parent, sigmod, "Sounds") { - for (int i = 0; i < pokemod->soundCount(); ++i) - addObject(pokemod->sound(i)); + for (int i = 0; i < sigmod->soundCount(); ++i) + addObject(sigmod->sound(i)); } -Pokemodr::SoundGroupModel::~SoundGroupModel() +Sigmodr::SoundGroupModel::~SoundGroupModel() { } -QVariant Pokemodr::SoundGroupModel::data(const int role) const +QVariant Sigmodr::SoundGroupModel::data(const int role) const { - if (role == Pokemodr::BaseModel::ContextMenuRole) + if (role == Sigmodr::BaseModel::ContextMenuRole) { KMenu* menu = new KMenu; menu->addAction("&Add Sound", this, SLOT(addObject())); return QVariant::fromValue(menu); } - return Pokemodr::GroupModel::data(role); + return Sigmodr::GroupModel::data(role); } -bool Pokemodr::SoundGroupModel::setData(const QVariant& value, int role) +bool Sigmodr::SoundGroupModel::setData(const QVariant& value, int role) { - if (role == Pokemodr::BaseModel::XmlRole) + if (role == Sigmodr::BaseModel::XmlRole) { if (value.canConvert<QString>()) { @@ -65,7 +65,7 @@ bool Pokemodr::SoundGroupModel::setData(const QVariant& value, int role) { if (xml.doctype().name() == "Sound") { - addObject(qobject_cast<Pokemod::Pokemod*>(m_object)->newSound(xml.documentElement())); + addObject(qobject_cast<Sigmod::Sigmod*>(m_object)->newSound(xml.documentElement())); return true; } file.close(); @@ -75,20 +75,20 @@ bool Pokemodr::SoundGroupModel::setData(const QVariant& value, int role) return false; } -void Pokemodr::SoundGroupModel::addObject(Pokemod::Object* object) +void Sigmodr::SoundGroupModel::addObject(Sigmod::Object* object) { if (!object) - object = qobject_cast<Pokemod::Pokemod*>(m_object)->newSound(); + object = qobject_cast<Sigmod::Sigmod*>(m_object)->newSound(); if (object->className() == "Sound") - m_objects.append(new SoundModel(this, qobject_cast<Pokemod::Sound*>(object))); + m_objects.append(new SoundModel(this, qobject_cast<Sigmod::Sound*>(object))); } -void Pokemodr::SoundGroupModel::deleteObject(BaseObjectModel* model) +void Sigmodr::SoundGroupModel::deleteObject(BaseObjectModel* model) { const int index = m_objects.indexOf(model); if (0 <= index) { - qobject_cast<Pokemod::Pokemod*>(m_object)->deleteSound(index); + qobject_cast<Sigmod::Sigmod*>(m_object)->deleteSound(index); m_objects[index]->deleteLater(); m_objects.removeAt(index); } |
