diff options
Diffstat (limited to 'pokescripting/BadgeWrapper.h')
| -rw-r--r-- | pokescripting/BadgeWrapper.h | 80 |
1 files changed, 80 insertions, 0 deletions
diff --git a/pokescripting/BadgeWrapper.h b/pokescripting/BadgeWrapper.h new file mode 100644 index 00000000..bafb1509 --- /dev/null +++ b/pokescripting/BadgeWrapper.h @@ -0,0 +1,80 @@ +/* + * 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 +{ +class POKESCRIPTING_EXPORT BadgeWrapper : public ObjectWrapper +{ + Q_OBJECT + + public: + BadgeWrapper(const Pokemod::Badge* badge, QObject* parent); + public slots: + QString name() const; + QPixmap face() const; + QPixmap badge() const; + int obey() const; + Pokemod::Fraction stat(const int stat) const; + private: + BadgeWrapper& operator=(const BadgeWrapper& rhs); + + const Pokemod::Badge* m_badge; +}; + +inline BadgeWrapper::BadgeWrapper(const Pokemod::Badge* badge, QObject* parent) : + ObjectWrapper(badge, parent), + m_badge(badge) +{ +} + +inline QString BadgeWrapper::name() const +{ + return m_badge->name(); +} + +inline QPixmap BadgeWrapper::face() const +{ + return m_badge->face(); +} + +inline QPixmap BadgeWrapper::badge() const +{ + return m_badge->badge(); +} + +inline int BadgeWrapper::obey() const +{ + return m_badge->obey(); +} + +inline Pokemod::Fraction BadgeWrapper::stat(const int stat) const +{ + return m_badge->stat(stat); +} + +} + +#endif |
