From 4acab35a099e9f6834432e7e89dee716c41549ba Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Tue, 24 Feb 2009 21:21:41 -0500 Subject: Fixed Sigmodr widgets to use namespaces in sources --- sigmodr/widgets/MapWildListUI.cpp | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) (limited to 'sigmodr/widgets/MapWildListUI.cpp') diff --git a/sigmodr/widgets/MapWildListUI.cpp b/sigmodr/widgets/MapWildListUI.cpp index 376412b3..11a48151 100644 --- a/sigmodr/widgets/MapWildListUI.cpp +++ b/sigmodr/widgets/MapWildListUI.cpp @@ -28,13 +28,16 @@ #include #include -Sigmodr::Widgets::MapWildListUI::MapWildListUI(Sigmod::MapWildList* wildList, QWidget* parent) : +using namespace Sigmod; +using namespace Sigmodr::Widgets; + +MapWildListUI::MapWildListUI(MapWildList* wildList, QWidget* parent) : ObjectUI(parent) { - setObjects(wildList, new Sigmod::MapWildList(*wildList)); + setObjects(wildList, new MapWildList(*wildList)); } -void Sigmodr::Widgets::MapWildListUI::initGui() +void MapWildListUI::initGui() { QFile file(":/gui/mapwildlist.ui"); file.open(QFile::ReadOnly); @@ -44,27 +47,27 @@ void Sigmodr::Widgets::MapWildListUI::initGui() connect(ui_name, SIGNAL(textChanged(QString)), this, SLOT(nameChanged(QString))); } -void Sigmodr::Widgets::MapWildListUI::setGui() +void MapWildListUI::setGui() { - ui_name->setText(qobject_cast(modified())->name()); + ui_name->setText(qobject_cast(modified())->name()); } -void Sigmodr::Widgets::MapWildListUI::apply() +void MapWildListUI::apply() { - *qobject_cast(original()) = *qobject_cast(modified()); + *qobject_cast(original()) = *qobject_cast(modified()); emit(changed(false)); } -void Sigmodr::Widgets::MapWildListUI::discard() +void MapWildListUI::discard() { - *qobject_cast(modified()) = *qobject_cast(original()); + *qobject_cast(modified()) = *qobject_cast(original()); setGui(); emit(changed(false)); } -void Sigmodr::Widgets::MapWildListUI::nameChanged(const QString& name) +void MapWildListUI::nameChanged(const QString& name) { const int cursor = ui_name->cursorPosition(); - qobject_cast(modified())->setName(name); + qobject_cast(modified())->setName(name); ui_name->setCursorPosition(cursor); } -- cgit