diff options
Diffstat (limited to 'sigmodr/models/NatureGroupModel.cpp')
| -rw-r--r-- | sigmodr/models/NatureGroupModel.cpp | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/sigmodr/models/NatureGroupModel.cpp b/sigmodr/models/NatureGroupModel.cpp index ebeb50e0..f9dac0b8 100644 --- a/sigmodr/models/NatureGroupModel.cpp +++ b/sigmodr/models/NatureGroupModel.cpp @@ -21,9 +21,9 @@ // Model includes #include "NatureModel.h" -// Pokemod includes -#include "../../pokemod/Nature.h" -#include "../../pokemod/Pokemod.h" +// Sigmod includes +#include "../../sigmod/Nature.h" +#include "../../sigmod/Sigmod.h" // Qt includes #include <QtCore/QFile> @@ -31,31 +31,31 @@ // KDE includes #include <KMenu> -Pokemodr::NatureGroupModel::NatureGroupModel(BaseModel* parent, Pokemod::Pokemod* pokemod) : - GroupModel(parent, pokemod, "Natures") +Sigmodr::NatureGroupModel::NatureGroupModel(BaseModel* parent, Sigmod::Sigmod* sigmod) : + GroupModel(parent, sigmod, "Natures") { - for (int i = 0; i < pokemod->natureCount(); ++i) - addObject(pokemod->nature(i)); + for (int i = 0; i < sigmod->natureCount(); ++i) + addObject(sigmod->nature(i)); } -Pokemodr::NatureGroupModel::~NatureGroupModel() +Sigmodr::NatureGroupModel::~NatureGroupModel() { } -QVariant Pokemodr::NatureGroupModel::data(const int role) const +QVariant Sigmodr::NatureGroupModel::data(const int role) const { - if (role == Pokemodr::BaseModel::ContextMenuRole) + if (role == Sigmodr::BaseModel::ContextMenuRole) { KMenu* menu = new KMenu; menu->addAction("&Add Nature", this, SLOT(addObject())); return QVariant::fromValue(menu); } - return Pokemodr::GroupModel::data(role); + return Sigmodr::GroupModel::data(role); } -bool Pokemodr::NatureGroupModel::setData(const QVariant& value, int role) +bool Sigmodr::NatureGroupModel::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::NatureGroupModel::setData(const QVariant& value, int role) { if (xml.doctype().name() == "Nature") { - addObject(qobject_cast<Pokemod::Pokemod*>(m_object)->newNature(xml.documentElement())); + addObject(qobject_cast<Sigmod::Sigmod*>(m_object)->newNature(xml.documentElement())); return true; } file.close(); @@ -75,20 +75,20 @@ bool Pokemodr::NatureGroupModel::setData(const QVariant& value, int role) return false; } -void Pokemodr::NatureGroupModel::addObject(Pokemod::Object* object) +void Sigmodr::NatureGroupModel::addObject(Sigmod::Object* object) { if (!object) - object = qobject_cast<Pokemod::Pokemod*>(m_object)->newNature(); + object = qobject_cast<Sigmod::Sigmod*>(m_object)->newNature(); if (object->className() == "Nature") - m_objects.append(new NatureModel(this, qobject_cast<Pokemod::Nature*>(object))); + m_objects.append(new NatureModel(this, qobject_cast<Sigmod::Nature*>(object))); } -void Pokemodr::NatureGroupModel::deleteObject(BaseObjectModel* model) +void Sigmodr::NatureGroupModel::deleteObject(BaseObjectModel* model) { const int index = m_objects.indexOf(model); if (0 <= index) { - qobject_cast<Pokemod::Pokemod*>(m_object)->deleteNature(index); + qobject_cast<Sigmod::Sigmod*>(m_object)->deleteNature(index); m_objects[index]->deleteLater(); m_objects.removeAt(index); } |
