From 0b4b89cf8efdc15e5a8d4b6cb24a5c8a025227d9 Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Sat, 6 Sep 2008 04:12:30 +0000 Subject: [FIX] Renamed everything (in use) away from Poké- prefixes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: https://pokegen.svn.sourceforge.net/svnroot/pokegen/trunk@250 6ecfd1a5-f3ed-3746-8530-beee90d26b22 --- sigmodr/models/WeatherGroupModel.cpp | 38 ++++++++++++++++++------------------ 1 file changed, 19 insertions(+), 19 deletions(-) (limited to 'sigmodr/models/WeatherGroupModel.cpp') 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 @@ -31,31 +31,31 @@ // KDE includes #include -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()) { @@ -65,7 +65,7 @@ bool Pokemodr::WeatherGroupModel::setData(const QVariant& value, int role) { if (xml.doctype().name() == "Weather") { - addObject(qobject_cast(m_object)->newWeather(xml.documentElement())); + addObject(qobject_cast(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(m_object)->newWeather(); + object = qobject_cast(m_object)->newWeather(); if (object->className() == "Weather") - m_objects.append(new WeatherModel(this, qobject_cast(object))); + m_objects.append(new WeatherModel(this, qobject_cast(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(m_object)->deleteWeather(index); + qobject_cast(m_object)->deleteWeather(index); m_objects[index]->deleteLater(); m_objects.removeAt(index); } -- cgit