summaryrefslogtreecommitdiffstats
path: root/sigmodr/models/CoinListObjectModel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'sigmodr/models/CoinListObjectModel.cpp')
-rw-r--r--sigmodr/models/CoinListObjectModel.cpp50
1 files changed, 25 insertions, 25 deletions
diff --git a/sigmodr/models/CoinListObjectModel.cpp b/sigmodr/models/CoinListObjectModel.cpp
index 0ccf1fa6..745be065 100644
--- a/sigmodr/models/CoinListObjectModel.cpp
+++ b/sigmodr/models/CoinListObjectModel.cpp
@@ -21,15 +21,15 @@
// Model includes
#include "GroupObjectModel.h"
-// Pokemodr includes
+// Sigmodr includes
#include "../CoinListObjectUI.h"
-// Pokemod includes
-#include "../../pokemod/CoinList.h"
-#include "../../pokemod/CoinListObject.h"
-#include "../../pokemod/Item.h"
-#include "../../pokemod/Pokemod.h"
-#include "../../pokemod/Species.h"
+// Sigmod includes
+#include "../../sigmod/CoinList.h"
+#include "../../sigmod/CoinListObject.h"
+#include "../../sigmod/Item.h"
+#include "../../sigmod/Sigmod.h"
+#include "../../sigmod/Species.h"
// Qt includes
#include <QtCore/QFile>
@@ -37,57 +37,57 @@
// KDE includes
#include <KMenu>
-Pokemodr::CoinListObjectModel::CoinListObjectModel(BaseModel* parent, Pokemod::CoinListObject* object) :
+Sigmodr::CoinListObjectModel::CoinListObjectModel(BaseModel* parent, Sigmod::CoinListObject* object) :
ObjectModel(parent, object)
{
}
-Pokemodr::CoinListObjectModel::~CoinListObjectModel()
+Sigmodr::CoinListObjectModel::~CoinListObjectModel()
{
}
-QVariant Pokemodr::CoinListObjectModel::data(int role) const
+QVariant Sigmodr::CoinListObjectModel::data(int role) const
{
if (role == Qt::DisplayRole)
{
- Pokemod::CoinListObject* object = qobject_cast<Pokemod::CoinListObject*>(m_object);
- if (object->type() == Pokemod::CoinListObject::Item)
+ Sigmod::CoinListObject* object = qobject_cast<Sigmod::CoinListObject*>(m_object);
+ if (object->type() == Sigmod::CoinListObject::Item)
{
- const int index = qobject_cast<const Pokemod::Pokemod*>(m_object->pokemod())->itemIndex(object->object());
+ const int index = qobject_cast<const Sigmod::Sigmod*>(m_object->sigmod())->itemIndex(object->object());
if (index != INT_MAX)
- return qobject_cast<const Pokemod::Pokemod*>(m_object->pokemod())->item(index)->name();
+ return qobject_cast<const Sigmod::Sigmod*>(m_object->sigmod())->item(index)->name();
}
- else if (object->type() == Pokemod::CoinListObject::Species)
+ else if (object->type() == Sigmod::CoinListObject::Species)
{
- const int index = qobject_cast<const Pokemod::Pokemod*>(m_object->pokemod())->speciesIndex(object->object());
+ const int index = qobject_cast<const Sigmod::Sigmod*>(m_object->sigmod())->speciesIndex(object->object());
if (index != INT_MAX)
- return qobject_cast<const Pokemod::Pokemod*>(m_object->pokemod())->species(index)->name();
+ return qobject_cast<const Sigmod::Sigmod*>(m_object->sigmod())->species(index)->name();
}
return "";
}
- else if (role == Pokemodr::BaseModel::XmlRole)
+ else if (role == Sigmodr::BaseModel::XmlRole)
{
QDomDocument xml(m_object->className());
xml.appendChild(m_object->save());
return xml.toString();
}
- else if (role == Pokemodr::BaseModel::WidgetRole)
+ else if (role == Sigmodr::BaseModel::WidgetRole)
{
- QWidget* widget = new CoinListObjectUI(qobject_cast<Pokemod::CoinListObject*>(m_object), NULL);
+ QWidget* widget = new CoinListObjectUI(qobject_cast<Sigmod::CoinListObject*>(m_object), NULL);
return QVariant::fromValue(widget);
}
- else if (role == Pokemodr::BaseModel::ContextMenuRole)
+ else if (role == Sigmodr::BaseModel::ContextMenuRole)
{
KMenu* menu = new KMenu;
menu->addAction("&Delete Object", this, SLOT(deleteSelf()));
return QVariant::fromValue(menu);
}
- return Pokemodr::ObjectModel::data(role);
+ return Sigmodr::ObjectModel::data(role);
}
-bool Pokemodr::CoinListObjectModel::setData(const QVariant& value, int role)
+bool Sigmodr::CoinListObjectModel::setData(const QVariant& value, int role)
{
- if (role == Pokemodr::BaseModel::XmlRole)
+ if (role == Sigmodr::BaseModel::XmlRole)
{
if (value.canConvert<QString>())
{
@@ -107,7 +107,7 @@ bool Pokemodr::CoinListObjectModel::setData(const QVariant& value, int role)
return false;
}
-void Pokemodr::CoinListObjectModel::deleteSelf()
+void Sigmodr::CoinListObjectModel::deleteSelf()
{
// qobject_cast<GroupObjectModel*>(m_parent)->deleteObject(this);
}