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/CoinListUI.cpp | 32 ++++++++++++++++++-------------- 1 file changed, 18 insertions(+), 14 deletions(-) (limited to 'sigmodr/widgets/CoinListUI.cpp') diff --git a/sigmodr/widgets/CoinListUI.cpp b/sigmodr/widgets/CoinListUI.cpp index 153214fe..4448a984 100644 --- a/sigmodr/widgets/CoinListUI.cpp +++ b/sigmodr/widgets/CoinListUI.cpp @@ -32,13 +32,17 @@ #include #include -Sigmodr::Widgets::CoinListUI::CoinListUI(Sigmod::CoinList* coinList, QWidget* parent) : +using namespace Sigcore; +using namespace Sigmod; +using namespace Sigmodr::Widgets; + +CoinListUI::CoinListUI(CoinList* coinList, QWidget* parent) : ObjectUI(parent) { - setObjects(coinList, new Sigmod::CoinList(*coinList)); + setObjects(coinList, new CoinList(*coinList)); } -void Sigmodr::Widgets::CoinListUI::initGui() +void CoinListUI::initGui() { QFile file(":/gui/coinlist.ui"); file.open(QFile::ReadOnly); @@ -50,33 +54,33 @@ void Sigmodr::Widgets::CoinListUI::initGui() connect(ui_script, SIGNAL(valueChanged(Sigcore::Script)), this, SLOT(scriptChanged(Sigcore::Script))); } -void Sigmodr::Widgets::CoinListUI::setGui() +void CoinListUI::setGui() { - ui_name->setText(qobject_cast(modified())->name()); - ui_script->setValue(qobject_cast(modified())->script()); + ui_name->setText(qobject_cast(modified())->name()); + ui_script->setValue(qobject_cast(modified())->script()); } -void Sigmodr::Widgets::CoinListUI::apply() +void CoinListUI::apply() { - *qobject_cast(original()) = *qobject_cast(modified()); + *qobject_cast(original()) = *qobject_cast(modified()); emit(changed(false)); } -void Sigmodr::Widgets::CoinListUI::discard() +void CoinListUI::discard() { - *qobject_cast(modified()) = *qobject_cast(original()); + *qobject_cast(modified()) = *qobject_cast(original()); setGui(); emit(changed(false)); } -void Sigmodr::Widgets::CoinListUI::nameChanged(const QString& name) +void CoinListUI::nameChanged(const QString& name) { const int cursor = ui_name->cursorPosition(); - qobject_cast(modified())->setName(name); + qobject_cast(modified())->setName(name); ui_name->setCursorPosition(cursor); } -void Sigmodr::Widgets::CoinListUI::scriptChanged(const Sigcore::Script& script) +void CoinListUI::scriptChanged(const Script& script) { - qobject_cast(modified())->setScript(script); + qobject_cast(modified())->setScript(script); } -- cgit