summaryrefslogtreecommitdiffstats
path: root/pokemodr/CoinListUI.cpp
diff options
context:
space:
mode:
authorBen Boeckel <MathStuf@gmail.com>2008-05-07 02:08:51 +0000
committerBen Boeckel <MathStuf@gmail.com>2008-05-07 02:08:51 +0000
commit39a1b43adbebb73b87c4a2346b9ccb2c2a34753b (patch)
tree08d55409c9d5b2149c4e8b341203dcbb42fa0a2c /pokemodr/CoinListUI.cpp
parent8714e1d409f46b05980b3e1e9f3a10910294b429 (diff)
downloadsigen-39a1b43adbebb73b87c4a2346b9ccb2c2a34753b.tar.gz
sigen-39a1b43adbebb73b87c4a2346b9ccb2c2a34753b.tar.xz
sigen-39a1b43adbebb73b87c4a2346b9ccb2c2a34753b.zip
[FIX] Added Q_OBJECT to pokemod classes
[FIX] UI classes fixed to work with new API [FIX] Qmake files fixed git-svn-id: https://pokegen.svn.sourceforge.net/svnroot/pokegen/trunk@121 6ecfd1a5-f3ed-3746-8530-beee90d26b22
Diffstat (limited to 'pokemodr/CoinListUI.cpp')
-rw-r--r--pokemodr/CoinListUI.cpp19
1 files changed, 5 insertions, 14 deletions
diff --git a/pokemodr/CoinListUI.cpp b/pokemodr/CoinListUI.cpp
index 54355187..b46bf4a0 100644
--- a/pokemodr/CoinListUI.cpp
+++ b/pokemodr/CoinListUI.cpp
@@ -24,9 +24,6 @@
#include "../pokemod/ItemEffect.h"
#include "../pokemod/Pokemod.h"
-// General includes
-#include "../general/BugCatcher.h"
-
CoinListUI::CoinListUI(CoinList* coinList, QWidget* parent) :
ObjectUI(parent)
{
@@ -34,6 +31,10 @@ CoinListUI::CoinListUI(CoinList* coinList, QWidget* parent) :
QMetaObject::connectSlotsByName(this);
setObjects(coinList, new CoinList(*coinList));
connect(this, SIGNAL(changed(bool)), boxButtons, SLOT(setEnabled(bool)));
+ connect(modified(), SIGNAL(error()), this, SLOT(setGui()));
+ connect(modified(), SIGNAL(error(QString&)), this, SLOT(errorMessage(QString&)));
+ connect(modified(), SIGNAL(warning(QString&)), this, SLOT(warningMessage(QString&)));
+ connect(modified(), SIGNAL(changed()), this, SIGNAL(changed(true)));
init();
}
@@ -81,19 +82,9 @@ void CoinListUI::on_buttonDiscard_clicked()
void CoinListUI::on_varName_textChanged(const QString& name)
{
static_cast<CoinList*>(modified())->setName(name);
- emit(changed(true));
}
void CoinListUI::on_varValue_currentIndexChanged(const int value)
{
- try
- {
- static_cast<CoinList*>(modified())->setValue(varValue->itemData(value).toInt());
- emit(changed(true));
- }
- catch (Exception& exception)
- {
- BugCatcher::report(exception);
- setGui();
- }
+ static_cast<CoinList*>(modified())->setValue(varValue->itemData(value).toInt());
}