diff options
| author | Ben Boeckel <MathStuf@gmail.com> | 2008-01-23 04:50:24 +0000 |
|---|---|---|
| committer | Ben Boeckel <MathStuf@gmail.com> | 2008-01-23 04:50:24 +0000 |
| commit | ef250617e8163c535931be045aa4e9d59163ace7 (patch) | |
| tree | 5b76323ec66a63c3fca589b088b310c3fdaba2b7 /pokemod/Pokemod.cpp | |
| parent | efa80ce427e40070e36e5ab86d2f6dbf4ad50648 (diff) | |
| download | sigen-ef250617e8163c535931be045aa4e9d59163ace7.tar.gz sigen-ef250617e8163c535931be045aa4e9d59163ace7.tar.xz sigen-ef250617e8163c535931be045aa4e9d59163ace7.zip | |
[FIX] Grammer in Changelog
[FIX] Made pokemod classes contain their names for later ease
[ADD] PokéModr main window form
[FIX] Ini and Exception includes fixed
[FIX] BugCatcher bugs fixed
[FIX] .pro files fixed
[ADD] PokéModr main GUI almost complete
git-svn-id: https://pokegen.svn.sourceforge.net/svnroot/pokegen/trunk@40 6ecfd1a5-f3ed-3746-8530-beee90d26b22
Diffstat (limited to 'pokemod/Pokemod.cpp')
| -rw-r--r-- | pokemod/Pokemod.cpp | 132 |
1 files changed, 66 insertions, 66 deletions
diff --git a/pokemod/Pokemod.cpp b/pokemod/Pokemod.cpp index 5e76ad79..9585bbdd 100644 --- a/pokemod/Pokemod.cpp +++ b/pokemod/Pokemod.cpp @@ -33,7 +33,7 @@ const QStringList Pokemod::ValidationStr = QStringList() << "Message" << "Warn" << "Error"; Pokemod::Pokemod(const QString& fname) : - Object(*this, 0), + Object("Pokemod", *this, 0), valOutput(NULL), title(""), version(""), @@ -933,9 +933,9 @@ unsigned Pokemod::maxCompatability(const Pokemod& p) const void Pokemod::validationMsg(const QString& msg, Validation val) const throw(Exception) { if (!valOutput) - throw(Exception("Pokemod", "valOutput isn\'t set")); + throw(Exception(className, "valOutput isn\'t set")); if (V_End < val) - throw(BoundsException("Pokemod", "val")); + throw(BoundsException(className, "val")); (*valOutput) << ValidationStr[val] << QDateTime::currentDateTime().toString(" (yyyyMMdd hh:mm:ss.zzz ddd): ") << msg; } @@ -967,16 +967,16 @@ void Pokemod::setDescription(const QString& d) void Pokemod::setStartMap(const unsigned s) throw(BoundsException) { if (getMapIndex(s) == UINT_MAX) - throw(BoundsException("Pokemod", "startMap")); + throw(BoundsException(className, "startMap")); startMap = s; } void Pokemod::setStartWarp(const unsigned s) throw(BoundsException) { if (getMapIndex(startMap) == UINT_MAX) - throw(BoundsException("Pokemod", "startMap")); + throw(BoundsException(className, "startMap")); if (getMapByID(startMap).getWarpIndex(s) == UINT_MAX) - throw(BoundsException("Pokemod", "startWarp")); + throw(BoundsException(className, "startWarp")); startWarp = s; } @@ -984,54 +984,54 @@ void Pokemod::setWalkSkin(const QString& fname) throw(Exception) { QFile file(QString("%1/image/skin/walk.png").arg(getPath())); if (file.exists() && !file.remove()) - throw(RemoveException("Pokemod", file.fileName())); + throw(RemoveException(className, file.fileName())); if (!QFile::copy(fname, QString("%1/image/skin/walk.png").arg(getPath()))) - throw(SaveException("Pokemod", file.fileName())); + throw(SaveException(className, file.fileName())); } void Pokemod::setBikeSkin(const QString& fname) throw(Exception) { QFile file(QString("%1/image/skin/bike.png").arg(getPath())); if (file.exists() && !file.remove()) - throw(RemoveException("Pokemod", file.fileName())); + throw(RemoveException(className, file.fileName())); if (!QFile::copy(fname, QString("%1/image/skin/bike.png").arg(getPath()))) - throw(SaveException("Pokemod", file.fileName())); + throw(SaveException(className, file.fileName())); } void Pokemod::setSurfSkin(const QString& fname) throw(Exception) { QFile file(QString("%1/image/skin/surf.png").arg(getPath())); if (file.exists() && !file.remove()) - throw(RemoveException("Pokemod", file.fileName())); + throw(RemoveException(className, file.fileName())); if (!QFile::copy(fname, QString("%1/image/skin/surf.png").arg(getPath()))) - throw(SaveException("Pokemod", file.fileName())); + throw(SaveException(className, file.fileName())); } void Pokemod::setFlySkin(const QString& fname) throw(Exception) { QFile file(QString("%1/image/skin/fly.png").arg(getPath())); if (file.exists() && !file.remove()) - throw(RemoveException("Pokemod", file.fileName())); + throw(RemoveException(className, file.fileName())); if (!QFile::copy(fname, QString("%1/image/skin/fly.png").arg(getPath()))) - throw(SaveException("Pokemod", file.fileName())); + throw(SaveException(className, file.fileName())); } void Pokemod::setFishSkin(const QString& fname) throw(Exception) { QFile file(QString("%1/image/skin/fish.png").arg(getPath())); if (file.exists() && !file.remove()) - throw(RemoveException("Pokemod", file.fileName())); + throw(RemoveException(className, file.fileName())); if (!QFile::copy(fname, QString("%1/image/skin/fish.png").arg(getPath()))) - throw(SaveException("Pokemod", file.fileName())); + throw(SaveException(className, file.fileName())); } void Pokemod::setSurfFishSkin(const QString& fname) throw(Exception) { QFile file(QString("%1/image/skin/surfFish.png").arg(getPath())); if (file.exists() && !file.remove()) - throw(RemoveException("Pokemod", file.fileName())); + throw(RemoveException(className, file.fileName())); if (!QFile::copy(fname, QString("%1/image/skin/surfFish.png").arg(getPath()))) - throw(SaveException("Pokemod", file.fileName())); + throw(SaveException(className, file.fileName())); } void Pokemod::setSuperPCUname(const QString& u) @@ -1132,14 +1132,14 @@ Rules& Pokemod::getRules() const Ability& Pokemod::getAbility(const unsigned i) const throw(IndexException) { if (getAbilityCount() <= i) - throw(IndexException("Pokemod")); + throw(IndexException(className)); return abilities.at(i); } Ability& Pokemod::getAbility(const unsigned i) throw(IndexException) { if (getAbilityCount() <= i) - throw(IndexException("Pokemod")); + throw(IndexException(className)); return abilities[i]; } @@ -1189,21 +1189,21 @@ Ability& Pokemod::newAbility(const Ability& a) void Pokemod::deleteAbility(const unsigned i) throw(IndexException) { if (getAbilityCount() <= i) - throw(IndexException("Pokemod")); + throw(IndexException(className)); abilities.removeAt(i); } const Author& Pokemod::getAuthor(const unsigned i) const throw(IndexException) { if (getAuthorCount() <= i) - throw(IndexException("Pokemod")); + throw(IndexException(className)); return authors.at(i); } Author& Pokemod::getAuthor(const unsigned i) throw(IndexException) { if (getAuthorCount() <= i) - throw(IndexException("Pokemod")); + throw(IndexException(className)); return authors[i]; } @@ -1253,21 +1253,21 @@ Author& Pokemod::newAuthor(const Author& a) void Pokemod::deleteAuthor(const unsigned i) throw(IndexException) { if (getAuthorCount() <= i) - throw(IndexException("Pokemod")); + throw(IndexException(className)); authors.removeAt(i); } const Badge& Pokemod::getBadge(const unsigned i) const throw(IndexException) { if (i < getBadgeCount()) - throw(IndexException("Pokemod")); + throw(IndexException(className)); return badges.at(i); } Badge& Pokemod::getBadge(const unsigned i) throw(IndexException) { if (i < getBadgeCount()) - throw(IndexException("Pokemod")); + throw(IndexException(className)); return badges[i]; } @@ -1317,21 +1317,21 @@ Badge& Pokemod::newBadge(const Badge& b) void Pokemod::deleteBadge(const unsigned i) throw(IndexException) { if (getBadgeCount() <= i) - throw(IndexException("Pokemod")); + throw(IndexException(className)); badges.removeAt(i); } const CoinList& Pokemod::getCoinList(const unsigned i) const throw(IndexException) { if (getCoinListCount() <= i) - throw(IndexException("Pokemod")); + throw(IndexException(className)); return coinLists.at(i); } CoinList& Pokemod::getCoinList(const unsigned i) throw(IndexException) { if (getCoinListCount() <= i) - throw(IndexException("Pokemod")); + throw(IndexException(className)); return coinLists[i]; } @@ -1381,21 +1381,21 @@ CoinList& Pokemod::newCoinList(const CoinList& c) void Pokemod::deleteCoinList(const unsigned i) throw(IndexException) { if (getCoinListCount() <= i) - throw(IndexException("Pokemod")); + throw(IndexException(className)); coinLists.removeAt(i); } const Dialog& Pokemod::getDialog(const unsigned i) const throw(IndexException) { if (getDialogCount() <= i) - throw(IndexException("Pokemod")); + throw(IndexException(className)); return dialogs.at(i); } Dialog& Pokemod::getDialog(const unsigned i) throw(IndexException) { if (getDialogCount() <= i) - throw(IndexException("Pokemod")); + throw(IndexException(className)); return dialogs[i]; } @@ -1445,21 +1445,21 @@ Dialog& Pokemod::newDialog(const Dialog& d) void Pokemod::deleteDialog(const unsigned i) throw(IndexException) { if (getDialogCount() <= i) - throw(IndexException("Pokemod")); + throw(IndexException(className)); dialogs.removeAt(i); } const EggGroup& Pokemod::getEggGroup(const unsigned i) const throw(IndexException) { if (getEggGroupCount() <= i) - throw(IndexException("Pokemod")); + throw(IndexException(className)); return eggGroups.at(i); } EggGroup& Pokemod::getEggGroup(const unsigned i) throw(IndexException) { if (getEggGroupCount() <= i) - throw(IndexException("Pokemod")); + throw(IndexException(className)); return eggGroups[i]; } @@ -1509,21 +1509,21 @@ EggGroup& Pokemod::newEggGroup(const EggGroup& e) void Pokemod::deleteEggGroup(const unsigned i) throw(IndexException) { if (getEggGroupCount() <= i) - throw(IndexException("Pokemod")); + throw(IndexException(className)); eggGroups.removeAt(i); } const Item& Pokemod::getItem(const unsigned i) const throw(IndexException) { if (getItemCount() <= i) - throw(IndexException("Pokemod")); + throw(IndexException(className)); return items.at(i); } Item& Pokemod::getItem(const unsigned i) throw(IndexException) { if (getItemCount() <= i) - throw(IndexException("Pokemod")); + throw(IndexException(className)); return items[i]; } @@ -1573,21 +1573,21 @@ Item& Pokemod::newItem(const Item& i) void Pokemod::deleteItem(const unsigned i) throw(IndexException) { if (getItemCount() <= i) - throw(IndexException("Pokemod")); + throw(IndexException(className)); items.removeAt(i); } const ItemType& Pokemod::getItemType(const unsigned i) const throw(IndexException) { if (getItemTypeCount() <= i) - throw(IndexException("Pokemod")); + throw(IndexException(className)); return itemTypes.at(i); } ItemType& Pokemod::getItemType(const unsigned i) throw(IndexException) { if (getItemTypeCount() <= i) - throw(IndexException("Pokemod")); + throw(IndexException(className)); return itemTypes[i]; } @@ -1637,21 +1637,21 @@ ItemType& Pokemod::newItemType(const ItemType& i) void Pokemod::deleteItemType(const unsigned i) throw(IndexException) { if (getItemTypeCount() <= i) - throw(IndexException("Pokemod")); + throw(IndexException(className)); itemTypes.removeAt(i); } const Map& Pokemod::getMap(const unsigned i) const throw(IndexException) { if (getMapCount() <= i) - throw(IndexException("Pokemod")); + throw(IndexException(className)); return maps.at(i); } Map& Pokemod::getMap(const unsigned i) throw(IndexException) { if (getMapCount() <= i) - throw(IndexException("Pokemod")); + throw(IndexException(className)); return maps[i]; } @@ -1701,21 +1701,21 @@ Map& Pokemod::newMap(const Map& m) void Pokemod::deleteMap(const unsigned i) throw(IndexException) { if (getMapCount() <= i) - throw(IndexException("Pokemod")); + throw(IndexException(className)); maps.removeAt(i); } const Move& Pokemod::getMove(const unsigned i) const throw(IndexException) { if (getMoveCount() <= i) - throw(IndexException("Pokemod")); + throw(IndexException(className)); return moves.at(i); } Move& Pokemod::getMove(const unsigned i) throw(IndexException) { if (getMoveCount() <= i) - throw(IndexException("Pokemod")); + throw(IndexException(className)); return moves[i]; } @@ -1765,21 +1765,21 @@ Move& Pokemod::newMove(const Move& m) void Pokemod::deleteMove(const unsigned i) throw(IndexException) { if (getMoveCount() <= i) - throw(IndexException("Pokemod")); + throw(IndexException(className)); moves.removeAt(i); } const Nature& Pokemod::getNature(const unsigned i) const throw(IndexException) { if (getNatureCount() <= i) - throw(IndexException("Pokemod")); + throw(IndexException(className)); return natures.at(i); } Nature& Pokemod::getNature(const unsigned i) throw(IndexException) { if (getNatureCount() <= i) - throw(IndexException("Pokemod")); + throw(IndexException(className)); return natures[i]; } @@ -1829,21 +1829,21 @@ Nature& Pokemod::newNature(const Nature& n) void Pokemod::deleteNature(const unsigned i) throw(IndexException) { if (getNatureCount() <= i) - throw(IndexException("Pokemod")); + throw(IndexException(className)); natures.removeAt(i); } const Species& Pokemod::getSpecies(const unsigned i) const throw(IndexException) { if (getSpeciesCount() <= i) - throw(IndexException("Pokemod")); + throw(IndexException(className)); return species.at(i); } Species& Pokemod::getSpecies(const unsigned i) throw(IndexException) { if (getSpeciesCount() <= i) - throw(IndexException("Pokemod")); + throw(IndexException(className)); return species[i]; } @@ -1893,21 +1893,21 @@ Species& Pokemod::newSpecies(const Species& s) void Pokemod::deleteSpecies(const unsigned i) throw(IndexException) { if (getSpeciesCount() <= i) - throw(IndexException("Pokemod")); + throw(IndexException(className)); species.removeAt(i); } const Store& Pokemod::getStore(const unsigned i) const throw(IndexException) { if (getStoreCount() <= i) - throw(IndexException("Pokemod")); + throw(IndexException(className)); return stores.at(i); } Store& Pokemod::getStore(const unsigned i) throw(IndexException) { if (getStoreCount() <= i) - throw(IndexException("Pokemod")); + throw(IndexException(className)); return stores[i]; } @@ -1957,21 +1957,21 @@ Store& Pokemod::newStore(const Store& s) void Pokemod::deleteStore(const unsigned i) throw(IndexException) { if (getStoreCount() <= i) - throw(IndexException("Pokemod")); + throw(IndexException(className)); stores.removeAt(i); } const Tile& Pokemod::getTile(const unsigned i) const throw(IndexException) { if (getTileCount() <= i) - throw(IndexException("Pokemod")); + throw(IndexException(className)); return tiles.at(i); } Tile& Pokemod::getTile(const unsigned i) throw(IndexException) { if (getTileCount() <= i) - throw(IndexException("Pokemod")); + throw(IndexException(className)); return tiles[i]; } @@ -2021,21 +2021,21 @@ Tile& Pokemod::newTile(const Tile& t) void Pokemod::deleteTile(const unsigned i) throw(IndexException) { if (getTileCount() <= i) - throw(IndexException("Pokemod")); + throw(IndexException(className)); tiles.removeAt(i); } const Time& Pokemod::getTime(const unsigned i) const throw(IndexException) { if (getTimeCount() <= i) - throw(IndexException("Pokemod")); + throw(IndexException(className)); return times.at(i); } Time& Pokemod::getTime(const unsigned i) throw(IndexException) { if (getTimeCount() <= i) - throw(IndexException("Pokemod")); + throw(IndexException(className)); return times[i]; } @@ -2085,21 +2085,21 @@ Time& Pokemod::newTime(const Time& t) void Pokemod::deleteTime(const unsigned i) throw(IndexException) { if (getTimeCount() <= i) - throw(IndexException("Pokemod")); + throw(IndexException(className)); times.removeAt(i); } const Type& Pokemod::getType(const unsigned i) const throw(IndexException) { if (getTypeCount() <= i) - throw(IndexException("Pokemod")); + throw(IndexException(className)); return types.at(i); } Type& Pokemod::getType(const unsigned i) throw(IndexException) { if (getTypeCount() <= i) - throw(IndexException("Pokemod")); + throw(IndexException(className)); return types[i]; } @@ -2158,7 +2158,7 @@ Type& Pokemod::newType(const Type& t) void Pokemod::deleteType(const unsigned i) throw(IndexException) { if (getTypeCount() <= i) - throw(IndexException("Pokemod")); + throw(IndexException(className)); typeChart.deleteCol(i); typeChart.deleteRow(i); } |
