summaryrefslogtreecommitdiffstats
path: root/sigmodr/tree/ItemGroupModel.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/ItemGroupModel.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/ItemGroupModel.cpp')
-rw-r--r--sigmodr/tree/ItemGroupModel.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/sigmodr/tree/ItemGroupModel.cpp b/sigmodr/tree/ItemGroupModel.cpp
index 9b6d2bc8..3f0b5197 100644
--- a/sigmodr/tree/ItemGroupModel.cpp
+++ b/sigmodr/tree/ItemGroupModel.cpp
@@ -28,9 +28,10 @@
// KDE includes
#include <KMenu>
+using namespace Sigmod;
using namespace Sigmodr::Tree;
-ItemGroupModel::ItemGroupModel(BaseModel* parent, Sigmod::Game* game) :
+ItemGroupModel::ItemGroupModel(BaseModel* parent, Game* game) :
GroupModel(parent, game, "Items")
{
for (int i = 0; i < game->itemCount(); ++i)
@@ -58,7 +59,7 @@ bool ItemGroupModel::setData(const QVariant& value, int role)
QDomDocument xml;
if (loadFromData(data, &xml) && (xml.doctype().name() == "Item"))
{
- addObject(qobject_cast<Sigmod::Game*>(m_object)->newItem(xml.documentElement()));
+ addObject(qobject_cast<Game*>(m_object)->newItem(xml.documentElement()));
return true;
}
}
@@ -71,12 +72,12 @@ QString ItemGroupModel::types() const
return "Item";
}
-void ItemGroupModel::addObject(Sigmod::Object* object)
+void ItemGroupModel::addObject(Object* object)
{
if (!object)
- object = qobject_cast<Sigmod::Game*>(m_object)->newItem();
+ object = qobject_cast<Game*>(m_object)->newItem();
if (object->className() == "Item")
- addChild(new ItemModel(this, qobject_cast<Sigmod::Item*>(object)));
+ addChild(new ItemModel(this, qobject_cast<Item*>(object)));
}
void ItemGroupModel::deleteObject(BaseModel* model)
@@ -84,7 +85,7 @@ void ItemGroupModel::deleteObject(BaseModel* model)
const int index = find(model);
if (0 <= index)
{
- qobject_cast<Sigmod::Game*>(m_object)->deleteItem(index);
+ qobject_cast<Game*>(m_object)->deleteItem(index);
m_objects[index]->deleteLater();
m_objects.removeAt(index);
childRowChanged(index);