diff options
author | Ben Boeckel <MathStuf@gmail.com> | 2009-02-24 00:36:46 -0500 |
---|---|---|
committer | Ben Boeckel <MathStuf@gmail.com> | 2009-02-24 00:37:19 -0500 |
commit | 7ccc2e3c73637e771c08b2c82539d6c4a7a5f0d7 (patch) | |
tree | e8e28b88e60e7f0790333b88fd9f6c9206da3e89 /sigmodr/tree/CoinListModel.cpp | |
parent | 1f54a4e8a8a662664355b8e2775d6e0d019399b5 (diff) | |
download | sigen-7ccc2e3c73637e771c08b2c82539d6c4a7a5f0d7.tar.gz sigen-7ccc2e3c73637e771c08b2c82539d6c4a7a5f0d7.tar.xz sigen-7ccc2e3c73637e771c08b2c82539d6c4a7a5f0d7.zip |
Moved sigmodrtree into namespace Sigmodr::Tree
Diffstat (limited to 'sigmodr/tree/CoinListModel.cpp')
-rw-r--r-- | sigmodr/tree/CoinListModel.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/sigmodr/tree/CoinListModel.cpp b/sigmodr/tree/CoinListModel.cpp index 8363f040..b19831cb 100644 --- a/sigmodr/tree/CoinListModel.cpp +++ b/sigmodr/tree/CoinListModel.cpp @@ -32,18 +32,18 @@ // KDE includes #include <KMenu> -Sigmodr::CoinListModel::CoinListModel(BaseModel* parent, Sigmod::CoinList* coinList) : +Sigmodr::Tree::CoinListModel::CoinListModel(BaseModel* parent, Sigmod::CoinList* coinList) : GroupObjectModel(parent, coinList) { setupData(); } -Sigmodr::CoinListModel::~CoinListModel() +Sigmodr::Tree::CoinListModel::~CoinListModel() { clearData(); } -QVariant Sigmodr::CoinListModel::data(int role) const +QVariant Sigmodr::Tree::CoinListModel::data(int role) const { if (role == Qt::DisplayRole) return qobject_cast<Sigmod::CoinList*>(m_object)->name(); @@ -69,7 +69,7 @@ QVariant Sigmodr::CoinListModel::data(int role) const return GroupObjectModel::data(role); } -bool Sigmodr::CoinListModel::setData(const QVariant& value, int role) +bool Sigmodr::Tree::CoinListModel::setData(const QVariant& value, int role) { if (role == BaseModel::XmlRole) { @@ -97,12 +97,12 @@ bool Sigmodr::CoinListModel::setData(const QVariant& value, int role) return false; } -QString Sigmodr::CoinListModel::types() const +QString Sigmodr::Tree::CoinListModel::types() const { return type().append(QString(";CoinListItem")); } -void Sigmodr::CoinListModel::addObject(Sigmod::Object* object) +void Sigmodr::Tree::CoinListModel::addObject(Sigmod::Object* object) { if (!object) object = qobject_cast<Sigmod::CoinList*>(m_object)->newItem(); @@ -110,7 +110,7 @@ void Sigmodr::CoinListModel::addObject(Sigmod::Object* object) addChild(new CoinListItemModel(this, qobject_cast<Sigmod::CoinListItem*>(object))); } -void Sigmodr::CoinListModel::deleteObject(BaseModel* model) +void Sigmodr::Tree::CoinListModel::deleteObject(BaseModel* model) { const int index = find(model); if (0 <= index) @@ -122,12 +122,12 @@ void Sigmodr::CoinListModel::deleteObject(BaseModel* model) } } -void Sigmodr::CoinListModel::deleteSelf() +void Sigmodr::Tree::CoinListModel::deleteSelf() { qobject_cast<GroupModel*>(m_parent)->deleteObject(this); } -void Sigmodr::CoinListModel::setupData() +void Sigmodr::Tree::CoinListModel::setupData() { Sigmod::CoinList* coinList = qobject_cast<Sigmod::CoinList*>(m_object); for (int i = 0; i < coinList->itemCount(); ++i) |