summaryrefslogtreecommitdiffstats
path: root/pokescripting/SoundWrapper.h
diff options
context:
space:
mode:
authorBen Boeckel <MathStuf@gmail.com>2008-08-05 06:10:55 +0000
committerBen Boeckel <MathStuf@gmail.com>2008-08-05 06:10:55 +0000
commitcf49a16b29ac412cfea125f7216a0e51e79aa4de (patch)
treefc3eb0271f3de0d7900c2a33ab5eafa259d8d250 /pokescripting/SoundWrapper.h
parent56b91df6010a9f3d304438cf95816399a6e46622 (diff)
downloadsigen-cf49a16b29ac412cfea125f7216a0e51e79aa4de.tar.gz
sigen-cf49a16b29ac412cfea125f7216a0e51e79aa4de.tar.xz
sigen-cf49a16b29ac412cfea125f7216a0e51e79aa4de.zip
[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
Diffstat (limited to 'pokescripting/SoundWrapper.h')
-rw-r--r--pokescripting/SoundWrapper.h32
1 files changed, 5 insertions, 27 deletions
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 <QtCore/QBuffer>
-
-// Phonon includes
-#include <Phonon/MediaObject>
-#include <Phonon/MediaSource>
+// 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