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