summaryrefslogtreecommitdiffstats
path: root/sigmodr/tree/TileGroupModel.cpp
diff options
context:
space:
mode:
authorBen Boeckel <MathStuf@gmail.com>2009-02-25 01:38:27 -0500
committerBen Boeckel <MathStuf@gmail.com>2009-02-25 01:38:27 -0500
commitb90f2dc771801bcfadef322cea8ddc402283d4eb (patch)
tree81e102282933abe87e43a0932d593331aac1d4f5 /sigmodr/tree/TileGroupModel.cpp
parent560054e99ecd692b89fd8fbedcf69d08e45f41bd (diff)
downloadsigen-b90f2dc771801bcfadef322cea8ddc402283d4eb.tar.gz
sigen-b90f2dc771801bcfadef322cea8ddc402283d4eb.tar.xz
sigen-b90f2dc771801bcfadef322cea8ddc402283d4eb.zip
Fixed namespacing in sigmodr tree
Diffstat (limited to 'sigmodr/tree/TileGroupModel.cpp')
-rw-r--r--sigmodr/tree/TileGroupModel.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/sigmodr/tree/TileGroupModel.cpp b/sigmodr/tree/TileGroupModel.cpp
index 64c618b7..b7c1c9ba 100644
--- a/sigmodr/tree/TileGroupModel.cpp
+++ b/sigmodr/tree/TileGroupModel.cpp
@@ -28,14 +28,16 @@
// KDE includes
#include <KMenu>
-Sigmodr::Tree::TileGroupModel::TileGroupModel(BaseModel* parent, Sigmod::Game* game) :
+using namespace Sigmodr::Tree;
+
+TileGroupModel::TileGroupModel(BaseModel* parent, Sigmod::Game* game) :
GroupModel(parent, game, "Tiles")
{
for (int i = 0; i < game->tileCount(); ++i)
addObject(game->tile(i));
}
-QVariant Sigmodr::Tree::TileGroupModel::data(const int role) const
+QVariant TileGroupModel::data(const int role) const
{
if (role == BaseModel::ContextMenuRole)
{
@@ -46,7 +48,7 @@ QVariant Sigmodr::Tree::TileGroupModel::data(const int role) const
return GroupModel::data(role);
}
-bool Sigmodr::Tree::TileGroupModel::setData(const QVariant& value, int role)
+bool TileGroupModel::setData(const QVariant& value, int role)
{
if (role == BaseModel::XmlRole)
{
@@ -64,12 +66,12 @@ bool Sigmodr::Tree::TileGroupModel::setData(const QVariant& value, int role)
return false;
}
-QString Sigmodr::Tree::TileGroupModel::types() const
+QString TileGroupModel::types() const
{
return "Tile";
}
-void Sigmodr::Tree::TileGroupModel::addObject(Sigmod::Object* object)
+void TileGroupModel::addObject(Sigmod::Object* object)
{
if (!object)
object = qobject_cast<Sigmod::Game*>(m_object)->newTile();
@@ -77,7 +79,7 @@ void Sigmodr::Tree::TileGroupModel::addObject(Sigmod::Object* object)
addChild(new TileModel(this, qobject_cast<Sigmod::Tile*>(object)));
}
-void Sigmodr::Tree::TileGroupModel::deleteObject(BaseModel* model)
+void TileGroupModel::deleteObject(BaseModel* model)
{
const int index = find(model);
if (0 <= index)