/* * 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 SIGMOD_TRAINER #define SIGMOD_TRAINER // Sigmod includes #include "Object.h" // Qt includes #include namespace Sigmod { // Forward declarations class Sigmod; class SIGMOD_EXPORT Trainer : public Object { Q_OBJECT Q_ENUMS(Intelligence) public: enum Intelligence { Ignorant = 0, Determine = 1, Remember = 2, Cheating = 3 }; static const QStringList IntelligenceStr; Trainer(const Trainer& trainer); Trainer(const Sigmod* parent, const int id); Trainer(const Trainer& trainer, const Sigmod* parent, const int id); Trainer(const QDomElement& xml, const Sigmod* parent, const int id = -1); void validate(); void load(const QDomElement& xml); QDomElement save() const; void setName(const QString& name); void setMoneyFactor(const int moneyFactor); void setSkin(const int skin); void setDepth(const int depth); void setTeamIntel(const Intelligence teamIntel); void setMoveIntel(const Intelligence moveIntel); void setItemIntel(const Intelligence itemIntel); void setAbilityIntel(const Intelligence abilityIntel); void setStatIntel(const Intelligence statIntel); QString name() const; int moneyFactor() const; int skin() const; int depth() const; Intelligence teamIntel() const; Intelligence moveIntel() const; Intelligence itemIntel() const; Intelligence abilityIntel() const; Intelligence statIntel() const; bool nameCheck(const QString& name) const; bool moneyFactorCheck(const int moneyFactor) const; bool skinCheck(const int skin) const; bool depthCheck(const int depth) const; bool teamIntelCheck(const Intelligence teamIntel) const; bool moveIntelCheck(const Intelligence moveIntel) const; bool itemIntelCheck(const Intelligence itemIntel) const; bool abilityIntelCheck(const Intelligence abilityIntel) const; bool statIntelCheck(const Intelligence statIntel) const; Trainer& operator=(const Trainer& rhs); private: QString m_name; int m_moneyFactor; int m_skin; int m_depth; Intelligence m_teamIntel; Intelligence m_moveIntel; Intelligence m_itemIntel; Intelligence m_abilityIntel; Intelligence m_statIntel; }; } Q_DECLARE_METATYPE(Sigmod::Trainer::Intelligence) #endif