diff options
| author | Ben Boeckel <MathStuf@gmail.com> | 2009-02-24 21:21:41 -0500 |
|---|---|---|
| committer | Ben Boeckel <MathStuf@gmail.com> | 2009-02-24 21:26:04 -0500 |
| commit | 4acab35a099e9f6834432e7e89dee716c41549ba (patch) | |
| tree | f8c50f0d94914e23443e85469aa13b6293932901 /sigmodr/widgets/CoinListUI.cpp | |
| parent | 4b2969cf969ba5db1d63438c5964daddec65a9c9 (diff) | |
Fixed Sigmodr widgets to use namespaces in sources
Diffstat (limited to 'sigmodr/widgets/CoinListUI.cpp')
| -rw-r--r-- | sigmodr/widgets/CoinListUI.cpp | 32 |
1 files changed, 18 insertions, 14 deletions
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 <QtCore/QFile> #include <QtUiTools/QUiLoader> -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<Sigmod::CoinList*>(modified())->name()); - ui_script->setValue(qobject_cast<Sigmod::CoinList*>(modified())->script()); + ui_name->setText(qobject_cast<CoinList*>(modified())->name()); + ui_script->setValue(qobject_cast<CoinList*>(modified())->script()); } -void Sigmodr::Widgets::CoinListUI::apply() +void CoinListUI::apply() { - *qobject_cast<Sigmod::CoinList*>(original()) = *qobject_cast<Sigmod::CoinList*>(modified()); + *qobject_cast<CoinList*>(original()) = *qobject_cast<CoinList*>(modified()); emit(changed(false)); } -void Sigmodr::Widgets::CoinListUI::discard() +void CoinListUI::discard() { - *qobject_cast<Sigmod::CoinList*>(modified()) = *qobject_cast<Sigmod::CoinList*>(original()); + *qobject_cast<CoinList*>(modified()) = *qobject_cast<CoinList*>(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<Sigmod::CoinList*>(modified())->setName(name); + qobject_cast<CoinList*>(modified())->setName(name); ui_name->setCursorPosition(cursor); } -void Sigmodr::Widgets::CoinListUI::scriptChanged(const Sigcore::Script& script) +void CoinListUI::scriptChanged(const Script& script) { - qobject_cast<Sigmod::CoinList*>(modified())->setScript(script); + qobject_cast<CoinList*>(modified())->setScript(script); } |
