summaryrefslogtreecommitdiffstats
path: root/sigmodr/tree/NatureGroupModel.cpp
diff options
context:
space:
mode:
authorBen Boeckel <MathStuf@gmail.com>2009-02-25 01:19:46 -0500
committerBen Boeckel <MathStuf@gmail.com>2009-02-25 01:19:46 -0500
commit8dddfc1ef55773cdf878e413d82142781a6e444b (patch)
tree1fbd160be276c0cc89aa11971d2daab4ecc1791c /sigmodr/tree/NatureGroupModel.cpp
parent0d38afceb6fe92f1a315c527635522dc6e0346cb (diff)
downloadsigen-8dddfc1ef55773cdf878e413d82142781a6e444b.tar.gz
sigen-8dddfc1ef55773cdf878e413d82142781a6e444b.tar.xz
sigen-8dddfc1ef55773cdf878e413d82142781a6e444b.zip
Renamed from Sigmod to Game in sigmodr tree
Diffstat (limited to 'sigmodr/tree/NatureGroupModel.cpp')
-rw-r--r--sigmodr/tree/NatureGroupModel.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/sigmodr/tree/NatureGroupModel.cpp b/sigmodr/tree/NatureGroupModel.cpp
index 6f6a3252..9657b324 100644
--- a/sigmodr/tree/NatureGroupModel.cpp
+++ b/sigmodr/tree/NatureGroupModel.cpp
@@ -22,17 +22,17 @@
#include "NatureModel.h"
// Sigmod includes
+#include <sigmod/Game.h>
#include <sigmod/Nature.h>
-#include <sigmod/Sigmod.h>
// KDE includes
#include <KMenu>
-Sigmodr::Tree::NatureGroupModel::NatureGroupModel(BaseModel* parent, Sigmod::Sigmod* sigmod) :
- GroupModel(parent, sigmod, "Natures")
+Sigmodr::Tree::NatureGroupModel::NatureGroupModel(BaseModel* parent, Sigmod::Game* game) :
+ GroupModel(parent, game, "Natures")
{
- for (int i = 0; i < sigmod->natureCount(); ++i)
- addObject(sigmod->nature(i));
+ for (int i = 0; i < game->natureCount(); ++i)
+ addObject(game->nature(i));
}
QVariant Sigmodr::Tree::NatureGroupModel::data(const int role) const
@@ -56,7 +56,7 @@ bool Sigmodr::Tree::NatureGroupModel::setData(const QVariant& value, int role)
QDomDocument xml;
if (loadFromData(data, &xml) && (xml.doctype().name() == "Nature"))
{
- addObject(qobject_cast<Sigmod::Sigmod*>(m_object)->newNature(xml.documentElement()));
+ addObject(qobject_cast<Sigmod::Game*>(m_object)->newNature(xml.documentElement()));
return true;
}
}
@@ -72,7 +72,7 @@ QString Sigmodr::Tree::NatureGroupModel::types() const
void Sigmodr::Tree::NatureGroupModel::addObject(Sigmod::Object* object)
{
if (!object)
- object = qobject_cast<Sigmod::Sigmod*>(m_object)->newNature();
+ object = qobject_cast<Sigmod::Game*>(m_object)->newNature();
if (object->className() == "Nature")
addChild(new NatureModel(this, qobject_cast<Sigmod::Nature*>(object)));
}
@@ -82,7 +82,7 @@ void Sigmodr::Tree::NatureGroupModel::deleteObject(BaseModel* model)
const int index = find(model);
if (0 <= index)
{
- qobject_cast<Sigmod::Sigmod*>(m_object)->deleteNature(index);
+ qobject_cast<Sigmod::Game*>(m_object)->deleteNature(index);
m_objects[index]->deleteLater();
m_objects.removeAt(index);
childRowChanged(index);