summaryrefslogtreecommitdiffstats
path: root/sigmodr/tree/CoinListModel.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/CoinListModel.cpp
parent560054e99ecd692b89fd8fbedcf69d08e45f41bd (diff)
downloadsigen-b90f2dc771801bcfadef322cea8ddc402283d4eb.tar.gz
sigen-b90f2dc771801bcfadef322cea8ddc402283d4eb.tar.xz
sigen-b90f2dc771801bcfadef322cea8ddc402283d4eb.zip
Fixed namespacing in sigmodr tree
Diffstat (limited to 'sigmodr/tree/CoinListModel.cpp')
-rw-r--r--sigmodr/tree/CoinListModel.cpp21
1 files changed, 12 insertions, 9 deletions
diff --git a/sigmodr/tree/CoinListModel.cpp b/sigmodr/tree/CoinListModel.cpp
index b19831cb..a3062314 100644
--- a/sigmodr/tree/CoinListModel.cpp
+++ b/sigmodr/tree/CoinListModel.cpp
@@ -32,18 +32,21 @@
// KDE includes
#include <KMenu>
-Sigmodr::Tree::CoinListModel::CoinListModel(BaseModel* parent, Sigmod::CoinList* coinList) :
+using namespace Sigmodr::Widgets;
+using namespace Sigmodr::Tree;
+
+CoinListModel::CoinListModel(BaseModel* parent, Sigmod::CoinList* coinList) :
GroupObjectModel(parent, coinList)
{
setupData();
}
-Sigmodr::Tree::CoinListModel::~CoinListModel()
+CoinListModel::~CoinListModel()
{
clearData();
}
-QVariant Sigmodr::Tree::CoinListModel::data(int role) const
+QVariant CoinListModel::data(int role) const
{
if (role == Qt::DisplayRole)
return qobject_cast<Sigmod::CoinList*>(m_object)->name();
@@ -69,7 +72,7 @@ QVariant Sigmodr::Tree::CoinListModel::data(int role) const
return GroupObjectModel::data(role);
}
-bool Sigmodr::Tree::CoinListModel::setData(const QVariant& value, int role)
+bool CoinListModel::setData(const QVariant& value, int role)
{
if (role == BaseModel::XmlRole)
{
@@ -97,12 +100,12 @@ bool Sigmodr::Tree::CoinListModel::setData(const QVariant& value, int role)
return false;
}
-QString Sigmodr::Tree::CoinListModel::types() const
+QString CoinListModel::types() const
{
return type().append(QString(";CoinListItem"));
}
-void Sigmodr::Tree::CoinListModel::addObject(Sigmod::Object* object)
+void CoinListModel::addObject(Sigmod::Object* object)
{
if (!object)
object = qobject_cast<Sigmod::CoinList*>(m_object)->newItem();
@@ -110,7 +113,7 @@ void Sigmodr::Tree::CoinListModel::addObject(Sigmod::Object* object)
addChild(new CoinListItemModel(this, qobject_cast<Sigmod::CoinListItem*>(object)));
}
-void Sigmodr::Tree::CoinListModel::deleteObject(BaseModel* model)
+void CoinListModel::deleteObject(BaseModel* model)
{
const int index = find(model);
if (0 <= index)
@@ -122,12 +125,12 @@ void Sigmodr::Tree::CoinListModel::deleteObject(BaseModel* model)
}
}
-void Sigmodr::Tree::CoinListModel::deleteSelf()
+void CoinListModel::deleteSelf()
{
qobject_cast<GroupModel*>(m_parent)->deleteObject(this);
}
-void Sigmodr::Tree::CoinListModel::setupData()
+void CoinListModel::setupData()
{
Sigmod::CoinList* coinList = qobject_cast<Sigmod::CoinList*>(m_object);
for (int i = 0; i < coinList->itemCount(); ++i)