diff options
Diffstat (limited to 'sigscript/BadgeWrapper.h')
-rw-r--r-- | sigscript/BadgeWrapper.h | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/sigscript/BadgeWrapper.h b/sigscript/BadgeWrapper.h new file mode 100644 index 00000000..1feeb6e9 --- /dev/null +++ b/sigscript/BadgeWrapper.h @@ -0,0 +1,53 @@ +/* + * Copyright 2008 Ben Boeckel <MathStuf@gmail.com> + * + * 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 __POKESCRIPTING_BADGEWRAPPER__ +#define __POKESCRIPTING_BADGEWRAPPER__ + +// Pokescripting includes +#include "ObjectWrapper.h" + +// Pokemod includes +#include "../pokemod/Badge.h" + +namespace Pokescripting +{ +// Forward declarations +class SpriteWrapper; + +class POKESCRIPTING_EXPORT BadgeWrapper : public ObjectWrapper +{ + Q_OBJECT + + public: + static BadgeWrapper* create(const Pokemod::Badge* badge, PokemodWrapper* parent); + + Q_SCRIPTABLE QString name() const; + Q_SCRIPTABLE SpriteWrapper* face(); + Q_SCRIPTABLE SpriteWrapper* badge(); + Q_SCRIPTABLE int obey() const; + Q_SCRIPTABLE Pokemod::Fraction stat(const Pokemod::Stat stat) const; + private: + BadgeWrapper(const Pokemod::Badge* badge, PokemodWrapper* parent); + BadgeWrapper& operator=(const BadgeWrapper& rhs); + + const Pokemod::Badge* m_badge; +}; +} +Q_DECLARE_METATYPE(Pokescripting::BadgeWrapper*) + +#endif |