summaryrefslogtreecommitdiffstats
path: root/sigmodr/tree/GroupModel.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/GroupModel.cpp
parent560054e99ecd692b89fd8fbedcf69d08e45f41bd (diff)
downloadsigen-b90f2dc771801bcfadef322cea8ddc402283d4eb.tar.gz
sigen-b90f2dc771801bcfadef322cea8ddc402283d4eb.tar.xz
sigen-b90f2dc771801bcfadef322cea8ddc402283d4eb.zip
Fixed namespacing in sigmodr tree
Diffstat (limited to 'sigmodr/tree/GroupModel.cpp')
-rw-r--r--sigmodr/tree/GroupModel.cpp22
1 files changed, 12 insertions, 10 deletions
diff --git a/sigmodr/tree/GroupModel.cpp b/sigmodr/tree/GroupModel.cpp
index 186c5e86..043336b2 100644
--- a/sigmodr/tree/GroupModel.cpp
+++ b/sigmodr/tree/GroupModel.cpp
@@ -21,52 +21,54 @@
// Sigmodr tree includes
#include "BaseObjectModel.h"
-Sigmodr::Tree::GroupModel::GroupModel(BaseModel* parent, Sigmod::Object* object, const QString& name) :
+using namespace Sigmodr::Tree;
+
+GroupModel::GroupModel(BaseModel* parent, Sigmod::Object* object, const QString& name) :
BaseModel(parent, object, name),
Grouping()
{
}
-Sigmodr::Tree::GroupModel::~GroupModel()
+GroupModel::~GroupModel()
{
clearData();
}
-QVariant Sigmodr::Tree::GroupModel::data(int role) const
+QVariant GroupModel::data(int role) const
{
if (role == Qt::DisplayRole)
return m_name;
return BaseModel::data(role);
}
-int Sigmodr::Tree::GroupModel::rowCount() const
+int GroupModel::rowCount() const
{
return m_objects.size();
}
-Qt::ItemFlags Sigmodr::Tree::GroupModel::flags() const
+Qt::ItemFlags GroupModel::flags() const
{
return Qt::ItemIsDropEnabled | Qt::ItemIsEnabled;
}
-Sigmodr::Tree::BaseModel* Sigmodr::Tree::GroupModel::childItem(const int row)
+BaseModel* GroupModel::childItem(const int row)
{
if (row < m_objects.size())
return m_objects[row];
return NULL;
}
-Qt::DropActions Sigmodr::Tree::GroupModel::supportedDragActions() const
+Qt::DropActions GroupModel::supportedDragActions() const
{
return 0;
}
-Qt::DropActions Sigmodr::Tree::GroupModel::supportedDropActions() const
+Qt::DropActions GroupModel::supportedDropActions() const
{
return Qt::CopyAction | Qt::MoveAction;
}
-void Sigmodr::Tree::GroupModel::addChild(BaseModel* model)
+void GroupModel::addChild(BaseModel* model)
{
connect(model, SIGNAL(rowChanged(int)), this, SLOT(childRowChanged(int)));
connect(model, SIGNAL(rowsChanged(QList<int>)), this, SLOT(childRowsChanged(QList<int>)));
@@ -74,7 +76,7 @@ void Sigmodr::Tree::GroupModel::addChild(BaseModel* model)
emit(rowChanged(m_objects.size() - 1));
}
-int Sigmodr::Tree::GroupModel::findChild(BaseModel* model) const
+int GroupModel::findChild(BaseModel* model) const
{
return find(model);
}