From c81259d5ea3cf4659affdb51b7622c61685a82ff Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Sat, 28 Feb 2009 01:08:35 -0500 Subject: Added the Sigmod namespace to the sigmodrtree sources --- sigmodr/tree/TimeGroupModel.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'sigmodr/tree/TimeGroupModel.cpp') diff --git a/sigmodr/tree/TimeGroupModel.cpp b/sigmodr/tree/TimeGroupModel.cpp index d07ebf93..da8c58e5 100644 --- a/sigmodr/tree/TimeGroupModel.cpp +++ b/sigmodr/tree/TimeGroupModel.cpp @@ -28,9 +28,10 @@ // KDE includes #include +using namespace Sigmod; using namespace Sigmodr::Tree; -TimeGroupModel::TimeGroupModel(BaseModel* parent, Sigmod::Game* game) : +TimeGroupModel::TimeGroupModel(BaseModel* parent, Game* game) : GroupModel(parent, game, "Times") { for (int i = 0; i < game->timeCount(); ++i) @@ -58,7 +59,7 @@ bool TimeGroupModel::setData(const QVariant& value, int role) QDomDocument xml; if (loadFromData(data, &xml) && (xml.doctype().name() == "Time")) { - addObject(qobject_cast(m_object)->newTime(xml.documentElement())); + addObject(qobject_cast(m_object)->newTime(xml.documentElement())); return true; } } @@ -71,12 +72,12 @@ QString TimeGroupModel::types() const return "Time"; } -void TimeGroupModel::addObject(Sigmod::Object* object) +void TimeGroupModel::addObject(Object* object) { if (!object) - object = qobject_cast(m_object)->newTime(); + object = qobject_cast(m_object)->newTime(); if (object->className() == "Time") - addChild(new TimeModel(this, qobject_cast(object))); + addChild(new TimeModel(this, qobject_cast(object))); } void TimeGroupModel::deleteObject(BaseModel* model) @@ -84,7 +85,7 @@ void TimeGroupModel::deleteObject(BaseModel* model) const int index = find(model); if (0 <= index) { - qobject_cast(m_object)->deleteTime(index); + qobject_cast(m_object)->deleteTime(index); m_objects[index]->deleteLater(); m_objects.removeAt(index); childRowChanged(index); -- cgit