diff options
author | Ben Boeckel <MathStuf@gmail.com> | 2008-02-28 02:18:33 +0000 |
---|---|---|
committer | Ben Boeckel <MathStuf@gmail.com> | 2008-02-28 02:18:33 +0000 |
commit | d26c1c706f1f386ef7813a0499ea3eda3ec43e10 (patch) | |
tree | 20ff2faf90e279b1a9501203a4c8d1e31402b39d /pokemodr/MapWildListUI.cpp | |
parent | d52f6c9f71c1ee94539fe94bd821df608d7ee602 (diff) | |
download | sigen-d26c1c706f1f386ef7813a0499ea3eda3ec43e10.tar.gz sigen-d26c1c706f1f386ef7813a0499ea3eda3ec43e10.tar.xz sigen-d26c1c706f1f386ef7813a0499ea3eda3ec43e10.zip |
[FIX] UI classes now have initGui and refreshGui
[FIX] PokeModTreeItem now is the monster class rather than PokeModrUI
git-svn-id: https://pokegen.svn.sourceforge.net/svnroot/pokegen/trunk@88 6ecfd1a5-f3ed-3746-8530-beee90d26b22
Diffstat (limited to 'pokemodr/MapWildListUI.cpp')
-rw-r--r-- | pokemodr/MapWildListUI.cpp | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/pokemodr/MapWildListUI.cpp b/pokemodr/MapWildListUI.cpp index 83ef2665..86a66e4b 100644 --- a/pokemodr/MapWildListUI.cpp +++ b/pokemodr/MapWildListUI.cpp @@ -44,7 +44,18 @@ MapWildListUI::MapWildListUI(MapWildList* w, QWidget* parent) : QMetaObject::connectSlotsByName(this); setObjects(mapWildList, mapWildList_mod); connect(this, SIGNAL(changed(bool)), boxButtons, SLOT(setEnabled(bool))); + init(); +} + +void MapWildListUI::initGui() +{ varControl->addItems(MapWildList::ControlStr); +} + +void MapWildListUI::refreshGui() +{ + varValue->clear(); + varScope->clear(); for (int i = 0; i < mapWildList->getPokemod()->getItemCount(); ++i) { const Item* it = mapWildList->getPokemod()->getItem(i); @@ -63,21 +74,15 @@ MapWildListUI::MapWildListUI(MapWildList* w, QWidget* parent) : } } } + varTimes->clear(); for (int i = 0; i < mapWildList->getPokemod()->getTimeCount(); ++i) { const Time* t = mapWildList->getPokemod()->getTime(i); QListWidgetItem* lwi = new QListWidgetItem(t->getName(), varTimes); lwi->setData(Qt::UserRole, t->getId()); } - setGui(); - emit(changed(false)); } -// KToolbar getToolbar(QWidget* parent) -// { -// -// } - void MapWildListUI::setGui() { varControl->setCurrentIndex(mapWildList_mod->getControl()); |