From cf49a16b29ac412cfea125f7216a0e51e79aa4de Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Tue, 5 Aug 2008 06:10:55 +0000 Subject: [FIX] List members of pokemod classes now can be returned in their entirety [FIX] Reworked pokescripting for ease of use [FIX] Now (selected) pokemod values can be overridden in pokescripting git-svn-id: https://pokegen.svn.sourceforge.net/svnroot/pokegen/trunk@237 6ecfd1a5-f3ed-3746-8530-beee90d26b22 --- pokescripting/SoundWrapper.h | 32 +++++--------------------------- 1 file changed, 5 insertions(+), 27 deletions(-) (limited to 'pokescripting/SoundWrapper.h') diff --git a/pokescripting/SoundWrapper.h b/pokescripting/SoundWrapper.h index 9f7f7eec..7ad98e49 100644 --- a/pokescripting/SoundWrapper.h +++ b/pokescripting/SoundWrapper.h @@ -24,12 +24,11 @@ // Pokemod includes #include "../pokemod/Sound.h" -// Qt includes -#include - -// Phonon includes -#include -#include +// Forward declarations +namespace Phonon +{ +class MediaObject; +} namespace Pokescripting { @@ -53,27 +52,6 @@ class POKESCRIPTING_EXPORT SoundWrapper : public ObjectWrapper const Pokemod::Sound* m_sound; }; - -inline SoundWrapper::SoundWrapper(const Pokemod::Sound* sound, QObject* parent) : - ObjectWrapper(sound, parent), - m_sound(sound) -{ -} - -inline QString SoundWrapper::name() const -{ - return m_sound->name(); -} - -inline Phonon::MediaObject* SoundWrapper::data() -{ - Phonon::MediaObject* media = new Phonon::MediaObject(this); - QBuffer* buffer = new QBuffer(media); - buffer->setData(m_sound->data()); - media->setCurrentSource(buffer); - return media; -} - } #endif -- cgit