diff options
| author | Ben Boeckel <MathStuf@gmail.com> | 2009-02-23 20:24:14 -0500 |
|---|---|---|
| committer | Ben Boeckel <MathStuf@gmail.com> | 2009-02-23 20:28:12 -0500 |
| commit | cd9396d859cbba795c945796a6a0790a6c5c00a3 (patch) | |
| tree | 7ee18954a884e430b685b64686d8985ecf6c9a86 /sigmodr/widgets/StoreUI.cpp | |
| parent | 3479836bc56ed61f53ecd4aefa4a83a5378901a8 (diff) | |
| download | sigen-cd9396d859cbba795c945796a6a0790a6c5c00a3.tar.gz sigen-cd9396d859cbba795c945796a6a0790a6c5c00a3.tar.xz sigen-cd9396d859cbba795c945796a6a0790a6c5c00a3.zip | |
Moved the sources into the Widgets namespace
Diffstat (limited to 'sigmodr/widgets/StoreUI.cpp')
| -rw-r--r-- | sigmodr/widgets/StoreUI.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/sigmodr/widgets/StoreUI.cpp b/sigmodr/widgets/StoreUI.cpp index f5aae74f..4b598179 100644 --- a/sigmodr/widgets/StoreUI.cpp +++ b/sigmodr/widgets/StoreUI.cpp @@ -26,18 +26,18 @@ // Qt includes #include <QtGui/QListWidgetItem> -Sigmodr::StoreUI::StoreUI(Sigmod::Store* store, QWidget* parent) : +Sigmodr::Widgets::StoreUI::StoreUI(Sigmod::Store* store, QWidget* parent) : ObjectUI(parent) { setupUi(this); setObjects(store, new Sigmod::Store(*store)); } -Sigmodr::StoreUI::~StoreUI() +Sigmodr::Widgets::StoreUI::~StoreUI() { } -void Sigmodr::StoreUI::refreshGui() +void Sigmodr::Widgets::StoreUI::refreshGui() { const bool blockedItems = varItems->blockSignals(true); varItems->availableListWidget()->clear(); @@ -52,7 +52,7 @@ void Sigmodr::StoreUI::refreshGui() varItems->setButtonsEnabled(); } -void Sigmodr::StoreUI::setGui() +void Sigmodr::Widgets::StoreUI::setGui() { varName->setText(qobject_cast<Sigmod::Store*>(modified())->name()); for (int i = 0; i < varItems->availableListWidget()->count(); ++i) @@ -70,33 +70,33 @@ void Sigmodr::StoreUI::setGui() varItems->setButtonsEnabled(); } -void Sigmodr::StoreUI::apply() +void Sigmodr::Widgets::StoreUI::apply() { *qobject_cast<Sigmod::Store*>(original()) = *qobject_cast<Sigmod::Store*>(modified()); emit(changed(false)); } -void Sigmodr::StoreUI::discard() +void Sigmodr::Widgets::StoreUI::discard() { *qobject_cast<Sigmod::Store*>(modified()) = *qobject_cast<Sigmod::Store*>(original()); setGui(); emit(changed(false)); } -void Sigmodr::StoreUI::on_varName_textChanged(const QString& name) +void Sigmodr::Widgets::StoreUI::on_varName_textChanged(const QString& name) { const int cursor = varName->cursorPosition(); qobject_cast<Sigmod::Store*>(modified())->setName(name); varName->setCursorPosition(cursor); } -void Sigmodr::StoreUI::on_varItems_added(QListWidgetItem* item) +void Sigmodr::Widgets::StoreUI::on_varItems_added(QListWidgetItem* item) { qobject_cast<Sigmod::Store*>(modified())->setItem(item->data(Qt::UserRole).toInt(), true); setGui(); } -void Sigmodr::StoreUI::on_varItems_removed(QListWidgetItem* item) +void Sigmodr::Widgets::StoreUI::on_varItems_removed(QListWidgetItem* item) { qobject_cast<Sigmod::Store*>(modified())->setItem(item->data(Qt::UserRole).toInt(), false); setGui(); |
