summaryrefslogtreecommitdiff
path: root/core/multimedia/opieplayer/mediaplayerstate.h
Unidiff
Diffstat (limited to 'core/multimedia/opieplayer/mediaplayerstate.h') (more/less context) (ignore whitespace changes)
-rw-r--r--core/multimedia/opieplayer/mediaplayerstate.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/multimedia/opieplayer/mediaplayerstate.h b/core/multimedia/opieplayer/mediaplayerstate.h
index 26185c5..1c65599 100644
--- a/core/multimedia/opieplayer/mediaplayerstate.h
+++ b/core/multimedia/opieplayer/mediaplayerstate.h
@@ -12,48 +12,49 @@
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13** 13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information. 14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15** 15**
16** Contact info@trolltech.com if any conditions of this licensing are 16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you. 17** not clear to you.
18** 18**
19**********************************************************************/ 19**********************************************************************/
20#ifndef MEDIA_PLAYER_STATE_H 20#ifndef MEDIA_PLAYER_STATE_H
21#define MEDIA_PLAYER_STATE_H 21#define MEDIA_PLAYER_STATE_H
22 22
23 23
24#include <qobject.h> 24#include <qobject.h>
25 25
26 26
27class MediaPlayerDecoder; 27class MediaPlayerDecoder;
28class Config; 28class Config;
29 29
30 30
31class MediaPlayerState : public QObject { 31class MediaPlayerState : public QObject {
32Q_OBJECT 32Q_OBJECT
33public: 33public:
34 MediaPlayerState( QObject *parent, const char *name ); 34 MediaPlayerState( QObject *parent, const char *name );
35 ~MediaPlayerState(); 35 ~MediaPlayerState();
36 bool isPaused;
36 37
37 bool isStreaming; 38 bool isStreaming;
38 bool fullscreen() { return isFullscreen; } 39 bool fullscreen() { return isFullscreen; }
39 bool scaled() { return isScaled; } 40 bool scaled() { return isScaled; }
40 bool looping() { return isLooping; } 41 bool looping() { return isLooping; }
41 bool shuffled() { return isShuffled; } 42 bool shuffled() { return isShuffled; }
42 bool playlist() { return usePlaylist; } 43 bool playlist() { return usePlaylist; }
43 bool paused() { return isPaused; } 44 bool paused() { return isPaused; }
44 bool playing() { return isPlaying; } 45 bool playing() { return isPlaying; }
45 long position() { return curPosition; } 46 long position() { return curPosition; }
46 long length() { return curLength; } 47 long length() { return curLength; }
47 char view() { return curView; } 48 char view() { return curView; }
48 49
49 MediaPlayerDecoder *newDecoder( const QString& file ); 50 MediaPlayerDecoder *newDecoder( const QString& file );
50 MediaPlayerDecoder *curDecoder(); 51 MediaPlayerDecoder *curDecoder();
51 MediaPlayerDecoder *libMpeg3Decoder(); // ### Yucky hack needed to use libmpeg3plugin to get the 52 MediaPlayerDecoder *libMpeg3Decoder(); // ### Yucky hack needed to use libmpeg3plugin to get the
52 // number of audio samples if we are using the libmad plugin 53 // number of audio samples if we are using the libmad plugin
53public slots: 54public slots:
54 void setFullscreen( bool b ) { if ( isFullscreen == b ) return; isFullscreen = b; emit fullscreenToggled(b); } 55 void setFullscreen( bool b ) { if ( isFullscreen == b ) return; isFullscreen = b; emit fullscreenToggled(b); }
55 void setScaled( bool b ) { if ( isScaled == b ) return; isScaled = b; emit scaledToggled(b); } 56 void setScaled( bool b ) { if ( isScaled == b ) return; isScaled = b; emit scaledToggled(b); }
56 void setLooping( bool b ) { if ( isLooping == b ) return; isLooping = b; emit loopingToggled(b); } 57 void setLooping( bool b ) { if ( isLooping == b ) return; isLooping = b; emit loopingToggled(b); }
57 void setShuffled( bool b ) { if ( isShuffled == b ) return; isShuffled = b; emit shuffledToggled(b); } 58 void setShuffled( bool b ) { if ( isShuffled == b ) return; isShuffled = b; emit shuffledToggled(b); }
58 void setPlaylist( bool b ) { if ( usePlaylist == b ) return; usePlaylist = b; emit playlistToggled(b); } 59 void setPlaylist( bool b ) { if ( usePlaylist == b ) return; usePlaylist = b; emit playlistToggled(b); }
59 void setPaused( bool b ) { if ( isPaused == b ) return; isPaused = b; emit pausedToggled(b); } 60 void setPaused( bool b ) { if ( isPaused == b ) return; isPaused = b; emit pausedToggled(b); }
@@ -80,42 +81,41 @@ public slots:
80 void togglePlaying() { setPlaying( !isPlaying); } 81 void togglePlaying() { setPlaying( !isPlaying); }
81 82
82signals: 83signals:
83 void fullscreenToggled( bool ); 84 void fullscreenToggled( bool );
84 void scaledToggled( bool ); 85 void scaledToggled( bool );
85 void loopingToggled( bool ); 86 void loopingToggled( bool );
86 void shuffledToggled( bool ); 87 void shuffledToggled( bool );
87 void playlistToggled( bool ); 88 void playlistToggled( bool );
88 void pausedToggled( bool ); 89 void pausedToggled( bool );
89 void playingToggled( bool ); 90 void playingToggled( bool );
90 void positionChanged( long ); // When the slider is moved 91 void positionChanged( long ); // When the slider is moved
91 void positionUpdated( long ); // When the media file progresses 92 void positionUpdated( long ); // When the media file progresses
92 void lengthChanged( long ); 93 void lengthChanged( long );
93 void viewChanged( char ); 94 void viewChanged( char );
94 95
95 void prev(); 96 void prev();
96 void next(); 97 void next();
97 98
98private: 99private:
99 bool isFullscreen; 100 bool isFullscreen;
100 bool isScaled; 101 bool isScaled;
101 bool isLooping; 102 bool isLooping;
102 bool isShuffled; 103 bool isShuffled;
103 bool usePlaylist; 104 bool usePlaylist;
104 bool isPaused;
105 bool isPlaying; 105 bool isPlaying;
106 long curPosition; 106 long curPosition;
107 long curLength; 107 long curLength;
108 char curView; 108 char curView;
109 109
110 MediaPlayerDecoder *decoder; 110 MediaPlayerDecoder *decoder;
111 MediaPlayerDecoder *libmpeg3decoder; 111 MediaPlayerDecoder *libmpeg3decoder;
112// MediaPlayerDecoder *libwavdecoder; 112// MediaPlayerDecoder *libwavdecoder;
113 113
114 void loadPlugins(); 114 void loadPlugins();
115 void readConfig( Config& cfg ); 115 void readConfig( Config& cfg );
116 void writeConfig( Config& cfg ) const; 116 void writeConfig( Config& cfg ) const;
117}; 117};
118 118
119 119
120#endif // MEDIA_PLAYER_STATE_H 120#endif // MEDIA_PLAYER_STATE_H
121 121