Changeset View
Changeset View
Standalone View
Standalone View
core/audioplayer_p.h
1 | /*************************************************************************** | 1 | /*************************************************************************** | ||
---|---|---|---|---|---|
2 | * Copyright (C) 2007 by Pino Toscano <pino@kde.org> * | 2 | * Copyright (C) 2007 by Pino Toscano <pino@kde.org> * | ||
3 | * * | 3 | * * | ||
4 | * This program is free software; you can redistribute it and/or modify * | 4 | * This program is free software; you can redistribute it and/or modify * | ||
5 | * it under the terms of the GNU General Public License as published by * | 5 | * it under the terms of the GNU General Public License as published by * | ||
6 | * the Free Software Foundation; either version 2 of the License, or * | 6 | * the Free Software Foundation; either version 2 of the License, or * | ||
7 | * (at your option) any later version. * | 7 | * (at your option) any later version. * | ||
8 | ***************************************************************************/ | 8 | ***************************************************************************/ | ||
9 | 9 | | |||
10 | #ifndef _OKULAR_AUDIOPLAYER_P_H_ | 10 | #ifndef _OKULAR_AUDIOPLAYER_P_H_ | ||
11 | #define _OKULAR_AUDIOPLAYER_P_H_ | 11 | #define _OKULAR_AUDIOPLAYER_P_H_ | ||
12 | 12 | | |||
13 | // qt/kde includes | 13 | // qt/kde includes | ||
14 | #include <qhash.h> | 14 | #include <qhash.h> | ||
15 | #include <qsignalmapper.h> | | |||
16 | #include <QUrl> | 15 | #include <QUrl> | ||
17 | 16 | | |||
18 | class QBuffer; | 17 | class QBuffer; | ||
19 | class PlayData; | 18 | class PlayData; | ||
20 | class SoundInfo; | 19 | class SoundInfo; | ||
21 | 20 | | |||
22 | namespace Okular { | 21 | namespace Okular { | ||
23 | 22 | | |||
24 | class AudioPlayer; | 23 | class AudioPlayer; | ||
25 | 24 | | |||
26 | class AudioPlayerPrivate | 25 | class AudioPlayerPrivate | ||
27 | { | 26 | { | ||
28 | public: | 27 | public: | ||
29 | explicit AudioPlayerPrivate( AudioPlayer * qq ); | 28 | explicit AudioPlayerPrivate( AudioPlayer * qq ); | ||
30 | 29 | | |||
31 | ~AudioPlayerPrivate(); | 30 | ~AudioPlayerPrivate(); | ||
32 | 31 | | |||
33 | int newId() const; | 32 | int newId() const; | ||
34 | bool play( const SoundInfo& si ); | 33 | bool play( const SoundInfo& si ); | ||
35 | void stopPlayings(); | 34 | void stopPlayings(); | ||
36 | 35 | | |||
37 | // private slots | | |||
38 | void finished( int ); | 36 | void finished( int ); | ||
39 | 37 | | |||
40 | AudioPlayer * q; | 38 | AudioPlayer * q; | ||
41 | 39 | | |||
42 | QHash< int, PlayData * > m_playing; | 40 | QHash< int, PlayData * > m_playing; | ||
43 | QSignalMapper m_mapper; | | |||
44 | QUrl m_currentDocument; | 41 | QUrl m_currentDocument; | ||
45 | AudioPlayer::State m_state; | 42 | AudioPlayer::State m_state; | ||
46 | }; | 43 | }; | ||
47 | 44 | | |||
48 | } | 45 | } | ||
49 | 46 | | |||
50 | #endif | 47 | #endif |