summaryrefslogtreecommitdiffstats
path: root/sigmodr/tree/WeatherGroupModel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'sigmodr/tree/WeatherGroupModel.cpp')
-rw-r--r--sigmodr/tree/WeatherGroupModel.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/sigmodr/tree/WeatherGroupModel.cpp b/sigmodr/tree/WeatherGroupModel.cpp
index 0cf0bc94..27d3b076 100644
--- a/sigmodr/tree/WeatherGroupModel.cpp
+++ b/sigmodr/tree/WeatherGroupModel.cpp
@@ -28,9 +28,10 @@
// KDE includes
#include <KMenu>
+using namespace Sigmod;
using namespace Sigmodr::Tree;
-WeatherGroupModel::WeatherGroupModel(BaseModel* parent, Sigmod::Game* game) :
+WeatherGroupModel::WeatherGroupModel(BaseModel* parent, Game* game) :
GroupModel(parent, game, "Weathers")
{
for (int i = 0; i < game->weatherCount(); ++i)
@@ -58,7 +59,7 @@ bool WeatherGroupModel::setData(const QVariant& value, int role)
QDomDocument xml;
if (loadFromData(data, &xml) && (xml.doctype().name() == "Weather"))
{
- addObject(qobject_cast<Sigmod::Game*>(m_object)->newWeather(xml.documentElement()));
+ addObject(qobject_cast<Game*>(m_object)->newWeather(xml.documentElement()));
return true;
}
}
@@ -71,12 +72,12 @@ QString WeatherGroupModel::types() const
return "Weather";
}
-void WeatherGroupModel::addObject(Sigmod::Object* object)
+void WeatherGroupModel::addObject(Object* object)
{
if (!object)
- object = qobject_cast<Sigmod::Game*>(m_object)->newWeather();
+ object = qobject_cast<Game*>(m_object)->newWeather();
if (object->className() == "Weather")
- addChild(new WeatherModel(this, qobject_cast<Sigmod::Weather*>(object)));
+ addChild(new WeatherModel(this, qobject_cast<Weather*>(object)));
}
void WeatherGroupModel::deleteObject(BaseModel* model)
@@ -84,7 +85,7 @@ void WeatherGroupModel::deleteObject(BaseModel* model)
const int index = find(model);
if (0 <= index)
{
- qobject_cast<Sigmod::Game*>(m_object)->deleteWeather(index);
+ qobject_cast<Game*>(m_object)->deleteWeather(index);
m_objects[index]->deleteLater();
m_objects.removeAt(index);
childRowChanged(index);