diff options
Diffstat (limited to 'pokescripting/SkinWrapper.h')
| -rw-r--r-- | pokescripting/SkinWrapper.h | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/pokescripting/SkinWrapper.h b/pokescripting/SkinWrapper.h index 8212befa..f1274791 100644 --- a/pokescripting/SkinWrapper.h +++ b/pokescripting/SkinWrapper.h @@ -31,17 +31,12 @@ class POKESCRIPTING_EXPORT SkinWrapper : public ObjectWrapper Q_OBJECT public: - static SkinWrapper* create(const Pokemod::Skin* skin, QObject* parent) - { - if (!m_instances.contains(skin->id())) - m_instances[skin->id()] = new SkinWrapper(skin, parent); - return qobject_cast<SkinWrapper*>(m_instances[skin->id()]); - } - public slots: - QString name() const; - Pokemod::Script script() const; + static SkinWrapper* create(const Pokemod::Skin* skin, PokemodWrapper* parent); + + Q_SCRIPTABLE QString name() const; + Q_SCRIPTABLE Pokemod::Script script() const; private: - SkinWrapper(const Pokemod::Skin* skin, QObject* parent); + SkinWrapper(const Pokemod::Skin* skin, PokemodWrapper* parent); SkinWrapper& operator=(const SkinWrapper& rhs); const Pokemod::Skin* m_skin; |
