summaryrefslogtreecommitdiffstats
path: root/pokescripting/SoundWrapper.h
diff options
context:
space:
mode:
Diffstat (limited to 'pokescripting/SoundWrapper.h')
-rw-r--r--pokescripting/SoundWrapper.h16
1 files changed, 6 insertions, 10 deletions
diff --git a/pokescripting/SoundWrapper.h b/pokescripting/SoundWrapper.h
index 7ad98e49..3af17f0c 100644
--- a/pokescripting/SoundWrapper.h
+++ b/pokescripting/SoundWrapper.h
@@ -37,17 +37,13 @@ class POKESCRIPTING_EXPORT SoundWrapper : public ObjectWrapper
Q_OBJECT
public:
- static SoundWrapper* create(const Pokemod::Sound* sound, QObject* parent)
- {
- if (!m_instances.contains(sound->id()))
- m_instances[sound->id()] = new SoundWrapper(sound, parent);
- return qobject_cast<SoundWrapper*>(m_instances[sound->id()]);
- }
- public slots:
- QString name() const;
- Phonon::MediaObject* data();
+ static SoundWrapper* create(const Pokemod::Sound* sound, PokemodWrapper* parent);
+
+ Q_SCRIPTABLE QString name() const;
+ Q_SCRIPTABLE Pokemod::Sound::Type type() const;
+ Q_SCRIPTABLE Phonon::MediaObject* data();
private:
- SoundWrapper(const Pokemod::Sound* sound, QObject* parent);
+ SoundWrapper(const Pokemod::Sound* sound, PokemodWrapper* parent);
SoundWrapper& operator=(const SoundWrapper& rhs);
const Pokemod::Sound* m_sound;