diff options
Diffstat (limited to 'sigmodr/tree/StatusGroupModel.cpp')
-rw-r--r-- | sigmodr/tree/StatusGroupModel.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/sigmodr/tree/StatusGroupModel.cpp b/sigmodr/tree/StatusGroupModel.cpp index c1718a9a..284ce483 100644 --- a/sigmodr/tree/StatusGroupModel.cpp +++ b/sigmodr/tree/StatusGroupModel.cpp @@ -28,9 +28,10 @@ // KDE includes #include <KMenu> +using namespace Sigmod; using namespace Sigmodr::Tree; -StatusGroupModel::StatusGroupModel(BaseModel* parent, Sigmod::Game* game) : +StatusGroupModel::StatusGroupModel(BaseModel* parent, Game* game) : GroupModel(parent, game, "Status Effects") { for (int i = 0; i < game->statusCount(); ++i) @@ -58,7 +59,7 @@ bool StatusGroupModel::setData(const QVariant& value, int role) QDomDocument xml; if (loadFromData(data, &xml) && (xml.doctype().name() == "Status")) { - addObject(qobject_cast<Sigmod::Game*>(m_object)->newStatus(xml.documentElement())); + addObject(qobject_cast<Game*>(m_object)->newStatus(xml.documentElement())); return true; } } @@ -71,12 +72,12 @@ QString StatusGroupModel::types() const return "Status"; } -void StatusGroupModel::addObject(Sigmod::Object* object) +void StatusGroupModel::addObject(Object* object) { if (!object) - object = qobject_cast<Sigmod::Game*>(m_object)->newStatus(); + object = qobject_cast<Game*>(m_object)->newStatus(); if (object->className() == "Status") - addChild(new StatusModel(this, qobject_cast<Sigmod::Status*>(object))); + addChild(new StatusModel(this, qobject_cast<Status*>(object))); } void StatusGroupModel::deleteObject(BaseModel* model) @@ -84,7 +85,7 @@ void StatusGroupModel::deleteObject(BaseModel* model) const int index = find(model); if (0 <= index) { - qobject_cast<Sigmod::Game*>(m_object)->deleteStatus(index); + qobject_cast<Game*>(m_object)->deleteStatus(index); m_objects[index]->deleteLater(); m_objects.removeAt(index); childRowChanged(index); |