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