summaryrefslogtreecommitdiffstats
path: root/sigmodr/tree/AuthorGroupModel.cpp
diff options
context:
space:
mode:
authorBen Boeckel <MathStuf@gmail.com>2009-02-28 01:08:35 -0500
committerBen Boeckel <MathStuf@gmail.com>2009-02-28 01:08:35 -0500
commitc81259d5ea3cf4659affdb51b7622c61685a82ff (patch)
tree7d00b36089fe22b1b6659b89c93d5b51e3337d09 /sigmodr/tree/AuthorGroupModel.cpp
parentefb2daeb653694f29e12ee09348ccf68c904cc83 (diff)
downloadsigen-c81259d5ea3cf4659affdb51b7622c61685a82ff.tar.gz
sigen-c81259d5ea3cf4659affdb51b7622c61685a82ff.tar.xz
sigen-c81259d5ea3cf4659affdb51b7622c61685a82ff.zip
Added the Sigmod namespace to the sigmodrtree sources
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);