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