diff options
| author | Ben Boeckel <MathStuf@gmail.com> | 2009-02-26 01:32:12 -0500 |
|---|---|---|
| committer | Ben Boeckel <MathStuf@gmail.com> | 2009-02-26 01:32:12 -0500 |
| commit | 5c063d1130d4b634acc7d65ff64bf992f78ace0a (patch) | |
| tree | 7f5c245eea7c9bc2bf215571864f17fc435498c5 | |
| parent | b353742945c272b80bee3f2a8c98fd3c1032f8c5 (diff) | |
| download | sigen-5c063d1130d4b634acc7d65ff64bf992f78ace0a.tar.gz sigen-5c063d1130d4b634acc7d65ff64bf992f78ace0a.tar.xz sigen-5c063d1130d4b634acc7d65ff64bf992f78ace0a.zip | |
Make ItemType widget have a refreshGui method
| -rw-r--r-- | sigmodr/widgets/ItemTypeUI.cpp | 6 | ||||
| -rw-r--r-- | sigmodr/widgets/ItemTypeUI.h | 1 |
2 files changed, 6 insertions, 1 deletions
diff --git a/sigmodr/widgets/ItemTypeUI.cpp b/sigmodr/widgets/ItemTypeUI.cpp index ebae18ff..c1427631 100644 --- a/sigmodr/widgets/ItemTypeUI.cpp +++ b/sigmodr/widgets/ItemTypeUI.cpp @@ -58,13 +58,17 @@ void ItemTypeUI::initGui() connect(ui_player, SIGNAL(valueChanged(int)), this, SLOT(playerChanged(int))); connect(ui_maxWeight, SIGNAL(valueChanged(int)), this, SLOT(maxWeightChanged(int))); connect(ui_count, SIGNAL(currentIndexChanged(int)), this, SLOT(countChanged(int))); - ui_maxWeight->setMaximum(game()->rules()->maxTotalWeight()); QVBoxLayout* layout = new QVBoxLayout; layout->addWidget(formWidget); setLayout(layout); ui_count->addItems(ItemType::CountStr); } +void ItemTypeUI::refreshGui() +{ + ui_maxWeight->setMaximum(game()->rules()->maxTotalWeight()); +} + void ItemTypeUI::setGui() { ui_name->setText(qobject_cast<ItemType*>(modified())->name()); diff --git a/sigmodr/widgets/ItemTypeUI.h b/sigmodr/widgets/ItemTypeUI.h index c7e8dbd6..dc713970 100644 --- a/sigmodr/widgets/ItemTypeUI.h +++ b/sigmodr/widgets/ItemTypeUI.h @@ -57,6 +57,7 @@ class SIGMODRWIDGETS_EXPORT ItemTypeUI : public ObjectUI KComboBox* ui_count; private slots: void initGui(); + void refreshGui(); void setGui(); }; } |
