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