diff options
Diffstat (limited to 'sigmodr/models/WeatherModel.cpp')
| -rw-r--r-- | sigmodr/models/WeatherModel.cpp | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/sigmodr/models/WeatherModel.cpp b/sigmodr/models/WeatherModel.cpp index 6040b81e..837a7bad 100644 --- a/sigmodr/models/WeatherModel.cpp +++ b/sigmodr/models/WeatherModel.cpp @@ -21,11 +21,11 @@ // Model includes #include "GroupModel.h" -// Pokemodr includes +// Sigmodr includes #include "../WeatherUI.h" -// Pokemod includes -#include "../../pokemod/Weather.h" +// Sigmod includes +#include "../../sigmod/Weather.h" // Qt includes #include <QtCore/QFile> @@ -33,42 +33,42 @@ // KDE includes #include <KMenu> -Pokemodr::WeatherModel::WeatherModel(BaseModel* parent, Pokemod::Weather* weather) : +Sigmodr::WeatherModel::WeatherModel(BaseModel* parent, Sigmod::Weather* weather) : ObjectModel(parent, weather) { } -Pokemodr::WeatherModel::~WeatherModel() +Sigmodr::WeatherModel::~WeatherModel() { } -QVariant Pokemodr::WeatherModel::data(int role) const +QVariant Sigmodr::WeatherModel::data(int role) const { if (role == Qt::DisplayRole) - return qobject_cast<Pokemod::Weather*>(m_object)->name(); - else if (role == Pokemodr::BaseModel::XmlRole) + return qobject_cast<Sigmod::Weather*>(m_object)->name(); + else if (role == Sigmodr::BaseModel::XmlRole) { QDomDocument xml(m_object->className()); xml.appendChild(m_object->save()); return xml.toString(); } - else if (role == Pokemodr::BaseModel::WidgetRole) + else if (role == Sigmodr::BaseModel::WidgetRole) { - QWidget* widget = new WeatherUI(qobject_cast<Pokemod::Weather*>(m_object), NULL); + QWidget* widget = new WeatherUI(qobject_cast<Sigmod::Weather*>(m_object), NULL); return QVariant::fromValue(widget); } - else if (role == Pokemodr::BaseModel::ContextMenuRole) + else if (role == Sigmodr::BaseModel::ContextMenuRole) { KMenu* menu = new KMenu; menu->addAction("&Delete Weather", this, SLOT(deleteSelf())); return QVariant::fromValue(menu); } - return Pokemodr::ObjectModel::data(role); + return Sigmodr::ObjectModel::data(role); } -bool Pokemodr::WeatherModel::setData(const QVariant& value, int role) +bool Sigmodr::WeatherModel::setData(const QVariant& value, int role) { - if (role == Pokemodr::BaseModel::XmlRole) + if (role == Sigmodr::BaseModel::XmlRole) { if (value.canConvert<QString>()) { @@ -88,7 +88,7 @@ bool Pokemodr::WeatherModel::setData(const QVariant& value, int role) return false; } -void Pokemodr::WeatherModel::deleteSelf() +void Sigmodr::WeatherModel::deleteSelf() { // qobject_cast<GroupModel*>(m_parent)->deleteObject(this); } |
