summaryrefslogtreecommitdiffstats
path: root/sigmodr/tree/AuthorGroupModel.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/AuthorGroupModel.cpp
parent560054e99ecd692b89fd8fbedcf69d08e45f41bd (diff)
downloadsigen-b90f2dc771801bcfadef322cea8ddc402283d4eb.tar.gz
sigen-b90f2dc771801bcfadef322cea8ddc402283d4eb.tar.xz
sigen-b90f2dc771801bcfadef322cea8ddc402283d4eb.zip
Fixed namespacing in sigmodr tree
Diffstat (limited to 'sigmodr/tree/AuthorGroupModel.cpp')
-rw-r--r--sigmodr/tree/AuthorGroupModel.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/sigmodr/tree/AuthorGroupModel.cpp b/sigmodr/tree/AuthorGroupModel.cpp
index 2d910c33..e2cbf172 100644
--- a/sigmodr/tree/AuthorGroupModel.cpp
+++ b/sigmodr/tree/AuthorGroupModel.cpp
@@ -28,14 +28,16 @@
// KDE includes
#include <KMenu>
-Sigmodr::Tree::AuthorGroupModel::AuthorGroupModel(BaseModel* parent, Sigmod::Game* game) :
+using namespace Sigmodr::Tree;
+
+AuthorGroupModel::AuthorGroupModel(BaseModel* parent, Sigmod::Game* game) :
GroupModel(parent, game, "Authors")
{
for (int i = 0; i < game->authorCount(); ++i)
addObject(game->author(i));
}
-QVariant Sigmodr::Tree::AuthorGroupModel::data(const int role) const
+QVariant AuthorGroupModel::data(const int role) const
{
if (role == BaseModel::ContextMenuRole)
{
@@ -46,7 +48,7 @@ QVariant Sigmodr::Tree::AuthorGroupModel::data(const int role) const
return GroupModel::data(role);
}
-bool Sigmodr::Tree::AuthorGroupModel::setData(const QVariant& value, int role)
+bool AuthorGroupModel::setData(const QVariant& value, int role)
{
if (role == BaseModel::XmlRole)
{
@@ -64,12 +66,12 @@ bool Sigmodr::Tree::AuthorGroupModel::setData(const QVariant& value, int role)
return false;
}
-QString Sigmodr::Tree::AuthorGroupModel::types() const
+QString AuthorGroupModel::types() const
{
return "Author";
}
-void Sigmodr::Tree::AuthorGroupModel::addObject(Sigmod::Object* object)
+void AuthorGroupModel::addObject(Sigmod::Object* object)
{
if (!object)
object = qobject_cast<Sigmod::Game*>(m_object)->newAuthor();
@@ -77,7 +79,7 @@ void Sigmodr::Tree::AuthorGroupModel::addObject(Sigmod::Object* object)
addChild(new AuthorModel(this, qobject_cast<Sigmod::Author*>(object)));
}
-void Sigmodr::Tree::AuthorGroupModel::deleteObject(BaseModel* model)
+void AuthorGroupModel::deleteObject(BaseModel* model)
{
const int index = find(model);
if (0 <= index)