summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/mediaplayerstate.cpp4
-rw-r--r--noncore/multimedia/opieplayer2/mediaplayerstate.h2
2 files changed, 3 insertions, 3 deletions
diff --git a/noncore/multimedia/opieplayer2/mediaplayerstate.cpp b/noncore/multimedia/opieplayer2/mediaplayerstate.cpp
index 5e5dfb2..aa85176 100644
--- a/noncore/multimedia/opieplayer2/mediaplayerstate.cpp
+++ b/noncore/multimedia/opieplayer2/mediaplayerstate.cpp
@@ -96,97 +96,97 @@ void MediaPlayerState::setIsStreaming( bool b ) {
96void MediaPlayerState::setIsSeekable( bool b ) { 96void MediaPlayerState::setIsSeekable( bool b ) {
97 seekable = b; 97 seekable = b;
98 emit isSeekableToggled(b); 98 emit isSeekableToggled(b);
99} 99}
100 100
101 101
102void MediaPlayerState::setFullscreen( bool b ) { 102void MediaPlayerState::setFullscreen( bool b ) {
103 if ( fullscreen == b ) { 103 if ( fullscreen == b ) {
104 return; 104 return;
105 } 105 }
106 fullscreen = b; 106 fullscreen = b;
107 emit fullscreenToggled(b); 107 emit fullscreenToggled(b);
108} 108}
109 109
110 110
111void MediaPlayerState::setBlanked( bool b ) { 111void MediaPlayerState::setBlanked( bool b ) {
112 if ( blanked == b ) { 112 if ( blanked == b ) {
113 return; 113 return;
114 } 114 }
115 blanked = b; 115 blanked = b;
116 emit blankToggled(b); 116 emit blankToggled(b);
117} 117}
118 118
119 119
120void MediaPlayerState::setScaled( bool b ) { 120void MediaPlayerState::setScaled( bool b ) {
121 if ( scaled == b ) { 121 if ( scaled == b ) {
122 return; 122 return;
123 } 123 }
124 scaled = b; 124 scaled = b;
125 emit scaledToggled(b); 125 emit scaledToggled(b);
126} 126}
127 127
128void MediaPlayerState::setLooping( bool b ) { 128void MediaPlayerState::setLooping( bool b ) {
129 if ( looping == b ) { 129 if ( looping == b ) {
130 return; 130 return;
131 } 131 }
132 looping = b; 132 looping = b;
133 emit loopingToggled(b); 133 emit loopingToggled(b);
134} 134}
135 135
136void MediaPlayerState::setShuffled( bool b ) { 136void MediaPlayerState::setShuffled( bool b ) {
137 if ( shuffled == b ) { 137 if ( shuffled == b ) {
138 return; 138 return;
139 } 139 }
140 shuffled = b; 140 shuffled = b;
141 emit shuffledToggled(b); 141 emit shuffledToggled(b);
142} 142}
143 143
144void MediaPlayerState::setPlaylist( bool b ) { 144void MediaPlayerState::setUsingPlaylist( bool b ) {
145 if ( usePlaylist == b ) { 145 if ( usePlaylist == b ) {
146 return; 146 return;
147 } 147 }
148 usePlaylist = b; 148 usePlaylist = b;
149 emit playlistToggled(b); 149 emit playlistToggled(b);
150} 150}
151 151
152void MediaPlayerState::setPaused( bool b ) { 152void MediaPlayerState::setPaused( bool b ) {
153 if ( paused == b ) { 153 if ( paused == b ) {
154 paused = FALSE; 154 paused = FALSE;
155 emit pausedToggled(FALSE); 155 emit pausedToggled(FALSE);
156 return; 156 return;
157 } 157 }
158 paused = b; 158 paused = b;
159 emit pausedToggled(b); 159 emit pausedToggled(b);
160} 160}
161 161
162void MediaPlayerState::setPlaying( bool b ) { 162void MediaPlayerState::setPlaying( bool b ) {
163 if ( playing == b ) { 163 if ( playing == b ) {
164 return; 164 return;
165 } 165 }
166 playing = b; 166 playing = b;
167 stopped = !b; 167 stopped = !b;
168 emit playingToggled(b); 168 emit playingToggled(b);
169} 169}
170 170
171void MediaPlayerState::setStopped( bool b ) { 171void MediaPlayerState::setStopped( bool b ) {
172 if ( stopped == b ) { 172 if ( stopped == b ) {
173 return; 173 return;
174 } 174 }
175 stopped = b; 175 stopped = b;
176 emit stopToggled(b); 176 emit stopToggled(b);
177} 177}
178 178
179void MediaPlayerState::setPosition( long p ) { 179void MediaPlayerState::setPosition( long p ) {
180 if ( curPosition == p ) { 180 if ( curPosition == p ) {
181 return; 181 return;
182 } 182 }
183 curPosition = p; 183 curPosition = p;
184 emit positionChanged(p); 184 emit positionChanged(p);
185} 185}
186 186
187void MediaPlayerState::updatePosition( long p ){ 187void MediaPlayerState::updatePosition( long p ){
188 if ( curPosition == p ) { 188 if ( curPosition == p ) {
189 return; 189 return;
190 } 190 }
191 curPosition = p; 191 curPosition = p;
192 emit positionUpdated(p); 192 emit positionUpdated(p);
@@ -209,65 +209,65 @@ void MediaPlayerState::setLength( long l ) {
209} 209}
210 210
211void MediaPlayerState::setView( char v ) { 211void MediaPlayerState::setView( char v ) {
212 if ( curView == v ) { 212 if ( curView == v ) {
213 return; 213 return;
214 } 214 }
215 curView = v; 215 curView = v;
216 emit viewChanged(v); 216 emit viewChanged(v);
217} 217}
218 218
219void MediaPlayerState::setPrev(){ 219void MediaPlayerState::setPrev(){
220 emit prev(); 220 emit prev();
221} 221}
222 222
223void MediaPlayerState::setNext() { 223void MediaPlayerState::setNext() {
224 emit next(); 224 emit next();
225} 225}
226 226
227void MediaPlayerState::setList() { 227void MediaPlayerState::setList() {
228 setPlaying( FALSE ); 228 setPlaying( FALSE );
229 setView('l'); 229 setView('l');
230} 230}
231 231
232void MediaPlayerState::setVideo() { 232void MediaPlayerState::setVideo() {
233 setView('v'); 233 setView('v');
234} 234}
235 235
236void MediaPlayerState::setAudio() { 236void MediaPlayerState::setAudio() {
237 setView('a'); 237 setView('a');
238} 238}
239 239
240void MediaPlayerState::toggleFullscreen() { 240void MediaPlayerState::toggleFullscreen() {
241 setFullscreen( !fullscreen ); 241 setFullscreen( !fullscreen );
242} 242}
243 243
244void MediaPlayerState::toggleScaled() { 244void MediaPlayerState::toggleScaled() {
245 setScaled( !scaled); 245 setScaled( !scaled);
246} 246}
247 247
248void MediaPlayerState::toggleLooping() { 248void MediaPlayerState::toggleLooping() {
249 setLooping( !looping); 249 setLooping( !looping);
250} 250}
251 251
252void MediaPlayerState::toggleShuffled() { 252void MediaPlayerState::toggleShuffled() {
253 setShuffled( !shuffled); 253 setShuffled( !shuffled);
254} 254}
255 255
256void MediaPlayerState::togglePlaylist() { 256void MediaPlayerState::togglePlaylist() {
257 setPlaylist( !usePlaylist); 257 setUsingPlaylist( !usePlaylist);
258} 258}
259 259
260void MediaPlayerState::togglePaused() { 260void MediaPlayerState::togglePaused() {
261 setPaused( !paused); 261 setPaused( !paused);
262} 262}
263 263
264void MediaPlayerState::togglePlaying() { 264void MediaPlayerState::togglePlaying() {
265 setPlaying( !playing); 265 setPlaying( !playing);
266} 266}
267 267
268void MediaPlayerState::toggleBlank() { 268void MediaPlayerState::toggleBlank() {
269 setBlanked( !blanked); 269 setBlanked( !blanked);
270} 270}
271 271
272 272
273 273
diff --git a/noncore/multimedia/opieplayer2/mediaplayerstate.h b/noncore/multimedia/opieplayer2/mediaplayerstate.h
index 04d0445..b99178d 100644
--- a/noncore/multimedia/opieplayer2/mediaplayerstate.h
+++ b/noncore/multimedia/opieplayer2/mediaplayerstate.h
@@ -26,97 +26,97 @@
26  -_. . .   )=.  = General Public License along with 26  -_. . .   )=.  = General Public License along with
27    --        :-=` this library; see the file COPYING.LIB. 27    --        :-=` this library; see the file COPYING.LIB.
28 If not, write to the Free Software Foundation, 28 If not, write to the Free Software Foundation,
29 Inc., 59 Temple Place - Suite 330, 29 Inc., 59 Temple Place - Suite 330,
30 Boston, MA 02111-1307, USA. 30 Boston, MA 02111-1307, USA.
31 31
32*/ 32*/
33 33
34// this file is based on work by trolltech 34// this file is based on work by trolltech
35 35
36#ifndef MEDIA_PLAYER_STATE_H 36#ifndef MEDIA_PLAYER_STATE_H
37#define MEDIA_PLAYER_STATE_H 37#define MEDIA_PLAYER_STATE_H
38 38
39 39
40#include <qobject.h> 40#include <qobject.h>
41 41
42 42
43class MediaPlayerDecoder; 43class MediaPlayerDecoder;
44class Config; 44class Config;
45 45
46 46
47class MediaPlayerState : public QObject { 47class MediaPlayerState : public QObject {
48Q_OBJECT 48Q_OBJECT
49public: 49public:
50 MediaPlayerState( QObject *parent, const char *name ); 50 MediaPlayerState( QObject *parent, const char *name );
51 ~MediaPlayerState(); 51 ~MediaPlayerState();
52 52
53 bool isStreaming() const { return streaming; } 53 bool isStreaming() const { return streaming; }
54 bool isSeekable() const { return seekable; } 54 bool isSeekable() const { return seekable; }
55 bool isFullscreen() const { return fullscreen; } 55 bool isFullscreen() const { return fullscreen; }
56 bool isScaled() const { return scaled; } 56 bool isScaled() const { return scaled; }
57 bool isLooping() const { return looping; } 57 bool isLooping() const { return looping; }
58 bool isShuffled() const { return shuffled; } 58 bool isShuffled() const { return shuffled; }
59 bool isUsingPlaylist() const { return usePlaylist; } 59 bool isUsingPlaylist() const { return usePlaylist; }
60 bool isPaused() const { return paused; } 60 bool isPaused() const { return paused; }
61 bool isPlaying() const { return playing; } 61 bool isPlaying() const { return playing; }
62 bool isStopped() const { return stopped; } 62 bool isStopped() const { return stopped; }
63 long position() const { return curPosition; } 63 long position() const { return curPosition; }
64 long length() const { return curLength; } 64 long length() const { return curLength; }
65 char view() const { return curView; } 65 char view() const { return curView; }
66 66
67public slots: 67public slots:
68 void setIsStreaming( bool b ); 68 void setIsStreaming( bool b );
69 void setIsSeekable( bool b ); 69 void setIsSeekable( bool b );
70 void setFullscreen( bool b ); 70 void setFullscreen( bool b );
71 void setScaled( bool b ); 71 void setScaled( bool b );
72 void setLooping( bool b ); 72 void setLooping( bool b );
73 void setShuffled( bool b ); 73 void setShuffled( bool b );
74 void setPlaylist( bool b ); 74 void setUsingPlaylist( bool b );
75 void setPaused( bool b ); 75 void setPaused( bool b );
76 void setPlaying( bool b ); 76 void setPlaying( bool b );
77 void setStopped( bool b ); 77 void setStopped( bool b );
78 void setPosition( long p ); 78 void setPosition( long p );
79 void updatePosition( long p ); 79 void updatePosition( long p );
80 void setLength( long l ); 80 void setLength( long l );
81 void setView( char v ); 81 void setView( char v );
82 void setBlanked( bool b ); 82 void setBlanked( bool b );
83 void setVideoGamma( int v ); 83 void setVideoGamma( int v );
84 84
85 void setPrev(); 85 void setPrev();
86 void setNext(); 86 void setNext();
87 void setList(); 87 void setList();
88 void setVideo(); 88 void setVideo();
89 void setAudio(); 89 void setAudio();
90 90
91 void toggleFullscreen(); 91 void toggleFullscreen();
92 void toggleScaled(); 92 void toggleScaled();
93 void toggleLooping(); 93 void toggleLooping();
94 void toggleShuffled(); 94 void toggleShuffled();
95 void togglePlaylist(); 95 void togglePlaylist();
96 void togglePaused(); 96 void togglePaused();
97 void togglePlaying(); 97 void togglePlaying();
98 void toggleBlank(); 98 void toggleBlank();
99 void writeConfig( Config& cfg ) const; 99 void writeConfig( Config& cfg ) const;
100 100
101 101
102signals: 102signals:
103 void fullscreenToggled( bool ); 103 void fullscreenToggled( bool );
104 void scaledToggled( bool ); 104 void scaledToggled( bool );
105 void loopingToggled( bool ); 105 void loopingToggled( bool );
106 void shuffledToggled( bool ); 106 void shuffledToggled( bool );
107 void playlistToggled( bool ); 107 void playlistToggled( bool );
108 void pausedToggled( bool ); 108 void pausedToggled( bool );
109 void playingToggled( bool ); 109 void playingToggled( bool );
110 void stopToggled( bool ); 110 void stopToggled( bool );
111 void positionChanged( long ); // When the slider is moved 111 void positionChanged( long ); // When the slider is moved
112 void positionUpdated( long ); // When the media file progresses 112 void positionUpdated( long ); // When the media file progresses
113 void lengthChanged( long ); 113 void lengthChanged( long );
114 void viewChanged( char ); 114 void viewChanged( char );
115 void isSeekableToggled( bool ); 115 void isSeekableToggled( bool );
116 void blankToggled( bool ); 116 void blankToggled( bool );
117 void videoGammaChanged( int ); 117 void videoGammaChanged( int );
118 void prev(); 118 void prev();
119 void next(); 119 void next();
120 120
121private: 121private:
122 bool streaming; 122 bool streaming;