summaryrefslogtreecommitdiffstats
path: root/sigmodr/models/StoreGroupModel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'sigmodr/models/StoreGroupModel.cpp')
-rw-r--r--sigmodr/models/StoreGroupModel.cpp38
1 files changed, 19 insertions, 19 deletions
diff --git a/sigmodr/models/StoreGroupModel.cpp b/sigmodr/models/StoreGroupModel.cpp
index 66e2a99e..0d2bf699 100644
--- a/sigmodr/models/StoreGroupModel.cpp
+++ b/sigmodr/models/StoreGroupModel.cpp
@@ -21,9 +21,9 @@
// Model includes
#include "StoreModel.h"
-// Pokemod includes
-#include "../../pokemod/Pokemod.h"
-#include "../../pokemod/Store.h"
+// Sigmod includes
+#include "../../sigmod/Sigmod.h"
+#include "../../sigmod/Store.h"
// Qt includes
#include <QtCore/QFile>
@@ -31,31 +31,31 @@
// KDE includes
#include <KMenu>
-Pokemodr::StoreGroupModel::StoreGroupModel(BaseModel* parent, Pokemod::Pokemod* pokemod) :
- GroupModel(parent, pokemod, "Stores")
+Sigmodr::StoreGroupModel::StoreGroupModel(BaseModel* parent, Sigmod::Sigmod* sigmod) :
+ GroupModel(parent, sigmod, "Stores")
{
- for (int i = 0; i < pokemod->storeCount(); ++i)
- addObject(pokemod->store(i));
+ for (int i = 0; i < sigmod->storeCount(); ++i)
+ addObject(sigmod->store(i));
}
-Pokemodr::StoreGroupModel::~StoreGroupModel()
+Sigmodr::StoreGroupModel::~StoreGroupModel()
{
}
-QVariant Pokemodr::StoreGroupModel::data(const int role) const
+QVariant Sigmodr::StoreGroupModel::data(const int role) const
{
- if (role == Pokemodr::BaseModel::ContextMenuRole)
+ if (role == Sigmodr::BaseModel::ContextMenuRole)
{
KMenu* menu = new KMenu;
menu->addAction("&Add Store", this, SLOT(addObject()));
return QVariant::fromValue(menu);
}
- return Pokemodr::GroupModel::data(role);
+ return Sigmodr::GroupModel::data(role);
}
-bool Pokemodr::StoreGroupModel::setData(const QVariant& value, int role)
+bool Sigmodr::StoreGroupModel::setData(const QVariant& value, int role)
{
- if (role == Pokemodr::BaseModel::XmlRole)
+ if (role == Sigmodr::BaseModel::XmlRole)
{
if (value.canConvert<QString>())
{
@@ -65,7 +65,7 @@ bool Pokemodr::StoreGroupModel::setData(const QVariant& value, int role)
{
if (xml.doctype().name() == "Store")
{
- addObject(qobject_cast<Pokemod::Pokemod*>(m_object)->newStore(xml.documentElement()));
+ addObject(qobject_cast<Sigmod::Sigmod*>(m_object)->newStore(xml.documentElement()));
return true;
}
file.close();
@@ -75,20 +75,20 @@ bool Pokemodr::StoreGroupModel::setData(const QVariant& value, int role)
return false;
}
-void Pokemodr::StoreGroupModel::addObject(Pokemod::Object* object)
+void Sigmodr::StoreGroupModel::addObject(Sigmod::Object* object)
{
if (!object)
- object = qobject_cast<Pokemod::Pokemod*>(m_object)->newStore();
+ object = qobject_cast<Sigmod::Sigmod*>(m_object)->newStore();
if (object->className() == "Store")
- m_objects.append(new StoreModel(this, qobject_cast<Pokemod::Store*>(object)));
+ m_objects.append(new StoreModel(this, qobject_cast<Sigmod::Store*>(object)));
}
-void Pokemodr::StoreGroupModel::deleteObject(BaseObjectModel* model)
+void Sigmodr::StoreGroupModel::deleteObject(BaseObjectModel* model)
{
const int index = m_objects.indexOf(model);
if (0 <= index)
{
- qobject_cast<Pokemod::Pokemod*>(m_object)->deleteStore(index);
+ qobject_cast<Sigmod::Sigmod*>(m_object)->deleteStore(index);
m_objects[index]->deleteLater();
m_objects.removeAt(index);
}