diff options
| author | Ben Boeckel <MathStuf@gmail.com> | 2008-05-07 02:08:51 +0000 |
|---|---|---|
| committer | Ben Boeckel <MathStuf@gmail.com> | 2008-05-07 02:08:51 +0000 |
| commit | 39a1b43adbebb73b87c4a2346b9ccb2c2a34753b (patch) | |
| tree | 08d55409c9d5b2149c4e8b341203dcbb42fa0a2c /pokemodr/TimeUI.cpp | |
| parent | 8714e1d409f46b05980b3e1e9f3a10910294b429 (diff) | |
| download | sigen-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/TimeUI.cpp')
| -rw-r--r-- | pokemodr/TimeUI.cpp | 21 |
1 files changed, 6 insertions, 15 deletions
diff --git a/pokemodr/TimeUI.cpp b/pokemodr/TimeUI.cpp index 402f2066..7b7874e8 100644 --- a/pokemodr/TimeUI.cpp +++ b/pokemodr/TimeUI.cpp @@ -21,9 +21,6 @@ // Pokemod includes #include "../pokemod/Time.h" -// General includes -#include "../general/BugCatcher.h" - TimeUI::TimeUI(Time* time, QWidget* parent) : ObjectUI(parent) { @@ -31,6 +28,10 @@ TimeUI::TimeUI(Time* time, QWidget* parent) : QMetaObject::connectSlotsByName(this); setObjects(time, new Time(*time)); 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(); } @@ -60,20 +61,10 @@ void TimeUI::on_buttonDiscard_clicked() void TimeUI::on_varName_textChanged(const QString& name) { static_cast<Time*>(modified())->setName(name); - emit(changed(true)); } void TimeUI::on_varTime_timeChanged(const QTime& time) { - try - { - static_cast<Time*>(modified())->setHour(time.hour()); - static_cast<Time*>(modified())->setMinute(time.minute()); - emit(changed(true)); - } - catch (BoundsException& exception) - { - BugCatcher::report(exception); - setGui(); - } + static_cast<Time*>(modified())->setHour(time.hour()); + static_cast<Time*>(modified())->setMinute(time.minute()); } |
