diff options
| author | manuel <manuel@mausz.at> | 2011-04-07 19:35:53 +0200 |
|---|---|---|
| committer | manuel <manuel@mausz.at> | 2011-04-07 19:35:53 +0200 |
| commit | dd99879ab004dd1d81b5942ad35d5ea6c1476c10 (patch) | |
| tree | 8750906915f33a1dc9a1ad1750d6620abd1bf4e2 /pacman-c++/audioplayer.h | |
| parent | 9ef1e89e3ec01a5a34863b1b0aa3483b49404560 (diff) | |
| download | foop-dd99879ab004dd1d81b5942ad35d5ea6c1476c10.tar.gz foop-dd99879ab004dd1d81b5942ad35d5ea6c1476c10.tar.bz2 foop-dd99879ab004dd1d81b5942ad35d5ea6c1476c10.zip | |
fixing app icon on windows
add audio player
Diffstat (limited to 'pacman-c++/audioplayer.h')
| -rw-r--r-- | pacman-c++/audioplayer.h | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/pacman-c++/audioplayer.h b/pacman-c++/audioplayer.h new file mode 100644 index 0000000..3dc3cfd --- /dev/null +++ b/pacman-c++/audioplayer.h | |||
| @@ -0,0 +1,38 @@ | |||
| 1 | #ifndef AUDIOPLAYER_H | ||
| 2 | #define AUDIOPLAYER_H | ||
| 3 | |||
| 4 | #include <QObject> | ||
| 5 | #include <phonon/phononnamespace.h> | ||
| 6 | |||
| 7 | namespace Phonon | ||
| 8 | { | ||
| 9 | class MediaObject; | ||
| 10 | class AudioOutput; | ||
| 11 | } | ||
| 12 | |||
| 13 | class AudioPlayer | ||
| 14 | : public QObject | ||
| 15 | { | ||
| 16 | Q_OBJECT | ||
| 17 | |||
| 18 | public: | ||
| 19 | AudioPlayer(); | ||
| 20 | static AudioPlayer *self(); | ||
| 21 | void stop(); | ||
| 22 | void setMuted(bool mute = true); | ||
| 23 | void playIntro(); | ||
| 24 | |||
| 25 | signals: | ||
| 26 | void finished(); | ||
| 27 | |||
| 28 | private slots: | ||
| 29 | void finished_p(); | ||
| 30 | void stateChanged_p(Phonon::State newstate, Phonon::State oldstate); | ||
| 31 | |||
| 32 | private: | ||
| 33 | Phonon::MediaObject *m_player; | ||
| 34 | Phonon::AudioOutput *m_output; | ||
| 35 | static AudioPlayer *m_instance; | ||
| 36 | }; | ||
| 37 | |||
| 38 | #endif // AUDIOPLAYER_H | ||
