diff options
Diffstat (limited to 'sigmodr/tree/WeatherGroupModel.cpp')
-rw-r--r-- | sigmodr/tree/WeatherGroupModel.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/sigmodr/tree/WeatherGroupModel.cpp b/sigmodr/tree/WeatherGroupModel.cpp index 41aaf70d..73929be6 100644 --- a/sigmodr/tree/WeatherGroupModel.cpp +++ b/sigmodr/tree/WeatherGroupModel.cpp @@ -22,17 +22,17 @@ #include "WeatherModel.h" // Sigmod includes -#include <sigmod/Sigmod.h> +#include <sigmod/Game.h> #include <sigmod/Weather.h> // KDE includes #include <KMenu> -Sigmodr::Tree::WeatherGroupModel::WeatherGroupModel(BaseModel* parent, Sigmod::Sigmod* sigmod) : - GroupModel(parent, sigmod, "Weathers") +Sigmodr::Tree::WeatherGroupModel::WeatherGroupModel(BaseModel* parent, Sigmod::Game* game) : + GroupModel(parent, game, "Weathers") { - for (int i = 0; i < sigmod->weatherCount(); ++i) - addObject(sigmod->weather(i)); + for (int i = 0; i < game->weatherCount(); ++i) + addObject(game->weather(i)); } QVariant Sigmodr::Tree::WeatherGroupModel::data(const int role) const @@ -56,7 +56,7 @@ bool Sigmodr::Tree::WeatherGroupModel::setData(const QVariant& value, int role) QDomDocument xml; if (loadFromData(data, &xml) && (xml.doctype().name() == "Weather")) { - addObject(qobject_cast<Sigmod::Sigmod*>(m_object)->newWeather(xml.documentElement())); + addObject(qobject_cast<Sigmod::Game*>(m_object)->newWeather(xml.documentElement())); return true; } } @@ -72,7 +72,7 @@ QString Sigmodr::Tree::WeatherGroupModel::types() const void Sigmodr::Tree::WeatherGroupModel::addObject(Sigmod::Object* object) { if (!object) - object = qobject_cast<Sigmod::Sigmod*>(m_object)->newWeather(); + object = qobject_cast<Sigmod::Game*>(m_object)->newWeather(); if (object->className() == "Weather") addChild(new WeatherModel(this, qobject_cast<Sigmod::Weather*>(object))); } @@ -82,7 +82,7 @@ void Sigmodr::Tree::WeatherGroupModel::deleteObject(BaseModel* model) const int index = find(model); if (0 <= index) { - qobject_cast<Sigmod::Sigmod*>(m_object)->deleteWeather(index); + qobject_cast<Sigmod::Game*>(m_object)->deleteWeather(index); m_objects[index]->deleteLater(); m_objects.removeAt(index); childRowChanged(index); |