diff options
author | Ben Boeckel <MathStuf@gmail.com> | 2009-02-25 01:38:27 -0500 |
---|---|---|
committer | Ben Boeckel <MathStuf@gmail.com> | 2009-02-25 01:38:27 -0500 |
commit | b90f2dc771801bcfadef322cea8ddc402283d4eb (patch) | |
tree | 81e102282933abe87e43a0932d593331aac1d4f5 /sigmodr/tree/NatureGroupModel.cpp | |
parent | 560054e99ecd692b89fd8fbedcf69d08e45f41bd (diff) | |
download | sigen-b90f2dc771801bcfadef322cea8ddc402283d4eb.tar.gz sigen-b90f2dc771801bcfadef322cea8ddc402283d4eb.tar.xz sigen-b90f2dc771801bcfadef322cea8ddc402283d4eb.zip |
Fixed namespacing in sigmodr tree
Diffstat (limited to 'sigmodr/tree/NatureGroupModel.cpp')
-rw-r--r-- | sigmodr/tree/NatureGroupModel.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/sigmodr/tree/NatureGroupModel.cpp b/sigmodr/tree/NatureGroupModel.cpp index 9657b324..37031262 100644 --- a/sigmodr/tree/NatureGroupModel.cpp +++ b/sigmodr/tree/NatureGroupModel.cpp @@ -28,14 +28,16 @@ // KDE includes #include <KMenu> -Sigmodr::Tree::NatureGroupModel::NatureGroupModel(BaseModel* parent, Sigmod::Game* game) : +using namespace Sigmodr::Tree; + +NatureGroupModel::NatureGroupModel(BaseModel* parent, Sigmod::Game* game) : GroupModel(parent, game, "Natures") { for (int i = 0; i < game->natureCount(); ++i) addObject(game->nature(i)); } -QVariant Sigmodr::Tree::NatureGroupModel::data(const int role) const +QVariant NatureGroupModel::data(const int role) const { if (role == BaseModel::ContextMenuRole) { @@ -46,7 +48,7 @@ QVariant Sigmodr::Tree::NatureGroupModel::data(const int role) const return GroupModel::data(role); } -bool Sigmodr::Tree::NatureGroupModel::setData(const QVariant& value, int role) +bool NatureGroupModel::setData(const QVariant& value, int role) { if (role == BaseModel::XmlRole) { @@ -64,12 +66,12 @@ bool Sigmodr::Tree::NatureGroupModel::setData(const QVariant& value, int role) return false; } -QString Sigmodr::Tree::NatureGroupModel::types() const +QString NatureGroupModel::types() const { return "Nature"; } -void Sigmodr::Tree::NatureGroupModel::addObject(Sigmod::Object* object) +void NatureGroupModel::addObject(Sigmod::Object* object) { if (!object) object = qobject_cast<Sigmod::Game*>(m_object)->newNature(); @@ -77,7 +79,7 @@ void Sigmodr::Tree::NatureGroupModel::addObject(Sigmod::Object* object) addChild(new NatureModel(this, qobject_cast<Sigmod::Nature*>(object))); } -void Sigmodr::Tree::NatureGroupModel::deleteObject(BaseModel* model) +void NatureGroupModel::deleteObject(BaseModel* model) { const int index = find(model); if (0 <= index) |