summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Changelog21
-rw-r--r--battle/battle.pro28
-rw-r--r--general/Frac.cpp2
-rw-r--r--menus/menus.pro19
-rw-r--r--overworld/overworld.pro19
-rw-r--r--pokegen/pokegen.pro25
-rw-r--r--pokemod/Badge.cpp12
-rw-r--r--pokemod/Species.cpp59
-rw-r--r--pokemod/Species.h10
-rw-r--r--pokemod/Tile.cpp21
-rw-r--r--pokemod/Tile.h3
-rw-r--r--pokemodr/AbilityUI.cpp1
-rw-r--r--pokemodr/AbilityUI.h4
-rw-r--r--pokemodr/AuthorUI.cpp4
-rw-r--r--pokemodr/AuthorUI.h4
-rw-r--r--pokemodr/BadgeUI.cpp37
-rw-r--r--pokemodr/BadgeUI.h10
-rw-r--r--pokemodr/CoinListObjectUI.cpp14
-rw-r--r--pokemodr/CoinListObjectUI.h5
-rw-r--r--pokemodr/CoinListUI.cpp13
-rw-r--r--pokemodr/CoinListUI.h6
-rw-r--r--pokemodr/EggGroupUI.cpp1
-rw-r--r--pokemodr/EggGroupUI.h6
-rw-r--r--pokemodr/ImageDialog.h1
-rw-r--r--pokemodr/ItemTypeUI.cpp6
-rw-r--r--pokemodr/ItemTypeUI.h6
-rw-r--r--pokemodr/ItemUI.cpp9
-rw-r--r--pokemodr/ItemUI.h6
-rw-r--r--pokemodr/MapUI.cpp9
-rw-r--r--pokemodr/MapUI.h6
-rw-r--r--pokemodr/MoveUI.cpp11
-rw-r--r--pokemodr/MoveUI.h6
-rw-r--r--pokemodr/NatureUI.cpp19
-rw-r--r--pokemodr/NatureUI.h7
-rw-r--r--pokemodr/ObjectUI.h6
-rw-r--r--pokemodr/PokeModTreeItem.h3
-rw-r--r--pokemodr/PokeModr.cpp6
-rw-r--r--pokemodr/PokeModrUI.cpp8
-rw-r--r--pokemodr/PokeModrUI.h5
-rw-r--r--pokemodr/RulesUI.cpp8
-rw-r--r--pokemodr/RulesUI.h5
-rw-r--r--pokemodr/SpeciesAbilityUI.cpp14
-rw-r--r--pokemodr/SpeciesAbilityUI.h5
-rw-r--r--pokemodr/SpeciesEvolutionUI.cpp16
-rw-r--r--pokemodr/SpeciesEvolutionUI.h5
-rw-r--r--pokemodr/SpeciesItemUI.cpp14
-rw-r--r--pokemodr/SpeciesItemUI.h5
-rw-r--r--pokemodr/SpeciesMoveUI.cpp14
-rw-r--r--pokemodr/SpeciesMoveUI.h5
-rw-r--r--pokemodr/SpeciesUI.cpp446
-rw-r--r--pokemodr/SpeciesUI.h87
-rw-r--r--pokemodr/StoreUI.cpp13
-rw-r--r--pokemodr/StoreUI.h6
-rw-r--r--pokemodr/TileDelegate.cpp7
-rw-r--r--pokemodr/TileUI.cpp18
-rw-r--r--pokemodr/TileUI.h6
-rw-r--r--pokemodr/TilemapModel.cpp7
-rw-r--r--pokemodr/TilemapModel.h6
-rw-r--r--pokemodr/TimeUI.cpp6
-rw-r--r--pokemodr/TimeUI.h6
-rw-r--r--pokemodr/TypeUI.cpp8
-rw-r--r--pokemodr/TypeUI.h6
-rw-r--r--pokemodr/gui/badge.ui61
-rw-r--r--pokemodr/gui/move.ui4
-rw-r--r--pokemodr/gui/species.ui1197
65 files changed, 1724 insertions, 689 deletions
diff --git a/Changelog b/Changelog
index 3e95ce4f..f88d3c99 100644
--- a/Changelog
+++ b/Changelog
@@ -1,4 +1,25 @@
-----------------
+Rev: 69
+Date: 21 February 2008
+User: MathStuf
+-----------------
+[FIX] Frac now makes sure that the denominator is positive
+[FIX] Sprite-containing classes less repetative with determining paths
+[FIX] More include cleanup in pokemodr
+[FIX] Precision of Frac decimal equivalents now use a define
+[FIX] Species UI form is now more compact and complete
+[ADD] SpeciesUI.{h, cpp} (again; wasn't actually included last time and got lost)
+
+-----------------
+Rev: 68
+Date: 21 February 2008
+User: MathStuf
+-----------------
+[FIX] Species form now uses tabs so its not as gigantically tall
+[FIX] SpeciesUI files disappeared, so remade
+[FIX] Include cleanup in pokemodr
+
+-----------------
Rev: 67
Date: 20 February 2008
User: MathStuf
diff --git a/battle/battle.pro b/battle/battle.pro
index a4bb134c..6d2538e3 100644
--- a/battle/battle.pro
+++ b/battle/battle.pro
@@ -1,10 +1,24 @@
OBJECTS_DIR = .obj
-DESTDIR = ../../lib
-LANGUAGE = C++
-TEMPLATE = lib
-LIBS += -L../../lib -lgeneral -lpokemod
+DESTDIR = ../../lib
+TEMPLATE = lib
+LIBS += -L../../lib -lgeneral -lpokemod
-CONFIG += qt warn_on dll
+CONFIG += qt \
+warn_on \
+dll \
+exceptions
-SOURCES += *.cpp
-HEADERS += *.h
+INCLUDEPATH += ../pokemod \
+../general \
+/usr/lib64/kde4
+TARGETDEPS += ../../lib/libpokemod.so \
+../../lib/libgeneral.so
+SOURCES += Arena.cpp \
+Ghost.cpp \
+Team.cpp
+HEADERS += Arena.h \
+Bot.h \
+GhostBot.h \
+Ghost.h \
+Pokemon.h \
+Team.h
diff --git a/general/Frac.cpp b/general/Frac.cpp
index a47b005b..9cf47aca 100644
--- a/general/Frac.cpp
+++ b/general/Frac.cpp
@@ -24,7 +24,7 @@
void Frac::set(const int n, const int d) throw(Exception)
{
- if ((type == Improper) || ((n <= d) && (type == Proper)) || ((d < n) && (type == Over1)))
+ if (((type == Improper) || ((n <= d) && (type == Proper)) || ((d < n) && (type == Over1))) && (0 < d))
{
num = n;
denom = d;
diff --git a/menus/menus.pro b/menus/menus.pro
index a4bb134c..31799577 100644
--- a/menus/menus.pro
+++ b/menus/menus.pro
@@ -1,10 +1,13 @@
OBJECTS_DIR = .obj
-DESTDIR = ../../lib
-LANGUAGE = C++
-TEMPLATE = lib
-LIBS += -L../../lib -lgeneral -lpokemod
+DESTDIR = ../../lib
+TEMPLATE = lib
+LIBS += -L../../lib -lgeneral -lpokemod
-CONFIG += qt warn_on dll
-
-SOURCES += *.cpp
-HEADERS += *.h
+CONFIG += qt \
+warn_on \
+dll \
+exceptions
+INCLUDEPATH += ../pokemod \
+../general
+TARGETDEPS += ../../lib/libpokemod.so \
+../../lib/libgeneral.so
diff --git a/overworld/overworld.pro b/overworld/overworld.pro
index a4bb134c..31799577 100644
--- a/overworld/overworld.pro
+++ b/overworld/overworld.pro
@@ -1,10 +1,13 @@
OBJECTS_DIR = .obj
-DESTDIR = ../../lib
-LANGUAGE = C++
-TEMPLATE = lib
-LIBS += -L../../lib -lgeneral -lpokemod
+DESTDIR = ../../lib
+TEMPLATE = lib
+LIBS += -L../../lib -lgeneral -lpokemod
-CONFIG += qt warn_on dll
-
-SOURCES += *.cpp
-HEADERS += *.h
+CONFIG += qt \
+warn_on \
+dll \
+exceptions
+INCLUDEPATH += ../pokemod \
+../general
+TARGETDEPS += ../../lib/libpokemod.so \
+../../lib/libgeneral.so
diff --git a/pokegen/pokegen.pro b/pokegen/pokegen.pro
index 192c1b16..0ca2609c 100644
--- a/pokegen/pokegen.pro
+++ b/pokegen/pokegen.pro
@@ -1,10 +1,19 @@
OBJECTS_DIR = .obj
-DESTDIR = ../../bin
-LANGUAGE = C++
-TEMPLATE = app
-LIBS += -L../../lib -lgeneral -lpokemod -loverworld -lbattle -laudio -lmenus
+DESTDIR = ../../bin
+TEMPLATE = app
+LIBS += -L../../lib -lgeneral -lpokemod -loverworld -lbattle -laudio -lmenus
-CONFIG += qt gui warn_on dll
-
-SOURCES += *.cpp
-HEADERS += *.h
+CONFIG += qt \
+gui \
+warn_on \
+exceptions
+INCLUDEPATH += ../pokemod \
+../overworld \
+../menus \
+../general \
+../battle
+TARGETDEPS += ../../lib/libpokemod.so \
+../../lib/liboverworld.so \
+../../lib/libmenus.so \
+../../lib/libgeneral.so \
+../../lib/libbattle.so
diff --git a/pokemod/Badge.cpp b/pokemod/Badge.cpp
index 2f444cef..cdc150d1 100644
--- a/pokemod/Badge.cpp
+++ b/pokemod/Badge.cpp
@@ -61,12 +61,12 @@ bool Badge::validate() const
pokemod->validationMsg("Obey level out of range");
valid = false;
}
- if (!QFile(QString("%1/badge/%2/face.png").arg(pokemod->getPath()).arg(name)).exists())
+ if (!QFile(getFace()).exists())
{
pokemod->validationMsg("Cannot find the face sprite");
valid = false;
}
- if (!QFile(QString("%1/badge/%2/badge.png").arg(pokemod->getPath()).arg(name)).exists())
+ if (!QFile(getBadge()).exists())
{
pokemod->validationMsg("Cannot find the badge sprite");
valid = false;
@@ -118,19 +118,19 @@ void Badge::setName(const QString& n)
void Badge::setFace(const QString& f) throw(Exception)
{
- QFile file(QString("%1/badge/%2/face.png").arg(pokemod->getPath()).arg(name));
+ QFile file(getFace());
if (file.exists() && !file.remove())
throw(ReplaceException(className, file.fileName()));
- if (!QFile::copy(f, QString("%1/badge/%2/face.png").arg(pokemod->getPath()).arg(name)))
+ if (!QFile::copy(f, getFace()))
throw(SaveException(className, file.fileName()));
}
void Badge::setBadge(const QString& b) throw(Exception)
{
- QFile file(QString("%1/badge/%2/badge.png").arg(pokemod->getPath()).arg(name));
+ QFile file(getBadge());
if (file.exists() && !file.remove())
throw(ReplaceException(className, file.fileName()));
- if (!QFile::copy(b, QString("%1/badge/%2/badge.png").arg(pokemod->getPath()).arg(name)))
+ if (!QFile::copy(b, getBadge()))
throw(SaveException(className, file.fileName()));
}
diff --git a/pokemod/Species.cpp b/pokemod/Species.cpp
index 2cb92749..14433c5f 100644
--- a/pokemod/Species.cpp
+++ b/pokemod/Species.cpp
@@ -43,7 +43,7 @@ Species::Species(const Pokemod* par, const int _id) :
heightFeet(0),
heightInches(0),
pokedexEntry(""),
- genderFactor(1, 1, true),
+ genderFactor(1, 1),
eggSpecies(-1),
eggSteps(0),
nidoranGroup(-1)
@@ -101,30 +101,30 @@ bool Species::validate() const
pokemod->validationMsg("Invalid height inches");
valid = false;
}
- if (!QFile::exists(QString("%1/species/%2/front%3.png").arg(pokemod->getPath()).arg(name).arg(pokemod->getRules()->getGenderAllowed() ? "-male" : "")))
+ if (!QFile::exists(getFrontMaleSprite()))
{
pokemod->validationMsg(QString("Cannot find the front%1 image").arg(pokemod->getRules()->getGenderAllowed() ? " male" : ""));
valid = false;
}
- if (!QFile::exists(QString("%1/species/%2/back%3.png").arg(pokemod->getPath()).arg(name).arg(pokemod->getRules()->getGenderAllowed() ? "-male" : "")))
+ if (!QFile::exists(getBackMaleSprite()))
{
pokemod->validationMsg(QString("Cannot find the back%1 image").arg(pokemod->getRules()->getGenderAllowed() ? " male" : ""));
valid = false;
}
if (pokemod->getRules()->getGenderAllowed())
{
- if (!QFile::exists(QString("%1/species/%2/front-female.png").arg(pokemod->getPath()).arg(name)))
+ if (!QFile::exists(getFrontFemaleSprite()))
{
pokemod->validationMsg("Cannot find the front female image");
valid = false;
}
- if (!QFile::exists(QString("%1/species/%2/back-female.png").arg(pokemod->getPath()).arg(name)))
+ if (!QFile::exists(getBackFemaleSprite()))
{
pokemod->validationMsg("Cannot find the back female image");
valid = false;
}
}
- if (!QFile::exists(QString("%1/species/%2/list.png").arg(pokemod->getPath()).arg(name)))
+ if (!QFile::exists(getListSprite()))
{
pokemod->validationMsg("Cannot find the list sprite");
valid = false;
@@ -230,7 +230,7 @@ bool Species::validate() const
{
if (1 < i.value())
{
- pokemod->validationMsg(QString("There are %1 evoltions with the speices %2").arg(i.value()).arg(i.key()));
+ pokemod->validationMsg(QString("There are %1 evolutions with the speices %2").arg(i.value()).arg(i.key()));
valid = false;
}
}
@@ -553,19 +553,19 @@ void Species::setPokedexEntry(const QString& p)
void Species::setFrontMaleSprite(const QString& fname) throw(Exception)
{
- QFile file(QString("%1/species/%2/front%3.png").arg(pokemod->getPath()).arg(name).arg(pokemod->getRules()->getGenderAllowed() ? "-male" : ""));
+ QFile file(getFrontMaleSprite());
if (file.exists() && !file.remove())
throw(RemoveException(className, file.fileName()));
- if (!QFile::copy(fname, QString("%1/species/%2/front%3.png").arg(pokemod->getPath()).arg(name).arg(pokemod->getRules()->getGenderAllowed() ? "-male" : "")))
+ if (!QFile::copy(fname, getFrontMaleSprite()))
throw(SaveException(className, file.fileName()));
}
void Species::setBackMaleSprite(const QString& fname) throw(Exception)
{
- QFile file(QString("%1/species/%2/back%3.png").arg(pokemod->getPath()).arg(name).arg(pokemod->getRules()->getGenderAllowed() ? "-male" : ""));
+ QFile file(getBackMaleSprite());
if (file.exists() && !file.remove())
throw(RemoveException(className, file.fileName()));
- if (!QFile::copy(fname, QString("%1/species/%2/back%3.png").arg(pokemod->getPath()).arg(name).arg(pokemod->getRules()->getGenderAllowed() ? "-male" : "")))
+ if (!QFile::copy(fname, getBackMaleSprite()))
throw(SaveException(className, file.fileName()));
}
@@ -573,10 +573,10 @@ void Species::setFrontFemaleSprite(const QString& fname) throw(Exception)
{
if (!pokemod->getRules()->getGenderAllowed())
throw(Exception(className, "gender is not allowed"));
- QFile file(QString("%1/species/%2/front-female.png").arg(pokemod->getPath()).arg(name));
+ QFile file(getFrontFemaleSprite());
if (file.exists() && !file.remove())
throw(RemoveException(className, file.fileName()));
- if (!QFile::copy(fname, QString("%1/species/%2/front-female.png").arg(pokemod->getPath()).arg(name)))
+ if (!QFile::copy(fname, getFrontFemaleSprite()))
throw(SaveException(className, file.fileName()));
}
@@ -584,19 +584,19 @@ void Species::setBackFemaleSprite(const QString& fname) throw(Exception)
{
if (!pokemod->getRules()->getGenderAllowed())
throw(Exception(className, "gender is not allowed"));
- QFile file(QString("%1/species/%2/back-female.png").arg(pokemod->getPath()).arg(name));
+ QFile file(getBackFemaleSprite());
if (file.exists() && !file.remove())
throw(RemoveException(className, file.fileName()));
- if (!QFile::copy(fname, QString("%1/species/%2/back-female.png").arg(pokemod->getPath()).arg(name)))
+ if (!QFile::copy(fname, getBackFemaleSprite()))
throw(SaveException(className, file.fileName()));
}
void Species::setListSprite(const QString& fname) throw(Exception)
{
- QFile file(QString("%1/species/%2/list.png").arg(pokemod->getPath()).arg(name));
+ QFile file(getListSprite());
if (file.exists() && !file.remove())
throw(RemoveException(className, file.fileName()));
- if (!QFile::copy(fname, QString("%1/species/%2/list.png").arg(pokemod->getPath()).arg(name)))
+ if (!QFile::copy(fname, getListSprite()))
throw(SaveException(className, file.fileName()));
}
@@ -739,6 +739,31 @@ QString Species::getPokedexEntry() const
return pokedexEntry;
}
+QString Species::getFrontMaleSprite() const
+{
+ return QString("%1/species/%2/front-male.png").arg(pokemod->getPath()).arg(name);
+}
+
+QString Species::getBackMaleSprite() const
+{
+ return QString("%1/species/%2/back-male.png").arg(pokemod->getPath()).arg(name);
+}
+
+QString Species::getFrontFemaleSprite() const
+{
+ return QString("%1/species/%2/front-female.png").arg(pokemod->getPath()).arg(name);
+}
+
+QString Species::getBackFemaleSprite() const
+{
+ return QString("%1/species/%2/back-female.png").arg(pokemod->getPath()).arg(name);
+}
+
+QString Species::getListSprite() const
+{
+ return QString("%1/species/%2/list.png").arg(pokemod->getPath()).arg(name);
+}
+
Frac Species::getGenderFactor() const
{
return genderFactor;
diff --git a/pokemod/Species.h b/pokemod/Species.h
index 13e48ec6..11410b9e 100644
--- a/pokemod/Species.h
+++ b/pokemod/Species.h
@@ -105,11 +105,11 @@ class Species : public Object
int getHeightFeet() const;
int getHeightInches() const;
QString getPokedexEntry() const;
- bool getFrontMaleSprite() const;
- bool getBackMaleSprite() const;
- bool getFrontFemaleSprite() const;
- bool getBackFemaleSprite() const;
- bool getListSprite() const;
+ QString getFrontMaleSprite() const;
+ QString getBackMaleSprite() const;
+ QString getFrontFemaleSprite() const;
+ QString getBackFemaleSprite() const;
+ QString getListSprite() const;
Frac getGenderFactor() const;
int getEggSpecies() const;
int getEggSteps() const;
diff --git a/pokemod/Tile.cpp b/pokemod/Tile.cpp
index 7f9e319e..11043882 100644
--- a/pokemod/Tile.cpp
+++ b/pokemod/Tile.cpp
@@ -28,7 +28,6 @@ const QStringList Tile::ForceStr = QStringList() << "Slip" << "Stop" << "Force"
Tile::Tile(const Pokemod* par, const int _id) :
Object("Tile", par, _id),
name(""),
- pic(""),
wildChance(1, 1),
hmType(-1),
under(-1),
@@ -46,8 +45,7 @@ Tile::Tile(const Pokemod* par, const Tile& t, const int _id) :
}
Tile::Tile(const Pokemod* par, const QString& fname, const int _id) :
- Object("Tile", par, _id),
- pic("")
+ Object("Tile", par, _id)
{
load(fname, _id);
}
@@ -61,7 +59,7 @@ bool Tile::validate() const
pokemod->validationMsg("Name is not defined");
valid = false;
}
- if (!QFile::exists(QString("%1/image/tile/%2.png").arg(pokemod->getPath()).arg(pic)))
+ if (!QFile::exists(getPic()))
{
pokemod->validationMsg("Cannot find tile image");
valid = false;
@@ -112,7 +110,6 @@ void Tile::load(const QString& fname, const int _id) throw(Exception)
int i;
int j;
ini.getValue("name", name);
- ini.getValue("pic", pic);
ini.getValue("from-up", from[D_Up], false);
ini.getValue("from-down", from[D_Down], false);
ini.getValue("from-left", from[D_Left], false);
@@ -131,7 +128,6 @@ void Tile::save() const throw(Exception)
Ini ini;
ini.addField("id", id);
ini.addField("name", name);
- ini.addField("pic", pic);
ini.addField("from-up", from[D_Up]);
ini.addField("from-down", from[D_Down]);
ini.addField("from-left", from[D_Left]);
@@ -150,11 +146,13 @@ void Tile::setName(const QString& n)
name = n;
}
-void Tile::setPic(const QString& p) throw(OpenException)
+void Tile::setPic(const QString& fname) throw(Exception)
{
- if (!QFile::exists(QString("%1/image/tile/%2.png").arg(pokemod->getPath()).arg(p)))
- throw(OpenException(className, QString("%1/image/tile/%2.png").arg(pokemod->getPath()).arg(p)));
- pic = p;
+ QFile file(getPic());
+ if (file.exists() && !file.remove())
+ throw(RemoveException(className, file.fileName()));
+ if (!QFile::copy(fname, getPic()))
+ throw(SaveException(className, file.fileName()));
}
void Tile::setFrom(const int d, const bool f) throw(BoundsException)
@@ -225,7 +223,7 @@ QString Tile::getName() const
QString Tile::getPic() const
{
- return pic;
+ return QString("%1/tile/%2.png").arg(pokemod->getPath()).arg(name);
}
bool Tile::getFrom(const int d) const throw(BoundsException)
@@ -265,7 +263,6 @@ Tile& Tile::operator=(const Tile& rhs)
if (this == &rhs)
return *this;
name = rhs.name;
- pic = rhs.pic;
for (int i = 0; i < D_End; ++i)
from[i] = rhs.from[i];
wildChance = rhs.wildChance;
diff --git a/pokemod/Tile.h b/pokemod/Tile.h
index f2825be2..32441e92 100644
--- a/pokemod/Tile.h
+++ b/pokemod/Tile.h
@@ -55,7 +55,7 @@ class Tile : public Object
void save() const throw(Exception);
void setName(const QString& n);
- void setPic(const QString& p) throw(OpenException);
+ void setPic(const QString& p) throw(Exception);
void setFrom(const int d, const bool f) throw(BoundsException);
void setWildChance(const int n, const int d) throw(Exception);
void setWildChanceNum(const int n) throw(Exception);
@@ -79,7 +79,6 @@ class Tile : public Object
bool validate() const;
QString name;
- QString pic;
bool from[D_End];
Frac wildChance;
int hmType;
diff --git a/pokemodr/AbilityUI.cpp b/pokemodr/AbilityUI.cpp
index dccbfa2d..b41cadb1 100644
--- a/pokemodr/AbilityUI.cpp
+++ b/pokemodr/AbilityUI.cpp
@@ -21,6 +21,7 @@
/////////////////////////////////////////////////////////////////////////////
#include <QMetaObject>
+
#include "AbilityUI.h"
AbilityUI::AbilityUI(Ability* a, QWidget* parent) :
diff --git a/pokemodr/AbilityUI.h b/pokemodr/AbilityUI.h
index 8f9c183f..52ddb22d 100644
--- a/pokemodr/AbilityUI.h
+++ b/pokemodr/AbilityUI.h
@@ -25,7 +25,9 @@
#include <ktoolbar.h>
#include <QString>
-#include "../pokemod/Ability.h"
+
+#include <Ability.h>
+
#include "ObjectUI.h"
#include "ui_ability.h"
diff --git a/pokemodr/AuthorUI.cpp b/pokemodr/AuthorUI.cpp
index eb143373..413ea775 100644
--- a/pokemodr/AuthorUI.cpp
+++ b/pokemodr/AuthorUI.cpp
@@ -21,7 +21,9 @@
/////////////////////////////////////////////////////////////////////////////
#include <QMetaObject>
-#include "../general/Exception.h"
+
+#include <Exception.h>
+
#include "AuthorUI.h"
AuthorUI::AuthorUI(Author* a, QWidget* parent) :
diff --git a/pokemodr/AuthorUI.h b/pokemodr/AuthorUI.h
index 7ad46ba7..d94b1f54 100644
--- a/pokemodr/AuthorUI.h
+++ b/pokemodr/AuthorUI.h
@@ -25,7 +25,9 @@
#include <ktoolbar.h>
#include <QString>
-#include "../pokemod/Author.h"
+
+#include <Author.h>
+
#include "ObjectUI.h"
#include "ui_author.h"
diff --git a/pokemodr/BadgeUI.cpp b/pokemodr/BadgeUI.cpp
index 5f0e46e5..c6edda26 100644
--- a/pokemodr/BadgeUI.cpp
+++ b/pokemodr/BadgeUI.cpp
@@ -22,17 +22,19 @@
#include <QListWidgetItem>
#include <QMetaObject>
-#include "../general/BugCatcher.h"
-#include "../general/Exception.h"
-#include "../general/ImageCache.h"
-#include "../general/Ref.h"
-#include "../pokemod/Pokemod.h"
+
+#include <BugCatcher.h>
+#include <Exception.h>
+#include <ImageCache.h>
+#include <Ref.h>
+
+#include <Pokemod.h>
+
#include "ImageDialog.h"
#include "BadgeUI.h"
BadgeUI::BadgeUI(Badge* b, QWidget* parent) :
ObjectUI(parent),
- curStat(ST_HP),
badge(b),
badge_mod(new Badge(b->getPokemod(), *b, b->getId()))
{
@@ -55,20 +57,26 @@ void BadgeUI::setGui()
varName->setText(badge_mod->getName());
varObey->setMaximum(badge->getPokemod()->getRules()->getMaxLevel());
varObey->setValue(badge_mod->getObey());
- varStat->setCurrentIndex(curStat);
try
{
varFace->setIcon(ImageCache::open(badge_mod->getFace()));
+ }
+ catch (OpenException& e)
+ {
+ BugCatcher::report(e);
+ }
+ try
+ {
varBadge->setIcon(ImageCache::open(badge_mod->getBadge()));
}
catch (OpenException& e)
{
BugCatcher::report(e);
}
- varMultiplierNum->setValue(badge_mod->getStat(curStat).getNum());
- varMultiplierDenom->setValue(badge_mod->getStat(curStat).getDenom());
- varMultiplierNum->setMaximum(badge_mod->getStat(curStat).getDenom());
- varMultiplier->setText(QString::number(badge_mod->getStat(curStat), 'g', 15));
+ varMultiplierNum->setValue(badge_mod->getStat(varStat->currentIndex()).getNum());
+ varMultiplierDenom->setValue(badge_mod->getStat(varStat->currentIndex()).getDenom());
+ varMultiplierNum->setMaximum(badge_mod->getStat(varStat->currentIndex()).getDenom());
+ varMultiplier->setText(QString::number(badge_mod->getStat(varStat->currentIndex()), 'g', DBL_PREC));
for (unsigned i = 0; i < HM_End_All; ++i)
varHMs->item(i)->setSelected(badge_mod->getHm(i));
}
@@ -138,9 +146,8 @@ void BadgeUI::on_varBadge_pressed()
}
}
-void BadgeUI::on_varStat_currentIndexChanged(const int s)
+void BadgeUI::on_varStat_currentIndexChanged()
{
- curStat = s;
emit(setChanged(true));
setGui();
}
@@ -149,7 +156,7 @@ void BadgeUI::on_varMultiplierNum_valueChanged(const int m)
{
try
{
- badge_mod->setStatNum(curStat, m);
+ badge_mod->setStatNum(varStat->currentIndex(), m);
emit(setChanged(true));
}
catch (Exception& e)
@@ -163,7 +170,7 @@ void BadgeUI::on_varMultiplierDenom_valueChanged(const int m)
{
try
{
- badge_mod->setStatDenom(curStat, m);
+ badge_mod->setStatDenom(varStat->currentIndex(), m);
emit(setChanged(true));
}
catch (Exception& e)
diff --git a/pokemodr/BadgeUI.h b/pokemodr/BadgeUI.h
index 60579a0a..0f93152a 100644
--- a/pokemodr/BadgeUI.h
+++ b/pokemodr/BadgeUI.h
@@ -24,9 +24,13 @@
#define __POKEMODR_BADGEUI__
#include <ktoolbar.h>
+
#include <QString>
-#include "../pokemod/Badge.h"
+
+#include <Badge.h>
+
#include "ObjectUI.h"
+
#include "ui_badge.h"
class BadgeUI : public ObjectUI, private Ui::formBadge
@@ -48,15 +52,13 @@ class BadgeUI : public ObjectUI, private Ui::formBadge
void on_varObey_valueChanged(const int o);
void on_varFace_pressed();
void on_varBadge_pressed();
- void on_varStat_currentIndexChanged(const int s);
+ void on_varStat_currentIndexChanged();
void on_varMultiplierNum_valueChanged(const int m);
void on_varMultiplierDenom_valueChanged(const int m);
void on_varHMs_itemSelectionChanged();
private:
void setGui();
- int curStat;
-
Badge* badge;
Badge* badge_mod;
};
diff --git a/pokemodr/CoinListObjectUI.cpp b/pokemodr/CoinListObjectUI.cpp
index 55879c8a..5f5606e3 100644
--- a/pokemodr/CoinListObjectUI.cpp
+++ b/pokemodr/CoinListObjectUI.cpp
@@ -21,13 +21,15 @@
/////////////////////////////////////////////////////////////////////////////
#include <QMetaObject>
-#include <QStringListModel>
#include <QVariant>
-#include "../general/BugCatcher.h"
-#include "../general/Exception.h"
-#include "../pokemod/Item.h"
-#include "../pokemod/ItemEffect.h"
-#include "../pokemod/Pokemod.h"
+
+#include <BugCatcher.h>
+#include <Exception.h>
+
+#include <Item.h>
+#include <ItemEffect.h>
+#include <Pokemod.h>
+
#include "CoinListObjectUI.h"
CoinListObjectUI::CoinListObjectUI(CoinListObject* c, QWidget* parent) :
diff --git a/pokemodr/CoinListObjectUI.h b/pokemodr/CoinListObjectUI.h
index 69890868..fbd7da60 100644
--- a/pokemodr/CoinListObjectUI.h
+++ b/pokemodr/CoinListObjectUI.h
@@ -24,8 +24,11 @@
#define __POKEMODR_COINLISTOBJECTUI__
#include <ktoolbar.h>
-#include "../pokemod/CoinListObject.h"
+
+#include <CoinListObject.h>
+
#include "ObjectUI.h"
+
#include "ui_coinlistobject.h"
class CoinListObjectUI : public ObjectUI, private Ui::formCoinListObject
diff --git a/pokemodr/CoinListUI.cpp b/pokemodr/CoinListUI.cpp
index b813d94f..539d086e 100644
--- a/pokemodr/CoinListUI.cpp
+++ b/pokemodr/CoinListUI.cpp
@@ -22,11 +22,14 @@
#include <QMetaObject>
#include <QVariant>
-#include "../general/BugCatcher.h"
-#include "../general/Exception.h"
-#include "../pokemod/Item.h"
-#include "../pokemod/ItemEffect.h"
-#include "../pokemod/Pokemod.h"
+
+#include <BugCatcher.h>
+#include <Exception.h>
+
+#include <Item.h>
+#include <ItemEffect.h>
+#include <Pokemod.h>
+
#include "CoinListUI.h"
CoinListUI::CoinListUI(CoinList* c, QWidget* parent) :
diff --git a/pokemodr/CoinListUI.h b/pokemodr/CoinListUI.h
index 28244954..6b32c534 100644
--- a/pokemodr/CoinListUI.h
+++ b/pokemodr/CoinListUI.h
@@ -24,9 +24,13 @@
#define __POKEMODR_COINLISTUI__
#include <ktoolbar.h>
+
#include <QString>
-#include "../pokemod/CoinList.h"
+
+#include <CoinList.h>
+
#include "ObjectUI.h"
+
#include "ui_coinlist.h"
class CoinListUI : public ObjectUI, private Ui::formCoinList
diff --git a/pokemodr/EggGroupUI.cpp b/pokemodr/EggGroupUI.cpp
index 6dd65441..15b716f5 100644
--- a/pokemodr/EggGroupUI.cpp
+++ b/pokemodr/EggGroupUI.cpp
@@ -21,6 +21,7 @@
/////////////////////////////////////////////////////////////////////////////
#include <QMetaObject>
+
#include "EggGroupUI.h"
EggGroupUI::EggGroupUI(EggGroup* e, QWidget* parent) :
diff --git a/pokemodr/EggGroupUI.h b/pokemodr/EggGroupUI.h
index 7e14ead0..dcd89357 100644
--- a/pokemodr/EggGroupUI.h
+++ b/pokemodr/EggGroupUI.h
@@ -24,9 +24,13 @@
#define __POKEMODR_EGGGROUPUI__
#include <ktoolbar.h>
+
#include <QString>
-#include "../pokemod/EggGroup.h"
+
+#include <EggGroup.h>
+
#include "ObjectUI.h"
+
#include "ui_egggroup.h"
class EggGroupUI : public ObjectUI, private Ui::formEggGroup
diff --git a/pokemodr/ImageDialog.h b/pokemodr/ImageDialog.h
index 8238d511..7c6ebee4 100644
--- a/pokemodr/ImageDialog.h
+++ b/pokemodr/ImageDialog.h
@@ -25,6 +25,7 @@
#include <kfiledialog.h>
#include <kimagefilepreview.h>
+
#include <QDir>
class ImageDialog
diff --git a/pokemodr/ItemTypeUI.cpp b/pokemodr/ItemTypeUI.cpp
index 768dbcd8..7520303e 100644
--- a/pokemodr/ItemTypeUI.cpp
+++ b/pokemodr/ItemTypeUI.cpp
@@ -21,8 +21,10 @@
/////////////////////////////////////////////////////////////////////////////
#include <QString>
-#include "../general/BugCatcher.h"
-#include "../general/Exception.h"
+
+#include <BugCatcher.h>
+#include <Exception.h>
+
#include "ItemTypeUI.h"
ItemTypeUI::ItemTypeUI(ItemType* i, QWidget* parent) :
diff --git a/pokemodr/ItemTypeUI.h b/pokemodr/ItemTypeUI.h
index a4b76d63..32c98df3 100644
--- a/pokemodr/ItemTypeUI.h
+++ b/pokemodr/ItemTypeUI.h
@@ -24,10 +24,14 @@
#define __POKEMODR_ITEMTYPEUI__
#include <ktoolbar.h>
+
#include <QObject>
#include <QWidget>
-#include "../pokemod/ItemType.h"
+
+#include <ItemType.h>
+
#include "ObjectUI.h"
+
#include "ui_itemtype.h"
class ItemTypeUI : public ObjectUI, private Ui::formItemType
diff --git a/pokemodr/ItemUI.cpp b/pokemodr/ItemUI.cpp
index 3bdaf83c..f54fb5c9 100644
--- a/pokemodr/ItemUI.cpp
+++ b/pokemodr/ItemUI.cpp
@@ -21,9 +21,12 @@
/////////////////////////////////////////////////////////////////////////////
#include <QMetaObject>
-#include "../general/BugCatcher.h"
-#include "../general/Exception.h"
-#include "../pokemod/Pokemod.h"
+
+#include <BugCatcher.h>
+#include <Exception.h>
+
+#include <Pokemod.h>
+
#include "ItemUI.h"
ItemUI::ItemUI(Item* i, QWidget* parent) :
diff --git a/pokemodr/ItemUI.h b/pokemodr/ItemUI.h
index 9f488423..1047f881 100644
--- a/pokemodr/ItemUI.h
+++ b/pokemodr/ItemUI.h
@@ -24,9 +24,13 @@
#define __POKEMODR_ITEMUI__
#include <ktoolbar.h>
+
#include <QString>
-#include "../pokemod/Item.h"
+
+#include <Item.h>
+
#include "ObjectUI.h"
+
#include "ui_item.h"
class ItemUI : public ObjectUI, private Ui::formItem
diff --git a/pokemodr/MapUI.cpp b/pokemodr/MapUI.cpp
index f349cbc0..1be2db2d 100644
--- a/pokemodr/MapUI.cpp
+++ b/pokemodr/MapUI.cpp
@@ -22,9 +22,12 @@
#include <QIcon>
#include <QMetaObject>
-#include "../general/BugCatcher.h"
-#include "../general/Exception.h"
-#include "../pokemod/Pokemod.h"
+
+#include <BugCatcher.h>
+#include <Exception.h>
+
+#include <Pokemod.h>
+
#include "TileDelegate.h"
#include "TilemapModel.h"
#include "MapUI.h"
diff --git a/pokemodr/MapUI.h b/pokemodr/MapUI.h
index 4e11c3d9..de24ce98 100644
--- a/pokemodr/MapUI.h
+++ b/pokemodr/MapUI.h
@@ -24,11 +24,15 @@
#define __POKEMODR_MAPUI__
#include <ktoolbar.h>
+
#include <QString>
-#include "../pokemod/Map.h"
+
+#include <Map.h>
+
#include "ObjectUI.h"
#include "TileDelegate.h"
#include "TilemapModel.h"
+
#include "ui_map.h"
class MapUI : public ObjectUI, private Ui::formMap
diff --git a/pokemodr/MoveUI.cpp b/pokemodr/MoveUI.cpp
index 072a431e..b1a0c51e 100644
--- a/pokemodr/MoveUI.cpp
+++ b/pokemodr/MoveUI.cpp
@@ -21,9 +21,12 @@
/////////////////////////////////////////////////////////////////////////////
#include <QMetaObject>
-#include "../general/BugCatcher.h"
-#include "../general/Exception.h"
-#include "../pokemod/Pokemod.h"
+
+#include <BugCatcher.h>
+#include <Exception.h>
+
+#include <Pokemod.h>
+
#include "MoveUI.h"
MoveUI::MoveUI(Move* m, QWidget* parent) :
@@ -57,7 +60,7 @@ void MoveUI::setGui()
varAccuracyNum->setValue(move_mod->getAccuracy().getNum());
varAccuracyDenom->setValue(move_mod->getAccuracy().getDenom());
varAccuracyNum->setMaximum(move_mod->getAccuracy().getDenom());
- varAccuracy->setText(QString::number(move_mod->getAccuracy(), 'g', 15));
+ varAccuracy->setText(QString::number(move_mod->getAccuracy(), 'g', DBL_PREC));
varType->setCurrentIndex(varType->findData(move_mod->getType()));
varTarget->setCurrentIndex(move_mod->getTarget());
varNumTargets->setValue(move_mod->getNumTargets());
diff --git a/pokemodr/MoveUI.h b/pokemodr/MoveUI.h
index 0ae049d1..a2ec8439 100644
--- a/pokemodr/MoveUI.h
+++ b/pokemodr/MoveUI.h
@@ -24,9 +24,13 @@
#define __POKEMODR_MOVEUI__
#include <ktoolbar.h>
+
#include <QString>
-#include "../pokemod/Move.h"
+
+#include <Move.h>
+
#include "ObjectUI.h"
+
#include "ui_move.h"
class MoveUI : public ObjectUI, private Ui::formMove
diff --git a/pokemodr/NatureUI.cpp b/pokemodr/NatureUI.cpp
index 946a7e48..b09823a3 100644
--- a/pokemodr/NatureUI.cpp
+++ b/pokemodr/NatureUI.cpp
@@ -22,10 +22,13 @@
#include <QMetaObject>
#include <QStringList>
-#include "../general/BugCatcher.h"
-#include "../general/Exception.h"
-#include "../general/Ref.h"
-#include "../pokemod/Pokemod.h"
+
+#include <BugCatcher.h>
+#include <Exception.h>
+#include <Ref.h>
+
+#include <Pokemod.h>
+
#include "NatureUI.h"
NatureUI::NatureUI(Nature* n, QWidget* parent) :
@@ -51,7 +54,7 @@ void NatureUI::setGui()
varStatMultiplierNum->setValue(nature_mod->getStat(varStat->currentIndex()).getNum());
varStatMultiplierDenom->setValue(nature_mod->getStat(varStat->currentIndex()).getDenom());
varStatMultiplierNum->setMaximum(nature_mod->getStat(varStat->currentIndex()).getDenom());
- varStatMultiplier->setText(QString::number(nature_mod->getStat(varStat->currentIndex()), 'g', 15));
+ varStatMultiplier->setText(QString::number(nature_mod->getStat(varStat->currentIndex()), 'g', DBL_PREC));
varWeight->setValue(nature_mod->getWeight());
}
@@ -74,6 +77,12 @@ void NatureUI::on_varName_textChanged(const QString& n)
emit(setChanged(true));
}
+void NatureUI::on_varStatMultiplier_currentIndexChanged()
+{
+ emit(setChanged(true));
+ setGui();
+}
+
void NatureUI::on_varStatMultiplierNum_valueChanged(const int s)
{
try
diff --git a/pokemodr/NatureUI.h b/pokemodr/NatureUI.h
index 8f5c2f32..4b6f9e56 100644
--- a/pokemodr/NatureUI.h
+++ b/pokemodr/NatureUI.h
@@ -24,9 +24,13 @@
#define __POKEMODR_NATUREUI__
#include <ktoolbar.h>
+
#include <QString>
-#include "../pokemod/Nature.h"
+
+#include <Nature.h>
+
#include "ObjectUI.h"
+
#include "ui_nature.h"
class NatureUI : public ObjectUI, private Ui::formNature
@@ -45,6 +49,7 @@ class NatureUI : public ObjectUI, private Ui::formNature
void on_buttonApply_clicked();
void on_buttonDiscard_clicked();
void on_varName_textChanged(const QString& n);
+ void on_varStatMultiplier_currentIndexChanged();
void on_varStatMultiplierNum_valueChanged(const int s);
void on_varStatMultiplierDenom_valueChanged(const int s);
void on_varWeight_valueChanged(const int w);
diff --git a/pokemodr/ObjectUI.h b/pokemodr/ObjectUI.h
index 351612a7..b75b46a1 100644
--- a/pokemodr/ObjectUI.h
+++ b/pokemodr/ObjectUI.h
@@ -24,9 +24,13 @@
#define __POKEMODR_OBJECTUI__
#include <ktoolbar.h>
+
#include <QObject>
#include <QWidget>
-#include "../pokemod/Object.h"
+
+#include <Object.h>
+
+#define DBL_PREC 15
class ObjectUI : public QWidget
{
diff --git a/pokemodr/PokeModTreeItem.h b/pokemodr/PokeModTreeItem.h
index f430783c..c94886b0 100644
--- a/pokemodr/PokeModTreeItem.h
+++ b/pokemodr/PokeModTreeItem.h
@@ -26,7 +26,8 @@
#include <QObject>
#include <QTreeWidgetItem>
-#include "../pokemod/Object.h"
+
+#include <Object.h>
class PokeModTreeItem : public QObject, public QTreeWidgetItem
{
diff --git a/pokemodr/PokeModr.cpp b/pokemodr/PokeModr.cpp
index 16cdd6b0..b1130634 100644
--- a/pokemodr/PokeModr.cpp
+++ b/pokemodr/PokeModr.cpp
@@ -25,8 +25,10 @@
#include <kcmdlineargs.h>
#include <kconfig.h>
#include <kconfiggroup.h>
-#include "../general/BugCatcher.h"
-#include "../general/Exception.h"
+
+#include <BugCatcher.h>
+#include <Exception.h>
+
#include "ImageDialog.h"
#include "PokeModrUI.h"
#include "PokeModr.h"
diff --git a/pokemodr/PokeModrUI.cpp b/pokemodr/PokeModrUI.cpp
index 10bb1486..0fb19a70 100644
--- a/pokemodr/PokeModrUI.cpp
+++ b/pokemodr/PokeModrUI.cpp
@@ -23,11 +23,15 @@
#include <klocalizedstring.h>
#include <kmenu.h>
#include <kmenubar.h>
+
#include <QMetaObject>
-#include "../general/BugCatcher.h"
-#include "../general/Exception.h"
+
+#include <BugCatcher.h>
+#include <Exception.h>
+
#include "PokeModrUI.h"
+// Debugging includes
#include "AbilityUI.h"
#include "AuthorUI.h"
#include "BadgeUI.h"
diff --git a/pokemodr/PokeModrUI.h b/pokemodr/PokeModrUI.h
index fa4fbb8b..89bc85ad 100644
--- a/pokemodr/PokeModrUI.h
+++ b/pokemodr/PokeModrUI.h
@@ -26,10 +26,13 @@
#include <kconfiggroup.h>
#include <kmainwindow.h>
#include <krecentfilesaction.h>
+
#include <QMainWindow>
#include <QObject>
#include <QWidget>
-#include "../pokemod/Pokemod.h"
+
+#include <Pokemod.h>
+
#include "ui_pokemodr.h"
class PokeModrUI : public QMainWindow, private Ui::formPokeModr
diff --git a/pokemodr/RulesUI.cpp b/pokemodr/RulesUI.cpp
index 7dcd004d..82ed6bb2 100644
--- a/pokemodr/RulesUI.cpp
+++ b/pokemodr/RulesUI.cpp
@@ -21,8 +21,10 @@
/////////////////////////////////////////////////////////////////////////////
#include <QMetaObject>
-#include "../general/BugCatcher.h"
-#include "../general/Exception.h"
+
+#include <BugCatcher.h>
+#include <Exception.h>
+
#include "RulesUI.h"
RulesUI::RulesUI(Rules* r, QWidget* parent) :
@@ -74,7 +76,7 @@ void RulesUI::setGui()
varPokerusNum->setValue(rules_mod->getPokerusChance().getNum());
varPokerusDenom->setValue(rules_mod->getPokerusChance().getDenom());
varPokerusNum->setMaximum(rules_mod->getPokerusChance().getDenom());
- varPokerus->setText(QString::number(rules_mod->getPokerusChance(), 'g', 15));
+ varPokerus->setText(QString::number(rules_mod->getPokerusChance(), 'g', DBL_PREC));
}
void RulesUI::on_buttonApply_clicked()
diff --git a/pokemodr/RulesUI.h b/pokemodr/RulesUI.h
index c108a82a..bf2c043b 100644
--- a/pokemodr/RulesUI.h
+++ b/pokemodr/RulesUI.h
@@ -24,8 +24,11 @@
#define __POKEMODR_RULESUI__
#include <ktoolbar.h>
-#include "../pokemod/Rules.h"
+
+#include <Rules.h>
+
#include "ObjectUI.h"
+
#include "ui_rules.h"
class RulesUI : public ObjectUI, private Ui::formRules
diff --git a/pokemodr/SpeciesAbilityUI.cpp b/pokemodr/SpeciesAbilityUI.cpp
index 88a6f1ad..b72d3200 100644
--- a/pokemodr/SpeciesAbilityUI.cpp
+++ b/pokemodr/SpeciesAbilityUI.cpp
@@ -21,13 +21,15 @@
/////////////////////////////////////////////////////////////////////////////
#include <QMetaObject>
-#include <QStringListModel>
#include <QVariant>
-#include "../general/BugCatcher.h"
-#include "../general/Exception.h"
-#include "../pokemod/Ability.h"
-#include "../pokemod/Pokemod.h"
-#include "../pokemod/SpeciesAbility.h"
+
+#include <BugCatcher.h>
+#include <Exception.h>
+
+#include <Ability.h>
+#include <Pokemod.h>
+#include <SpeciesAbility.h>
+
#include "SpeciesAbilityUI.h"
SpeciesAbilityUI::SpeciesAbilityUI(SpeciesAbility* s, QWidget* parent) :
diff --git a/pokemodr/SpeciesAbilityUI.h b/pokemodr/SpeciesAbilityUI.h
index bfb067cd..cc31ac54 100644
--- a/pokemodr/SpeciesAbilityUI.h
+++ b/pokemodr/SpeciesAbilityUI.h
@@ -24,8 +24,11 @@
#define __POKEMODR_SPECIESABILITYUI__
#include <ktoolbar.h>
-#include "../pokemod/SpeciesAbility.h"
+
+#include <SpeciesAbility.h>
+
#include "ObjectUI.h"
+
#include "ui_speciesability.h"
class SpeciesAbilityUI : public ObjectUI, private Ui::formSpeciesAbility
diff --git a/pokemodr/SpeciesEvolutionUI.cpp b/pokemodr/SpeciesEvolutionUI.cpp
index 0eb60163..9a034ecc 100644
--- a/pokemodr/SpeciesEvolutionUI.cpp
+++ b/pokemodr/SpeciesEvolutionUI.cpp
@@ -21,14 +21,16 @@
/////////////////////////////////////////////////////////////////////////////
#include <QMetaObject>
-#include <QStringListModel>
#include <QVariant>
-#include "../general/BugCatcher.h"
-#include "../general/Exception.h"
-#include "../general/Ref.h"
-#include "../pokemod/Pokemod.h"
-#include "../pokemod/Species.h"
-#include "../pokemod/SpeciesEvolution.h"
+
+#include <BugCatcher.h>
+#include <Exception.h>
+#include <Ref.h>
+
+#include <Pokemod.h>
+#include <Species.h>
+#include <SpeciesEvolution.h>
+
#include "SpeciesEvolutionUI.h"
SpeciesEvolutionUI::SpeciesEvolutionUI(SpeciesEvolution* s, QWidget* parent) :
diff --git a/pokemodr/SpeciesEvolutionUI.h b/pokemodr/SpeciesEvolutionUI.h
index ca92e865..ee98673b 100644
--- a/pokemodr/SpeciesEvolutionUI.h
+++ b/pokemodr/SpeciesEvolutionUI.h
@@ -24,8 +24,11 @@
#define __POKEMODR_SPECIESEVOLUTIONUI__
#include <ktoolbar.h>
-#include "../pokemod/SpeciesEvolution.h"
+
+#include <SpeciesEvolution.h>
+
#include "ObjectUI.h"
+
#include "ui_speciesevolution.h"
class SpeciesEvolutionUI : public ObjectUI, private Ui::formSpeciesEvolution
diff --git a/pokemodr/SpeciesItemUI.cpp b/pokemodr/SpeciesItemUI.cpp
index c4d140e8..84264e85 100644
--- a/pokemodr/SpeciesItemUI.cpp
+++ b/pokemodr/SpeciesItemUI.cpp
@@ -21,13 +21,15 @@
/////////////////////////////////////////////////////////////////////////////
#include <QMetaObject>
-#include <QStringListModel>
#include <QVariant>
-#include "../general/BugCatcher.h"
-#include "../general/Exception.h"
-#include "../pokemod/Item.h"
-#include "../pokemod/Pokemod.h"
-#include "../pokemod/SpeciesItem.h"
+
+#include <BugCatcher.h>
+#include <Exception.h>
+
+#include <Item.h>
+#include <Pokemod.h>
+#include <SpeciesItem.h>
+
#include "SpeciesItemUI.h"
SpeciesItemUI::SpeciesItemUI(SpeciesItem* s, QWidget* parent) :
diff --git a/pokemodr/SpeciesItemUI.h b/pokemodr/SpeciesItemUI.h
index 527fb592..2e9c19b7 100644
--- a/pokemodr/SpeciesItemUI.h
+++ b/pokemodr/SpeciesItemUI.h
@@ -24,8 +24,11 @@
#define __POKEMODR_SPECIESITEMUI__
#include <ktoolbar.h>
-#include "../pokemod/SpeciesItem.h"
+
+#include <SpeciesItem.h>
+
#include "ObjectUI.h"
+
#include "ui_speciesitem.h"
class SpeciesItemUI : public ObjectUI, private Ui::formSpeciesItem
diff --git a/pokemodr/SpeciesMoveUI.cpp b/pokemodr/SpeciesMoveUI.cpp
index 9922d0d9..a529ec01 100644
--- a/pokemodr/SpeciesMoveUI.cpp
+++ b/pokemodr/SpeciesMoveUI.cpp
@@ -21,13 +21,15 @@
/////////////////////////////////////////////////////////////////////////////
#include <QMetaObject>
-#include <QStringListModel>
#include <QVariant>
-#include "../general/BugCatcher.h"
-#include "../general/Exception.h"
-#include "../pokemod/Move.h"
-#include "../pokemod/Pokemod.h"
-#include "../pokemod/SpeciesMove.h"
+
+#include <BugCatcher.h>
+#include <Exception.h>
+
+#include <Move.h>
+#include <Pokemod.h>
+#include <SpeciesMove.h>
+
#include "SpeciesMoveUI.h"
SpeciesMoveUI::SpeciesMoveUI(SpeciesMove* s, QWidget* parent) :
diff --git a/pokemodr/SpeciesMoveUI.h b/pokemodr/SpeciesMoveUI.h
index dcf62eed..7e3c6f93 100644
--- a/pokemodr/SpeciesMoveUI.h
+++ b/pokemodr/SpeciesMoveUI.h
@@ -24,8 +24,11 @@
#define __POKEMODR_SPECIESMOVEUI__
#include <ktoolbar.h>
-#include "../pokemod/SpeciesMove.h"
+
+#include <SpeciesMove.h>
+
#include "ObjectUI.h"
+
#include "ui_speciesmove.h"
class SpeciesMoveUI : public ObjectUI, private Ui::formSpeciesMove
diff --git a/pokemodr/SpeciesUI.cpp b/pokemodr/SpeciesUI.cpp
new file mode 100644
index 00000000..3a5a914d
--- /dev/null
+++ b/pokemodr/SpeciesUI.cpp
@@ -0,0 +1,446 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name: pokegen/SpeciesUI.cpp
+// Purpose: Species UI form handling
+// Author: Ben Boeckel
+// Modified by: Ben Boeckel
+// Created: Thu Feb 21 12:55:08 2008
+// Copyright: ©2007-2008 Ben Boeckel and Nerdy Productions
+// Licence:
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this program. If not, see <http://www.gnu.org/licenses/>.
+/////////////////////////////////////////////////////////////////////////////
+
+#include <QMetaObject>
+#include <QVariant>
+
+#include <BugCatcher.h>
+#include <Exception.h>
+#include <ImageCache.h>
+#include <Ref.h>
+
+#include <EggGroup.h>
+#include <Pokemod.h>
+#include <Species.h>
+#include <Type.h>
+
+#include "SpeciesUI.h"
+
+SpeciesUI::SpeciesUI(Species* s, QWidget* parent) :
+ ObjectUI(parent),
+ species(s),
+ species_mod(new Species(s->getPokemod(), *s, s->getId()))
+{
+ setupUi(this);
+ QMetaObject::connectSlotsByName(this);
+ setObjects(species, species_mod);
+ const bool isSplit = species->getPokemod()->getRules()->getSpecialSplit();
+ varBaseStat->addItems((isSplit ? StatGSCStr : StatRBYStr).mid(0, isSplit ? ST_End_GSC : ST_End_RBY));
+ varEVStat->addItems((isSplit ? StatGSCStr : StatRBYStr).mid(0, isSplit ? ST_End_GSC : ST_End_RBY));
+ varGrowth->addItems(Species::StyleStr);
+ if (species->getPokemod()->getRules()->getGenderAllowed())
+ {
+ if (species->getPokemod()->getRules()->getBreedingAllowed())
+ {
+ for (int i = 0; i < species->getPokemod()->getSpeciesCount(); ++i)
+ {
+ const Species* s = species->getPokemod()->getSpecies(i);
+ varEggSpecies->addItem(s->getName());
+ varEggSpecies->setItemData(i, s->getId());
+ }
+ for (int i = 0; i < species->getPokemod()->getEggGroupCount(); ++i)
+ {
+ const EggGroup* e = species->getPokemod()->getEggGroup(i);
+ QListWidgetItem* lwi = new QListWidgetItem(e->getName(), varEggGroups);
+ lwi->setData(Qt::UserRole, e->getId());
+ }
+ }
+ else
+ {
+ boxEggSpecies->setEnabled(false);
+ varEggSteps->setEnabled(false);
+ varNidoranGroup->setEnabled(false);
+ boxEggGroups->setEnabled(false);
+ }
+ }
+ else
+ {
+ tabGenetics->setEnabled(false);
+ boxFemaleSprites->setEnabled(false);
+ }
+}
+
+// KToolbar SpeciesUI::getToolbar(QWidget* parent)
+// {
+//
+// }
+
+void SpeciesUI::setGui()
+{
+ varName->setText(species_mod->getName());
+ varBaseStatValue->setValue(species_mod->getBaseStat(varBaseStat->currentIndex()));
+ varEffortValue->setValue(species_mod->getEffortValue(varBaseStat->currentIndex()));
+ varGrowth->setCurrentIndex(species_mod->getGrowth());
+ varExperienceValue->setValue(species_mod->getExperienceValue());
+ varCatchValue->setValue(species_mod->getCatchValue());
+ varRunChanceNum->setValue(species_mod->getRunChance().getNum());
+ varRunChanceDenom->setValue(species_mod->getRunChance().getDenom());
+ varRunChanceNum->setMaximum(species_mod->getRunChance().getDenom());
+ varRunChance->setText(QString::number(species_mod->getRunChance(), 'g', DBL_PREC));
+ varItemChanceNum->setValue(species_mod->getItemChance().getNum());
+ varItemChanceDenom->setValue(species_mod->getItemChance().getDenom());
+ varItemChanceNum->setMaximum(species_mod->getItemChance().getDenom());
+ varItemChance->setText(QString::number(species_mod->getItemChance(), 'g', DBL_PREC));
+ varPokedexNumber->setValue(species_mod->getPokedexNumber());
+ varWeight->setValue(species_mod->getWeight());
+ varHeightFeet->setValue(species_mod->getHeightFeet());
+ varHeightInches->setValue(species_mod->getHeightInches());
+ varPokedexEntry->setText(species_mod->getPokedexEntry());
+ try
+ {
+ varMaleFront->setIcon(ImageCache::open(species_mod->getFrontMaleSprite()));
+ }
+ catch (OpenException& e)
+ {
+ BugCatcher::report(e);
+ }
+ try
+ {
+ varMaleBack->setIcon(ImageCache::open(species_mod->getBackMaleSprite()));
+ }
+ catch (OpenException& e)
+ {
+ BugCatcher::report(e);
+ }
+ if (species->getPokemod()->getRules()->getGenderAllowed())
+ {
+ try
+ {
+ varFemaleFront->setIcon(ImageCache::open(species_mod->getFrontFemaleSprite()));
+ }
+ catch (OpenException& e)
+ {
+ BugCatcher::report(e);
+ }
+ try
+ {
+ varFemaleBack->setIcon(ImageCache::open(species_mod->getBackFemaleSprite()));
+ }
+ catch (OpenException& e)
+ {
+ BugCatcher::report(e);
+ }
+ }
+ try
+ {
+ varList->setIcon(ImageCache::open(species_mod->getListSprite()));
+ }
+ catch (OpenException& e)
+ {
+ BugCatcher::report(e);
+ }
+ boxGenderChance->setChecked(species_mod->getGenderFactor().getNum() == -1);
+ varGenderChanceNum->setValue(species_mod->getGenderFactor().getNum());
+ varGenderChanceDenom->setValue(species_mod->getGenderFactor().getDenom());
+ varGenderChanceNum->setMaximum(species_mod->getGenderFactor().getDenom());
+ varGenderChance->setText(QString::number(species_mod->getGenderFactor(), 'g', DBL_PREC));
+ varEggSpecies->setCurrentIndex(varEggSpecies->findData(species_mod->getEggSpecies()));
+ varEggSteps->setValue(species_mod->getEggSteps());
+ varNidoranGroup->setValue(species_mod->getNidoranGroup());
+ for (int i = 0; i < varTypes->count(); ++i)
+ {
+ QListWidgetItem* lwi = varTypes->item(i);
+ lwi->setSelected(species_mod->getItem(lwi->data(Qt::UserRole).toInt()));
+ }
+ for (int i = 0; i < varEggGroups->count(); ++i)
+ {
+ QListWidgetItem* lwi = varEggGroups->item(i);
+ lwi->setSelected(species_mod->getItem(lwi->data(Qt::UserRole).toInt()));
+ }
+}
+
+void SpeciesUI::on_buttonApply_clicked()
+{
+ *species = *species_mod;
+ emit(setChanged(false));
+}
+
+void SpeciesUI::on_buttonDiscard_clicked()
+{
+ *species_mod = *species;
+ emit(setChanged(false));
+ setGui();
+}
+
+void SpeciesUI::on_varName_textChanged(const QString & n)
+{
+ species_mod->setName(n);
+ emit(setChanged(true));
+}
+
+void SpeciesUI::on_varBaseStat_currentIndexChanged()
+{
+ emit(setChanged(true));
+ setGui();
+}
+
+void SpeciesUI::on_varBaseStatValue_valueChanged(const int b)
+{
+ try
+ {
+ species_mod->setBaseStat(varBaseStat->currentIndex(), b);
+ emit(setChanged(true));
+ }
+ catch (BoundsException& e)
+ {
+ BugCatcher::report(e);
+ setGui();
+ }
+}
+
+void SpeciesUI::on_varEVStat_currentIndexChanged()
+{
+ emit(setChanged(true));
+ setGui();
+}
+
+void SpeciesUI::on_varEffortValue_valueChanged(const int e)
+{
+ try
+ {
+ species_mod->setEffortValue(varEVStat->currentIndex(), e);
+ emit(setChanged(true));
+ }
+ catch (BoundsException& e)
+ {
+ BugCatcher::report(e);
+ setGui();
+ }
+}
+
+void SpeciesUI::on_varGrowth_currentIndexChanged(const int g)
+{
+ try
+ {
+ species_mod->setGrowth(g);
+ emit(setChanged(true));
+ }
+ catch (BoundsException& e)
+ {
+ BugCatcher::report(e);
+ setGui();
+ }
+}
+
+void SpeciesUI::on_varExperienceValue_valueChanged(const int e)
+{
+ species_mod->setExperienceValue(e);
+ emit(setChanged(true));
+}
+
+void SpeciesUI::on_varCatchValue_valueChanged(const int c)
+{
+ species_mod->setCatchValue(c);
+ emit(setChanged(true));
+}
+
+void SpeciesUI::on_varRunChanceNum_valueChanged(const int r)
+{
+ try
+ {
+ species_mod->setRunChanceNum(r);
+ emit(setChanged(true));
+ }
+ catch (Exception& e)
+ {
+ BugCatcher::report(e);
+ setGui();
+ }
+}
+
+void SpeciesUI::on_varRunChanceDenom_valueChanged(const int r)
+{
+ try
+ {
+ species_mod->setRunChanceDenom(r);
+ emit(setChanged(true));
+ }
+ catch (Exception& e)
+ {
+ BugCatcher::report(e);
+ setGui();
+ }
+}
+
+void SpeciesUI::on_varItemChanceNum_valueChanged(const int i)
+{
+ try
+ {
+ species_mod->setItemChanceNum(i);
+ emit(setChanged(true));
+ }
+ catch (Exception& e)
+ {
+ BugCatcher::report(e);
+ setGui();
+ }
+}
+
+void SpeciesUI::on_varItemChanceDenom_valueChanged(const int i)
+{
+ try
+ {
+ species_mod->setItemChanceDenom(i);
+ emit(setChanged(true));
+ }
+ catch (Exception& e)
+ {
+ BugCatcher::report(e);
+ setGui();
+ }
+}
+
+
+void SpeciesUI::on_varPokedexNumber_valueChanged(const int p)
+{
+ species_mod->setPokedexNumber(p);
+ emit(setChanged(true));
+}
+
+void SpeciesUI::on_varWeight_valueChanged(const int w)
+{
+ species_mod->setWeight(w);
+ emit(setChanged(true));
+}
+
+void SpeciesUI::on_varHeightFeet_valueChanged(const int h)
+{
+ species_mod->setHeightFeet(h);
+ emit(setChanged(true));
+}
+
+void SpeciesUI::on_varHeightInches_valueChanged(const int h)
+{
+ try
+ {
+ species_mod->setHeightInches(h);
+ emit(setChanged(true));
+ }
+ catch (BoundsException& e)
+ {
+ BugCatcher::report(e);
+ setGui();
+ }
+}
+
+void SpeciesUI::on_varPokedexEntry_textChanged()
+{
+ species_mod->setPokedexEntry(varPokedexEntry->toPlainText());
+ emit(setChanged(true));
+}
+
+void SpeciesUI::on_boxGenderChance_toggled(const bool g)
+{
+ species_mod->setGenderFactor(g ? 1 : -1, 1);
+ emit(setChanged(true));
+ setGui();
+}
+
+void SpeciesUI::on_varGenderChanceNum_valueChanged(const int g)
+{
+ try
+ {
+ species_mod->setGenderFactorNum(g);
+ emit(setChanged(true));
+ }
+ catch (Exception& e)
+ {
+ BugCatcher::report(e);
+ setGui();
+ }
+}
+
+void SpeciesUI::on_varGenderChanceDenom_valueChanged(const int g)
+{
+ try
+ {
+ species_mod->setGenderFactorDenom(g);
+ emit(setChanged(true));
+ }
+ catch (Exception& e)
+ {
+ BugCatcher::report(e);
+ setGui();
+ }
+}
+
+void SpeciesUI::on_varEggSpecies_currentIndexChanged(const int e)
+{
+ try
+ {
+ species_mod->setEggSpecies(varEggSpecies->itemData(e).toInt());
+ emit(setChanged(true));
+ }
+ catch (BoundsException& e)
+ {
+ BugCatcher::report(e);
+ setGui();
+ }
+}
+
+void SpeciesUI::on_varEggSteps_valueChanged(const int e)
+{
+ species_mod->setEggSteps(e);
+ emit(setChanged(true));
+}
+
+void SpeciesUI::on_varNidoranGroup_valueChanged(const int n)
+{
+ species_mod->setNidoranGroup(n);
+ emit(setChanged(true));
+}
+
+void SpeciesUI::on_varTypes_itemSelectionChanged()
+{
+ try
+ {
+ for (int i = 0; i < varTypes->count(); ++i)
+ {
+ const QListWidgetItem* lwi = varTypes->item(i);
+ species_mod->setType(lwi->data(Qt::UserRole).toInt(), lwi->isSelected());
+ }
+ emit(setChanged(true));
+ }
+ catch (BoundsException& e)
+ {
+ BugCatcher::report(e);
+ setGui();
+ }
+}
+
+void SpeciesUI::on_varEggGroups_itemSelectionChanged()
+{
+ try
+ {
+ for (int i = 0; i < varEggGroups->count(); ++i)
+ {
+ const QListWidgetItem* lwi = varEggGroups->item(i);
+ species_mod->setEggGroup(lwi->data(Qt::UserRole).toInt(), lwi->isSelected());
+ }
+ emit(setChanged(true));
+ }
+ catch (BoundsException& e)
+ {
+ BugCatcher::report(e);
+ setGui();
+ }
+}
diff --git a/pokemodr/SpeciesUI.h b/pokemodr/SpeciesUI.h
new file mode 100644
index 00000000..b00c48da
--- /dev/null
+++ b/pokemodr/SpeciesUI.h
@@ -0,0 +1,87 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name: pokegen/SpeciesUI.h
+// Purpose: Species UI form handling
+// Author: Ben Boeckel
+// Modified by: Ben Boeckel
+// Created: Thu Feb 21 12:33:04 2008
+// Copyright: ©2007-2008 Ben Boeckel and Nerdy Productions
+// Licence:
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this program. If not, see <http://www.gnu.org/licenses/>.
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef __POKEMODR_SPECIESUI__
+#define __POKEMODR_SPECIESUI__
+
+#include <ktoolbar.h>
+
+#include <QString>
+
+#include <Species.h>
+
+#include "ObjectUI.h"
+#include "ui_species.h"
+
+class SpeciesUI : public ObjectUI, private Ui::formSpecies
+{
+ Q_OBJECT
+
+ public:
+ SpeciesUI(Species* s, QWidget* parent);
+ ~SpeciesUI()
+ {
+ delete species_mod;
+ }
+
+// KToolbar getToolbar(QWidget* parent);
+ public slots:
+ void on_buttonApply_clicked();
+ void on_buttonDiscard_clicked();
+ void on_varName_textChanged(const QString& n);
+ void on_varBaseStat_currentIndexChanged();
+ void on_varBaseStatValue_valueChanged(const int b);
+ void on_varEVStat_currentIndexChanged();
+ void on_varEffortValue_valueChanged(const int e);
+ void on_varGrowth_currentIndexChanged(const int g);
+ void on_varExperienceValue_valueChanged(const int e);
+ void on_varCatchValue_valueChanged(const int c);
+ void on_varRunChanceNum_valueChanged(const int r);
+ void on_varRunChanceDenom_valueChanged(const int r);
+ void on_varItemChanceNum_valueChanged(const int i);
+ void on_varItemChanceDenom_valueChanged(const int i);
+ void on_varPokedexNumber_valueChanged(const int p);
+ void on_varWeight_valueChanged(const int w);
+ void on_varHeightFeet_valueChanged(const int h);
+ void on_varHeightInches_valueChanged(const int h);
+ void on_varPokedexEntry_textChanged();
+ void on_varFrontMaleSprite_pressed();
+ void on_varBackMaleSprite_pressed();
+ void on_varFrontFemaleSprite_pressed();
+ void on_varBackFemaleSprite_pressed();
+ void on_varListSprite_pressed();
+ void on_boxGenderChance_toggled(const bool g);
+ void on_varGenderChanceNum_valueChanged(const int g);
+ void on_varGenderChanceDenom_valueChanged(const int g);
+ void on_varEggSpecies_currentIndexChanged(const int e);
+ void on_varEggSteps_valueChanged(const int e);
+ void on_varNidoranGroup_valueChanged(const int n);
+ void on_varTypes_itemSelectionChanged();
+ void on_varEggGroups_itemSelectionChanged();
+ private:
+ void setGui();
+
+ Species* species;
+ Species* species_mod;
+};
+
+#endif
diff --git a/pokemodr/StoreUI.cpp b/pokemodr/StoreUI.cpp
index ae92f24e..c6166324 100644
--- a/pokemodr/StoreUI.cpp
+++ b/pokemodr/StoreUI.cpp
@@ -23,11 +23,14 @@
#include <QListWidgetItem>
#include <QMetaObject>
#include <QVariant>
-#include "../general/BugCatcher.h"
-#include "../general/Exception.h"
-#include "../pokemod/Item.h"
-#include "../pokemod/Pokemod.h"
-#include "../pokemod/Store.h"
+
+#include <BugCatcher.h>
+#include <Exception.h>
+
+#include <Item.h>
+#include <Pokemod.h>
+#include <Store.h>
+
#include "StoreUI.h"
StoreUI::StoreUI(Store* s, QWidget* parent) :
diff --git a/pokemodr/StoreUI.h b/pokemodr/StoreUI.h
index bb324712..bb11f5a5 100644
--- a/pokemodr/StoreUI.h
+++ b/pokemodr/StoreUI.h
@@ -24,9 +24,13 @@
#define __POKEMODR_STOREUI__
#include <ktoolbar.h>
+
#include <QString>
-#include "../pokemod/Store.h"
+
+#include <Store.h>
+
#include "ObjectUI.h"
+
#include "ui_store.h"
class StoreUI : public ObjectUI, private Ui::formStore
diff --git a/pokemodr/TileDelegate.cpp b/pokemodr/TileDelegate.cpp
index 57660976..d86bcfb4 100644
--- a/pokemodr/TileDelegate.cpp
+++ b/pokemodr/TileDelegate.cpp
@@ -21,9 +21,12 @@
/////////////////////////////////////////////////////////////////////////////
#include <kcombobox.h>
+
#include "../general/ImageCache.h"
-#include "../pokemod/Pokemod.h"
-#include "../pokemod/Tile.h"
+
+#include <Pokemod.h>
+#include <Tile.h>
+
#include "ObjectUI.h"
#include "MapUI.h"
#include "TileDelegate.h"
diff --git a/pokemodr/TileUI.cpp b/pokemodr/TileUI.cpp
index d95a4d22..ba217703 100644
--- a/pokemodr/TileUI.cpp
+++ b/pokemodr/TileUI.cpp
@@ -24,11 +24,14 @@
#include <QListIterator>
#include <QListWidgetItem>
#include <QMetaObject>
-#include "../general/BugCatcher.h"
-#include "../general/Exception.h"
-#include "../general/ImageCache.h"
-#include "../general/Ref.h"
-#include "../pokemod/Pokemod.h"
+
+#include <BugCatcher.h>
+#include <Exception.h>
+#include <ImageCache.h>
+#include <Ref.h>
+
+#include <Pokemod.h>
+
#include "ImageDialog.h"
#include "TileUI.h"
@@ -77,7 +80,7 @@ void TileUI::setGui()
varWildNum->setValue(tile_mod->getWildChance().getNum());
varWildDenom->setValue(tile_mod->getWildChance().getDenom());
varWildNum->setMaximum(tile_mod->getWildChance().getDenom());
- varWild->setText(QString::number(tile_mod->getWildChance(), 'g', 15));
+ varWild->setText(QString::number(tile_mod->getWildChance(), 'g', DBL_PREC));
boxHMs->setChecked((tile_mod->getHMType() == -1) ? Qt::Unchecked : Qt::Checked);
varHMType->setCurrentIndex(tile_mod->getHMType());
varHMUnder->setCurrentIndex(varHMUnder->findData(tile_mod->getUnder()));
@@ -128,7 +131,6 @@ void TileUI::on_varWildNum_valueChanged(const int m)
try
{
tile_mod->setWildChanceNum(m);
- varWild->setText(QString::number(tile_mod->getWildChance(), 'g', 15));
emit(setChanged(true));
}
catch (BoundsException& e)
@@ -143,8 +145,6 @@ void TileUI::on_varWildDenom_valueChanged(const int m)
try
{
tile_mod->setWildChanceDenom(m);
- varWildNum->setMaximum(m);
- varWild->setText(QString::number(tile_mod->getWildChance(), 'g', 15));
emit(setChanged(true));
}
catch (BoundsException& e)
diff --git a/pokemodr/TileUI.h b/pokemodr/TileUI.h
index 1c428d36..eb758b54 100644
--- a/pokemodr/TileUI.h
+++ b/pokemodr/TileUI.h
@@ -24,10 +24,14 @@
#define __POKEMODR_TILEUI__
#include <ktoolbar.h>
+
#include <QListIterator>
#include <QString>
-#include "../pokemod/Tile.h"
+
+#include <Tile.h>
+
#include "ObjectUI.h"
+
#include "ui_tile.h"
class TileUI : public ObjectUI, private Ui::formTile
diff --git a/pokemodr/TilemapModel.cpp b/pokemodr/TilemapModel.cpp
index f21c6371..5312fb21 100644
--- a/pokemodr/TilemapModel.cpp
+++ b/pokemodr/TilemapModel.cpp
@@ -21,8 +21,11 @@
/////////////////////////////////////////////////////////////////////////////
#include <kcombobox.h>
-#include "../general/ImageCache.h"
-#include "../pokemod/Tile.h"
+
+#include <ImageCache.h>
+
+#include <Tile.h>
+
#include "ObjectUI.h"
#include "MapUI.h"
#include "TilemapModel.h"
diff --git a/pokemodr/TilemapModel.h b/pokemodr/TilemapModel.h
index 59bd441f..5a570c6d 100644
--- a/pokemodr/TilemapModel.h
+++ b/pokemodr/TilemapModel.h
@@ -26,8 +26,10 @@
#include <QAbstractTableModel>
#include <QObject>
#include <QVariant>
-#include "../general/Matrix.h"
-#include "../pokemod/Pokemod.h"
+
+#include <Matrix.h>
+
+#include <Pokemod.h>
class TilemapModel : public QAbstractTableModel
{
diff --git a/pokemodr/TimeUI.cpp b/pokemodr/TimeUI.cpp
index 68e9d628..67347f04 100644
--- a/pokemodr/TimeUI.cpp
+++ b/pokemodr/TimeUI.cpp
@@ -21,8 +21,10 @@
/////////////////////////////////////////////////////////////////////////////
#include <QMetaObject>
-#include "../general/BugCatcher.h"
-#include "../general/Exception.h"
+
+#include <BugCatcher.h>
+#include <Exception.h>
+
#include "TimeUI.h"
TimeUI::TimeUI(Time* t, QWidget* parent) :
diff --git a/pokemodr/TimeUI.h b/pokemodr/TimeUI.h
index d8cb823d..404519e8 100644
--- a/pokemodr/TimeUI.h
+++ b/pokemodr/TimeUI.h
@@ -24,10 +24,14 @@
#define __POKEMODR_TIMEUI__
#include <ktoolbar.h>
+
#include <QString>
#include <QTime>
-#include "../pokemod/Time.h"
+
+#include <Time.h>
+
#include "ObjectUI.h"
+
#include "ui_time.h"
class TimeUI : public ObjectUI, private Ui::formTime
diff --git a/pokemodr/TypeUI.cpp b/pokemodr/TypeUI.cpp
index 327b317b..d5f31fba 100644
--- a/pokemodr/TypeUI.cpp
+++ b/pokemodr/TypeUI.cpp
@@ -22,8 +22,10 @@
#include <QMetaObject>
#include <QStringList>
-#include "../general/BugCatcher.h"
-#include "../general/Exception.h"
+
+#include <BugCatcher.h>
+#include <Exception.h>
+
#include "TypeUI.h"
TypeUI::TypeUI(Type* t, QWidget* parent) :
@@ -47,7 +49,7 @@ void TypeUI::setGui()
varSTABNum->setValue(type_mod->getStab().getNum());
varSTABDenom->setValue(type_mod->getStab().getDenom());
varSTABNum->setMaximum(type_mod->getStab().getDenom());
- varSTAB->setText(QString::number(type_mod->getStab(), 'g', 15));
+ varSTAB->setText(QString::number(type_mod->getStab(), 'g', DBL_PREC));
}
void TypeUI::on_buttonApply_clicked()
diff --git a/pokemodr/TypeUI.h b/pokemodr/TypeUI.h
index 221d9121..d77f6cb7 100644
--- a/pokemodr/TypeUI.h
+++ b/pokemodr/TypeUI.h
@@ -24,9 +24,13 @@
#define __POKEMODR_TYPEUI__
#include <ktoolbar.h>
+
#include <QString>
-#include "../pokemod/Type.h"
+
+#include <Type.h>
+
#include "ObjectUI.h"
+
#include "ui_type.h"
class TypeUI : public ObjectUI, private Ui::formType
diff --git a/pokemodr/gui/badge.ui b/pokemodr/gui/badge.ui
index e97605f7..0a4d9bcb 100644
--- a/pokemodr/gui/badge.ui
+++ b/pokemodr/gui/badge.ui
@@ -5,8 +5,8 @@
<rect>
<x>0</x>
<y>0</y>
- <width>254</width>
- <height>742</height>
+ <width>244</width>
+ <height>722</height>
</rect>
</property>
<layout class="QVBoxLayout" >
@@ -84,10 +84,63 @@
</property>
<layout class="QHBoxLayout" >
<item>
- <widget class="KPushButton" name="varFace" />
+ <spacer>
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" >
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <widget class="KPushButton" name="varFace" >
+ <property name="minimumSize" >
+ <size>
+ <width>0</width>
+ <height>0</height>
+ </size>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <spacer>
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" >
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <widget class="KPushButton" name="varBadge" >
+ <property name="minimumSize" >
+ <size>
+ <width>0</width>
+ <height>0</height>
+ </size>
+ </property>
+ </widget>
</item>
<item>
- <widget class="KPushButton" name="varBadge" />
+ <spacer>
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" >
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
</item>
</layout>
</widget>
diff --git a/pokemodr/gui/move.ui b/pokemodr/gui/move.ui
index 1aff7016..af6c2835 100644
--- a/pokemodr/gui/move.ui
+++ b/pokemodr/gui/move.ui
@@ -5,8 +5,8 @@
<rect>
<x>0</x>
<y>0</y>
- <width>254</width>
- <height>1146</height>
+ <width>244</width>
+ <height>1126</height>
</rect>
</property>
<property name="windowTitle" >
diff --git a/pokemodr/gui/species.ui b/pokemodr/gui/species.ui
index 97779cd1..c3de93a5 100644
--- a/pokemodr/gui/species.ui
+++ b/pokemodr/gui/species.ui
@@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>254</width>
- <height>2097</height>
+ <height>715</height>
</rect>
</property>
<property name="windowTitle" >
@@ -50,486 +50,714 @@
</widget>
</item>
<item>
- <widget class="QGroupBox" name="boxName" >
- <property name="title" >
- <string>Name</string>
- </property>
- <layout class="QHBoxLayout" >
- <item>
- <widget class="KLineEdit" name="varName" >
- <property name="toolTip" >
- <string>Name of the species</string>
- </property>
- <property name="showClearButton" stdset="0" >
- <bool>true</bool>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- </item>
- <item>
- <widget class="QGroupBox" name="boxBaseStats" >
- <property name="title" >
- <string>Base Stats</string>
- </property>
- <layout class="QVBoxLayout" >
- <item>
- <widget class="KComboBox" name="varBaseStat" >
- <property name="toolTip" >
- <string>Stat</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="KIntNumInput" name="varBaseStatValue" >
- <property name="toolTip" >
- <string>Base value for the stat</string>
- </property>
- <property name="label" >
- <string/>
- </property>
- <property name="minimum" >
- <number>0</number>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- </item>
- <item>
- <widget class="QGroupBox" name="boxEffortValues" >
- <property name="title" >
- <string>Effort Values</string>
- </property>
- <layout class="QVBoxLayout" >
- <item>
- <widget class="KComboBox" name="varEVStat" >
- <property name="toolTip" >
- <string>Stat</string>
- </property>
- <property name="insertPolicy" >
- <enum>QComboBox::NoInsert</enum>
- </property>
- <property name="sizeAdjustPolicy" >
- <enum>QComboBox::AdjustToContents</enum>
- </property>
- </widget>
- </item>
- <item>
- <widget class="KIntNumInput" name="varEffortValue" >
- <property name="toolTip" >
- <string>Number of effort value points given when defeated for given stat</string>
- </property>
- <property name="minimum" >
- <number>0</number>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- </item>
- <item>
- <widget class="QGroupBox" name="boxGrowth" >
- <property name="title" >
- <string>Growth</string>
- </property>
- <layout class="QHBoxLayout" >
- <item>
- <widget class="KComboBox" name="varGrowth" >
- <property name="toolTip" >
- <string>Level growth pattern</string>
- </property>
- <property name="editable" >
- <bool>false</bool>
- </property>
- <property name="insertPolicy" >
- <enum>QComboBox::NoInsert</enum>
- </property>
- <property name="sizeAdjustPolicy" >
- <enum>QComboBox::AdjustToContents</enum>
- </property>
- <property name="autoCompletion" >
- <bool>false</bool>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- </item>
- <item>
- <widget class="QGroupBox" name="boxExperienceValue" >
- <property name="title" >
- <string>Experience Value</string>
- </property>
- <layout class="QHBoxLayout" >
- <item>
- <widget class="KIntNumInput" name="varExperienceValue" >
- <property name="toolTip" >
- <string>Base value for experience points earned</string>
- </property>
- <property name="minimum" >
- <number>0</number>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- </item>
- <item>
- <widget class="QGroupBox" name="boxCatchValue" >
- <property name="title" >
- <string>Catch Value</string>
- </property>
- <layout class="QHBoxLayout" >
- <item>
- <widget class="KIntNumInput" name="varCatchValue" >
- <property name="toolTip" >
- <string>How easy it is to catch the species</string>
- </property>
- <property name="minimum" >
- <number>0</number>
- </property>
- <property name="maximum" >
- <number>255</number>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- </item>
- <item>
- <widget class="QGroupBox" name="boxRunChance" >
- <property name="title" >
- <string>Run Chance</string>
- </property>
- <layout class="QVBoxLayout" >
- <item>
- <widget class="KLineEdit" name="varRunChance" >
- <property name="toolTip" >
- <string>Chance the species runs from a wild battle</string>
- </property>
- <property name="readOnly" >
- <bool>true</bool>
- </property>
- </widget>
- </item>
- <item>
- <widget class="KIntNumInput" name="varRunChanceNum" >
- <property name="toolTip" >
- <string/>
- </property>
- <property name="label" >
- <string>Numerator</string>
- </property>
- <property name="minimum" >
- <number>0</number>
- </property>
- </widget>
- </item>
- <item>
- <widget class="KIntNumInput" name="varRunChanceDenom" >
- <property name="toolTip" >
- <string/>
- </property>
- <property name="label" >
- <string>Denominator</string>
- </property>
- <property name="minimum" >
- <number>1</number>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- </item>
- <item>
- <widget class="QGroupBox" name="boxItemChance" >
- <property name="title" >
- <string>Item Chance</string>
- </property>
- <layout class="QVBoxLayout" >
- <item>
- <widget class="KLineEdit" name="varItemChance" >
- <property name="toolTip" >
- <string>Chance the species is carrying an item in a wild battle</string>
- </property>
- <property name="readOnly" >
- <bool>true</bool>
- </property>
- </widget>
- </item>
- <item>
- <widget class="KIntNumInput" name="varItemChanceNum" >
- <property name="toolTip" >
- <string/>
- </property>
- <property name="label" >
- <string>Numerator</string>
- </property>
- <property name="minimum" >
- <number>0</number>
- </property>
- </widget>
- </item>
- <item>
- <widget class="KIntNumInput" name="varItemChanceDenom" >
- <property name="toolTip" >
- <string/>
- </property>
- <property name="label" >
- <string>Denominator</string>
- </property>
- <property name="minimum" >
- <number>1</number>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- </item>
- <item>
- <widget class="QGroupBox" name="boxPokedexInformation" >
- <property name="title" >
- <string>PokéDex Information</string>
+ <widget class="QTabWidget" name="notebookSpecies" >
+ <property name="currentIndex" >
+ <number>0</number>
</property>
- <layout class="QVBoxLayout" >
- <item>
- <widget class="KIntNumInput" name="varPokedexNumber" >
- <property name="toolTip" >
- <string>The PokéDex number of the species</string>
- </property>
- <property name="label" >
- <string>Number</string>
- </property>
- <property name="minimum" >
- <number>0</number>
- </property>
- </widget>
- </item>
- <item>
- <widget class="KIntNumInput" name="varWeight" >
- <property name="toolTip" >
- <string>The weight of the species</string>
- </property>
- <property name="label" >
- <string>Weight</string>
- </property>
- <property name="minimum" >
- <number>0</number>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QGroupBox" name="boxHeight" >
- <property name="title" >
- <string>Height</string>
- </property>
- <layout class="QVBoxLayout" >
- <item>
- <widget class="KIntNumInput" name="varHeightFeet" >
- <property name="toolTip" >
- <string>Height of the species</string>
- </property>
- <property name="label" >
- <string>Feet</string>
- </property>
- <property name="minimum" >
- <number>0</number>
- </property>
- <property name="suffix" >
- <string/>
- </property>
- </widget>
- </item>
- <item>
- <widget class="KIntNumInput" name="varHeightInches" >
- <property name="toolTip" >
- <string>Height of the species</string>
- </property>
- <property name="label" >
- <string>Inches</string>
- </property>
- <property name="minimum" >
- <number>0</number>
- </property>
- <property name="maximum" >
- <number>11</number>
- </property>
- <property name="suffix" >
- <string/>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- </item>
- <item>
- <widget class="QGroupBox" name="boxPokedexEntry" >
- <property name="title" >
- <string>Entry</string>
- </property>
- <layout class="QHBoxLayout" >
- <item>
- <widget class="KTextEdit" name="varPokedexEntry" >
- <property name="toolTip" >
- <string>The information on the species given in the PokéDex</string>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- </item>
- </layout>
- </widget>
- </item>
- <item>
- <widget class="QGroupBox" name="boxGenderChance" >
- <property name="title" >
- <string>Gender Chance</string>
- </property>
- <layout class="QVBoxLayout" >
- <item>
- <widget class="KLineEdit" name="varGenderChance" >
- <property name="toolTip" >
- <string>Chance of getting a female version of the species (negative is genderless)</string>
- </property>
- <property name="readOnly" >
- <bool>true</bool>
- </property>
- </widget>
- </item>
- <item>
- <widget class="KIntNumInput" name="varGenderChanceNum" >
- <property name="toolTip" >
- <string/>
- </property>
- <property name="label" >
- <string>Numerator</string>
- </property>
- <property name="minimum" >
- <number>-1</number>
- </property>
- </widget>
- </item>
- <item>
- <widget class="KIntNumInput" name="varGenderChanceDenom" >
- <property name="toolTip" >
- <string/>
- </property>
- <property name="label" >
- <string>Denominator</string>
- </property>
- <property name="minimum" >
- <number>1</number>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- </item>
- <item>
- <widget class="QGroupBox" name="boxEgg" >
- <property name="title" >
- <string>Egg</string>
- </property>
- <layout class="QVBoxLayout" >
- <item>
- <widget class="QGroupBox" name="boxSpecies" >
- <property name="title" >
- <string>Species</string>
- </property>
- <layout class="QHBoxLayout" >
- <item>
- <widget class="KComboBox" name="varEggSpecies" >
- <property name="toolTip" >
- <string>The species that hatches from an egg from this species</string>
- </property>
- <property name="insertPolicy" >
- <enum>QComboBox::NoInsert</enum>
- </property>
- <property name="sizeAdjustPolicy" >
- <enum>QComboBox::AdjustToContents</enum>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- </item>
- <item>
- <widget class="KIntNumInput" name="varEggSteps" >
- <property name="toolTip" >
- <string>The number of steps it takes to hatch the egg of the species</string>
- </property>
- <property name="label" >
- <string>Steps</string>
- </property>
- <property name="minimum" >
- <number>0</number>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- </item>
- <item>
- <widget class="QGroupBox" name="boxNidoranGroup" >
- <property name="title" >
- <string>Nidoran Group</string>
- </property>
- <layout class="QVBoxLayout" >
- <item>
- <widget class="KIntNumInput" name="varNidoranGroup" >
- <property name="toolTip" >
- <string>Nidoran group the species belongs to</string>
- </property>
- <property name="label" >
- <string/>
- </property>
- <property name="minimum" >
- <number>0</number>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- </item>
- <item>
- <widget class="QGroupBox" name="boxTypes" >
- <property name="title" >
- <string>Types</string>
- </property>
- <layout class="QHBoxLayout" >
- <item>
- <widget class="KListWidget" name="varTypes" >
- <property name="toolTip" >
- <string>The types of the species</string>
- </property>
- <property name="selectionMode" >
- <enum>QAbstractItemView::ExtendedSelection</enum>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- </item>
- <item>
- <widget class="QGroupBox" name="boxEggGroups" >
- <property name="title" >
- <string>Egg Groups</string>
- </property>
- <layout class="QHBoxLayout" >
- <item>
- <widget class="KListWidget" name="varEggGroups" >
- <property name="toolTip" >
- <string>The egg groups the species belongs to</string>
- </property>
- <property name="selectionMode" >
- <enum>QAbstractItemView::ExtendedSelection</enum>
- </property>
- </widget>
- </item>
- </layout>
+ <widget class="QWidget" name="tabGeneral" >
+ <attribute name="title" >
+ <string>General</string>
+ </attribute>
+ <layout class="QVBoxLayout" >
+ <item>
+ <widget class="QGroupBox" name="boxName" >
+ <property name="title" >
+ <string>Name</string>
+ </property>
+ <layout class="QHBoxLayout" >
+ <item>
+ <widget class="KLineEdit" name="varName" >
+ <property name="toolTip" >
+ <string>Name of the species</string>
+ </property>
+ <property name="showClearButton" stdset="0" >
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item>
+ <widget class="QGroupBox" name="boxTypes" >
+ <property name="title" >
+ <string>Types</string>
+ </property>
+ <layout class="QHBoxLayout" >
+ <item>
+ <widget class="KListWidget" name="varTypes" >
+ <property name="toolTip" >
+ <string>The types of the species</string>
+ </property>
+ <property name="selectionMode" >
+ <enum>QAbstractItemView::ExtendedSelection</enum>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item>
+ <widget class="QGroupBox" name="boxRunChance" >
+ <property name="title" >
+ <string>Run Chance</string>
+ </property>
+ <layout class="QVBoxLayout" >
+ <item>
+ <widget class="KLineEdit" name="varRunChance" >
+ <property name="toolTip" >
+ <string>Chance the species runs from a wild battle</string>
+ </property>
+ <property name="readOnly" >
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="KIntNumInput" name="varRunChanceNum" >
+ <property name="toolTip" >
+ <string/>
+ </property>
+ <property name="label" >
+ <string>Numerator</string>
+ </property>
+ <property name="minimum" >
+ <number>0</number>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="KIntNumInput" name="varRunChanceDenom" >
+ <property name="toolTip" >
+ <string/>
+ </property>
+ <property name="label" >
+ <string>Denominator</string>
+ </property>
+ <property name="minimum" >
+ <number>1</number>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item>
+ <widget class="QGroupBox" name="boxItemChance" >
+ <property name="title" >
+ <string>Item Chance</string>
+ </property>
+ <layout class="QVBoxLayout" >
+ <item>
+ <widget class="KLineEdit" name="varItemChance" >
+ <property name="toolTip" >
+ <string>Chance the species is carrying an item in a wild battle</string>
+ </property>
+ <property name="readOnly" >
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="KIntNumInput" name="varItemChanceNum" >
+ <property name="toolTip" >
+ <string/>
+ </property>
+ <property name="label" >
+ <string>Numerator</string>
+ </property>
+ <property name="minimum" >
+ <number>0</number>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="KIntNumInput" name="varItemChanceDenom" >
+ <property name="toolTip" >
+ <string/>
+ </property>
+ <property name="label" >
+ <string>Denominator</string>
+ </property>
+ <property name="minimum" >
+ <number>1</number>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item>
+ <spacer>
+ <property name="orientation" >
+ <enum>Qt::Vertical</enum>
+ </property>
+ <property name="sizeHint" >
+ <size>
+ <width>20</width>
+ <height>40</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ </layout>
+ </widget>
+ <widget class="QWidget" name="tabStats" >
+ <attribute name="title" >
+ <string>Stats</string>
+ </attribute>
+ <layout class="QVBoxLayout" >
+ <item>
+ <widget class="QGroupBox" name="boxBaseStats" >
+ <property name="title" >
+ <string>Base Stats</string>
+ </property>
+ <layout class="QVBoxLayout" >
+ <item>
+ <widget class="KComboBox" name="varBaseStat" >
+ <property name="toolTip" >
+ <string>Stat</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="KIntNumInput" name="varBaseStatValue" >
+ <property name="toolTip" >
+ <string>Base value for the stat</string>
+ </property>
+ <property name="label" >
+ <string/>
+ </property>
+ <property name="minimum" >
+ <number>0</number>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item>
+ <widget class="QGroupBox" name="boxEffortValues" >
+ <property name="title" >
+ <string>Effort Values</string>
+ </property>
+ <layout class="QVBoxLayout" >
+ <item>
+ <widget class="KComboBox" name="varEVStat" >
+ <property name="toolTip" >
+ <string>Stat</string>
+ </property>
+ <property name="insertPolicy" >
+ <enum>QComboBox::NoInsert</enum>
+ </property>
+ <property name="sizeAdjustPolicy" >
+ <enum>QComboBox::AdjustToContents</enum>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="KIntNumInput" name="varEffortValue" >
+ <property name="toolTip" >
+ <string>Number of effort value points given when defeated for given stat</string>
+ </property>
+ <property name="minimum" >
+ <number>0</number>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item>
+ <widget class="QGroupBox" name="boxGrowth" >
+ <property name="title" >
+ <string>Growth</string>
+ </property>
+ <layout class="QHBoxLayout" >
+ <item>
+ <widget class="KComboBox" name="varGrowth" >
+ <property name="toolTip" >
+ <string>Level growth pattern</string>
+ </property>
+ <property name="editable" >
+ <bool>false</bool>
+ </property>
+ <property name="insertPolicy" >
+ <enum>QComboBox::NoInsert</enum>
+ </property>
+ <property name="sizeAdjustPolicy" >
+ <enum>QComboBox::AdjustToContents</enum>
+ </property>
+ <property name="autoCompletion" >
+ <bool>false</bool>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item>
+ <widget class="QGroupBox" name="boxExperienceValue" >
+ <property name="title" >
+ <string>Experience Value</string>
+ </property>
+ <layout class="QHBoxLayout" >
+ <item>
+ <widget class="KIntNumInput" name="varExperienceValue" >
+ <property name="toolTip" >
+ <string>Base value for experience points earned</string>
+ </property>
+ <property name="minimum" >
+ <number>0</number>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item>
+ <widget class="QGroupBox" name="boxCatchValue" >
+ <property name="title" >
+ <string>Catch Value</string>
+ </property>
+ <layout class="QHBoxLayout" >
+ <item>
+ <widget class="KIntNumInput" name="varCatchValue" >
+ <property name="toolTip" >
+ <string>How easy it is to catch the species</string>
+ </property>
+ <property name="minimum" >
+ <number>0</number>
+ </property>
+ <property name="maximum" >
+ <number>255</number>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item>
+ <spacer>
+ <property name="orientation" >
+ <enum>Qt::Vertical</enum>
+ </property>
+ <property name="sizeHint" >
+ <size>
+ <width>20</width>
+ <height>16</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ </layout>
+ </widget>
+ <widget class="QWidget" name="tabPokedex" >
+ <attribute name="title" >
+ <string>PokéDex</string>
+ </attribute>
+ <layout class="QVBoxLayout" >
+ <item>
+ <widget class="KIntNumInput" name="varPokedexNumber" >
+ <property name="toolTip" >
+ <string>The PokéDex number of the species</string>
+ </property>
+ <property name="label" >
+ <string>Number</string>
+ </property>
+ <property name="minimum" >
+ <number>0</number>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="KIntNumInput" name="varWeight" >
+ <property name="toolTip" >
+ <string>The weight of the species</string>
+ </property>
+ <property name="label" >
+ <string>Weight</string>
+ </property>
+ <property name="minimum" >
+ <number>0</number>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QGroupBox" name="boxHeight" >
+ <property name="title" >
+ <string>Height</string>
+ </property>
+ <layout class="QVBoxLayout" >
+ <item>
+ <widget class="KIntNumInput" name="varHeightFeet" >
+ <property name="toolTip" >
+ <string>Height of the species</string>
+ </property>
+ <property name="label" >
+ <string>Feet</string>
+ </property>
+ <property name="minimum" >
+ <number>0</number>
+ </property>
+ <property name="suffix" >
+ <string/>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="KIntNumInput" name="varHeightInches" >
+ <property name="toolTip" >
+ <string>Height of the species</string>
+ </property>
+ <property name="label" >
+ <string>Inches</string>
+ </property>
+ <property name="minimum" >
+ <number>0</number>
+ </property>
+ <property name="maximum" >
+ <number>11</number>
+ </property>
+ <property name="suffix" >
+ <string/>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item>
+ <widget class="QGroupBox" name="boxPokedexEntry" >
+ <property name="title" >
+ <string>Entry</string>
+ </property>
+ <layout class="QVBoxLayout" >
+ <item>
+ <widget class="KTextEdit" name="varPokedexEntry" />
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item>
+ <spacer>
+ <property name="orientation" >
+ <enum>Qt::Vertical</enum>
+ </property>
+ <property name="sizeHint" >
+ <size>
+ <width>20</width>
+ <height>40</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ </layout>
+ </widget>
+ <widget class="QWidget" name="tabGenetics" >
+ <attribute name="title" >
+ <string>Genetics</string>
+ </attribute>
+ <layout class="QVBoxLayout" >
+ <item>
+ <widget class="QGroupBox" name="boxGenderChance" >
+ <property name="title" >
+ <string>Gender Chance</string>
+ </property>
+ <property name="checkable" >
+ <bool>true</bool>
+ </property>
+ <property name="checked" >
+ <bool>false</bool>
+ </property>
+ <layout class="QVBoxLayout" >
+ <item>
+ <widget class="KLineEdit" name="varGenderChance" >
+ <property name="toolTip" >
+ <string>Chance of getting a female version of the species (negative is genderless)</string>
+ </property>
+ <property name="readOnly" >
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="KIntNumInput" name="varGenderChanceNum" >
+ <property name="toolTip" >
+ <string/>
+ </property>
+ <property name="label" >
+ <string>Numerator</string>
+ </property>
+ <property name="minimum" >
+ <number>-1</number>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="KIntNumInput" name="varGenderChanceDenom" >
+ <property name="toolTip" >
+ <string/>
+ </property>
+ <property name="label" >
+ <string>Denominator</string>
+ </property>
+ <property name="minimum" >
+ <number>1</number>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item>
+ <widget class="QGroupBox" name="boxEggSpecies" >
+ <property name="title" >
+ <string>Egg Species</string>
+ </property>
+ <layout class="QVBoxLayout" >
+ <item>
+ <widget class="KComboBox" name="varEggSpecies" >
+ <property name="toolTip" >
+ <string>The species that hatches from an egg from this species</string>
+ </property>
+ <property name="insertPolicy" >
+ <enum>QComboBox::NoInsert</enum>
+ </property>
+ <property name="sizeAdjustPolicy" >
+ <enum>QComboBox::AdjustToContents</enum>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item>
+ <widget class="KIntNumInput" name="varEggSteps" >
+ <property name="toolTip" >
+ <string>The number of steps it takes to hatch the egg of the species</string>
+ </property>
+ <property name="label" >
+ <string>Steps</string>
+ </property>
+ <property name="minimum" >
+ <number>0</number>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="KIntNumInput" name="varNidoranGroup" >
+ <property name="toolTip" >
+ <string>Nidoran group the species belongs to</string>
+ </property>
+ <property name="label" >
+ <string>Nidoran Group</string>
+ </property>
+ <property name="minimum" >
+ <number>0</number>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QGroupBox" name="boxEggGroups" >
+ <property name="title" >
+ <string>Egg Groups</string>
+ </property>
+ <layout class="QHBoxLayout" >
+ <item>
+ <widget class="KListWidget" name="varEggGroups" >
+ <property name="toolTip" >
+ <string>The egg groups the species belongs to</string>
+ </property>
+ <property name="selectionMode" >
+ <enum>QAbstractItemView::ExtendedSelection</enum>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item>
+ <spacer>
+ <property name="orientation" >
+ <enum>Qt::Vertical</enum>
+ </property>
+ <property name="sizeHint" >
+ <size>
+ <width>20</width>
+ <height>40</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ </layout>
+ </widget>
+ <widget class="QWidget" name="tabSprites" >
+ <attribute name="title" >
+ <string>Sprites</string>
+ </attribute>
+ <layout class="QVBoxLayout" >
+ <item>
+ <widget class="QGroupBox" name="boxMaleSprites" >
+ <property name="title" >
+ <string>Male</string>
+ </property>
+ <layout class="QHBoxLayout" >
+ <item>
+ <spacer>
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" >
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <widget class="KIconButton" name="varMaleFront" />
+ </item>
+ <item>
+ <spacer>
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" >
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <widget class="KIconButton" name="varMaleBack" />
+ </item>
+ <item>
+ <spacer>
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" >
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item>
+ <widget class="QGroupBox" name="boxFemaleSprites" >
+ <property name="title" >
+ <string>Female</string>
+ </property>
+ <layout class="QHBoxLayout" >
+ <item>
+ <spacer>
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" >
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <widget class="KIconButton" name="varFemaleFront" />
+ </item>
+ <item>
+ <spacer>
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" >
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <widget class="KIconButton" name="varFemaleBack" />
+ </item>
+ <item>
+ <spacer>
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" >
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item>
+ <widget class="QGroupBox" name="boxList" >
+ <property name="title" >
+ <string>List</string>
+ </property>
+ <layout class="QHBoxLayout" >
+ <item>
+ <spacer>
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" >
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <widget class="KIconButton" name="varList" />
+ </item>
+ <item>
+ <spacer>
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" >
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item>
+ <spacer>
+ <property name="orientation" >
+ <enum>Qt::Vertical</enum>
+ </property>
+ <property name="sizeHint" >
+ <size>
+ <width>20</width>
+ <height>40</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ </layout>
+ </widget>
</widget>
</item>
<item>
@@ -539,8 +767,8 @@
</property>
<property name="sizeHint" >
<size>
- <width>20</width>
- <height>40</height>
+ <width>236</width>
+ <height>16</height>
</size>
</property>
</spacer>
@@ -555,6 +783,11 @@
<header>kcombobox.h</header>
</customwidget>
<customwidget>
+ <class>KIconButton</class>
+ <extends>QPushButton</extends>
+ <header>kicondialog.h</header>
+ </customwidget>
+ <customwidget>
<class>KIntNumInput</class>
<extends>QWidget</extends>
<header>knuminput.h</header>