summaryrefslogtreecommitdiffstats
path: root/pokemodr/models/CoinListGroupModel.cpp
diff options
context:
space:
mode:
authorBen Boeckel <MathStuf@gmail.com>2008-06-09 00:50:59 +0000
committerBen Boeckel <MathStuf@gmail.com>2008-06-09 00:50:59 +0000
commit60a2ed8ee8aa994c83d382af2ec477e171beb950 (patch)
tree6fea6867adee00f22b9d775a6dce15ed875d75e6 /pokemodr/models/CoinListGroupModel.cpp
parent0737b455ca94351c574aa1a8c83ea30c5b7bc443 (diff)
downloadsigen-60a2ed8ee8aa994c83d382af2ec477e171beb950.tar.gz
sigen-60a2ed8ee8aa994c83d382af2ec477e171beb950.tar.xz
sigen-60a2ed8ee8aa994c83d382af2ec477e171beb950.zip
[FIX] All modules now use their own namespace
git-svn-id: https://pokegen.svn.sourceforge.net/svnroot/pokegen/trunk@201 6ecfd1a5-f3ed-3746-8530-beee90d26b22
Diffstat (limited to 'pokemodr/models/CoinListGroupModel.cpp')
-rw-r--r--pokemodr/models/CoinListGroupModel.cpp26
1 files changed, 13 insertions, 13 deletions
diff --git a/pokemodr/models/CoinListGroupModel.cpp b/pokemodr/models/CoinListGroupModel.cpp
index d958d792..2de15681 100644
--- a/pokemodr/models/CoinListGroupModel.cpp
+++ b/pokemodr/models/CoinListGroupModel.cpp
@@ -31,31 +31,31 @@
// KDE includes
#include <KMenu>
-CoinListGroupModel::CoinListGroupModel(BaseModel* parent, Pokemod* pokemod) :
+Pokemodr::CoinListGroupModel::CoinListGroupModel(BaseModel* parent, Pokemod::Pokemod* pokemod) :
GroupModel(parent, pokemod, "Coin Lists")
{
for (int i = 0; i < pokemod->coinListCount(); ++i)
addObject(pokemod->coinList(i));
}
-CoinListGroupModel::~CoinListGroupModel()
+Pokemodr::CoinListGroupModel::~CoinListGroupModel()
{
}
-QVariant CoinListGroupModel::data(const int role) const
+QVariant Pokemodr::CoinListGroupModel::data(const int role) const
{
- if (role == BaseModel::ContextMenuRole)
+ if (role == Pokemodr::BaseModel::ContextMenuRole)
{
KMenu* menu = new KMenu;
menu->addAction("Add Coin List", this, SLOT(addObject()));
return QVariant::fromValue(static_cast<void*>(menu));
}
- return GroupModel::data(role);
+ return Pokemodr::GroupModel::data(role);
}
-bool CoinListGroupModel::setData(const QVariant& value, int role)
+bool Pokemodr::CoinListGroupModel::setData(const QVariant& value, int role)
{
- if (role == BaseModel::XmlRole)
+ if (role == Pokemodr::BaseModel::XmlRole)
{
if (value.canConvert<QString>())
{
@@ -65,7 +65,7 @@ bool CoinListGroupModel::setData(const QVariant& value, int role)
{
if (xml.doctype().name() == "CoinList")
{
- addObject(static_cast<Pokemod*>(m_object)->newCoinList(xml.documentElement()));
+ addObject(static_cast<Pokemod::Pokemod*>(m_object)->newCoinList(xml.documentElement()));
return true;
}
file.close();
@@ -75,20 +75,20 @@ bool CoinListGroupModel::setData(const QVariant& value, int role)
return false;
}
-void CoinListGroupModel::addObject(Object* object)
+void Pokemodr::CoinListGroupModel::addObject(Pokemod::Object* object)
{
if (!object)
- object = static_cast<Pokemod*>(m_object)->newCoinList();
+ object = static_cast<Pokemod::Pokemod*>(m_object)->newCoinList();
if (object->className() == "CoinList")
- m_objects.append(new CoinListModel(this, static_cast<CoinList*>(object)));
+ m_objects.append(new CoinListModel(this, static_cast<Pokemod::CoinList*>(object)));
}
-void CoinListGroupModel::deleteObject(BaseObjectModel* model)
+void Pokemodr::CoinListGroupModel::deleteObject(BaseObjectModel* model)
{
const int index = m_objects.indexOf(model);
if (0 <= index)
{
- static_cast<Pokemod*>(m_object)->deleteCoinList(index);
+ static_cast<Pokemod::Pokemod*>(m_object)->deleteCoinList(index);
m_objects[index]->deleteLater();
m_objects.removeAt(index);
}