/* * Copyright 2008 Ben Boeckel * * 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 . */ #ifndef __POKEMOD_TRAINER__ #define __POKEMOD_TRAINER__ // Qt includes #include // General includes #include // Pokemod includes #include "Object.h" // Forward declarations class Pokemod; class Trainer : public Object { public: Trainer(const Pokemod* pokemod, const int id); Trainer(const Pokemod* pokemod, const Trainer& trainer, const int id); Trainer(const Pokemod* pokemod, const QDomElement& xml, const int id = INT_MAX); void load(const QDomElement& xml, int id = INT_MAX); QDomElement save() const; void setName(const QString& name); void setMoneyFactor(const int moneyFactor) throw(BoundsException); void setSkin(const QPixmap& skin) throw(Exception); // void setAi(const QString& fileName) throw(Exception); QString name() const; int moneyFactor() const; QPixmap skin() const; // QString ai() const; Trainer& operator=(const Trainer& rhs); private: bool validate() const; void clear() { } QString m_name; int m_moneyFactor; QPixmap m_skin; }; #endif