summaryrefslogtreecommitdiff
authorsimon <simon>2002-12-02 13:46:23 (UTC)
committer simon <simon>2002-12-02 13:46:23 (UTC)
commitb992707037f3bbf4573c52b34b3d25cbbf07bad0 (patch) (unidiff)
treeb5a5866cda4b3e059001e3159cdae374777d4a72
parent6e883bf60ea91cc6b0624c7307edc27ea3db291b (diff)
downloadopie-b992707037f3bbf4573c52b34b3d25cbbf07bad0.zip
opie-b992707037f3bbf4573c52b34b3d25cbbf07bad0.tar.gz
opie-b992707037f3bbf4573c52b34b3d25cbbf07bad0.tar.bz2
- made the accessor functions constant
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/mediaplayerstate.cpp26
-rw-r--r--noncore/multimedia/opieplayer2/mediaplayerstate.h26
2 files changed, 26 insertions, 26 deletions
diff --git a/noncore/multimedia/opieplayer2/mediaplayerstate.cpp b/noncore/multimedia/opieplayer2/mediaplayerstate.cpp
index 0b33dfd..a80d8fd 100644
--- a/noncore/multimedia/opieplayer2/mediaplayerstate.cpp
+++ b/noncore/multimedia/opieplayer2/mediaplayerstate.cpp
@@ -1,338 +1,338 @@
1/* 1/*
2                This file is part of the Opie Project 2                This file is part of the Opie Project
3 3
4              Copyright (c) 2002 Max Reiss <harlekin@handhelds.org> 4              Copyright (c) 2002 Max Reiss <harlekin@handhelds.org>
5 Copyright (c) 2002 L. Potter <ljp@llornkcor.com> 5 Copyright (c) 2002 L. Potter <ljp@llornkcor.com>
6 Copyright (c) 2002 Holger Freyther <zecke@handhelds.org> 6 Copyright (c) 2002 Holger Freyther <zecke@handhelds.org>
7 =. 7 =.
8 .=l. 8 .=l.
9           .>+-= 9           .>+-=
10 _;:,     .>    :=|. This program is free software; you can 10 _;:,     .>    :=|. This program is free software; you can
11.> <`_,   >  .   <= redistribute it and/or modify it under 11.> <`_,   >  .   <= redistribute it and/or modify it under
12:`=1 )Y*s>-.--   : the terms of the GNU General Public 12:`=1 )Y*s>-.--   : the terms of the GNU General Public
13.="- .-=="i,     .._ License as published by the Free Software 13.="- .-=="i,     .._ License as published by the Free Software
14 - .   .-<_>     .<> Foundation; either version 2 of the License, 14 - .   .-<_>     .<> Foundation; either version 2 of the License,
15     ._= =}       : or (at your option) any later version. 15     ._= =}       : or (at your option) any later version.
16    .%`+i>       _;_. 16    .%`+i>       _;_.
17    .i_,=:_.      -<s. This program is distributed in the hope that 17    .i_,=:_.      -<s. This program is distributed in the hope that
18     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY; 18     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY;
19    : ..    .:,     . . . without even the implied warranty of 19    : ..    .:,     . . . without even the implied warranty of
20    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A 20    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A
21  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU 21  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU
22..}^=.=       =       ; General Public License for more 22..}^=.=       =       ; General Public License for more
23++=   -.     .`     .: details. 23++=   -.     .`     .: details.
24 :     =  ...= . :.=- 24 :     =  ...= . :.=-
25 -.   .:....=;==+<; You should have received a copy of the GNU 25 -.   .:....=;==+<; You should have received a copy of the GNU
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#include <qpe/qpeapplication.h> 36#include <qpe/qpeapplication.h>
37#include <qpe/qlibrary.h> 37#include <qpe/qlibrary.h>
38#include <qpe/config.h> 38#include <qpe/config.h>
39#include <qvaluelist.h> 39#include <qvaluelist.h>
40#include <qobject.h> 40#include <qobject.h>
41#include <qdir.h> 41#include <qdir.h>
42#include "mediaplayerstate.h" 42#include "mediaplayerstate.h"
43 43
44 44
45 45
46//#define MediaPlayerDebug(x) qDebug x 46//#define MediaPlayerDebug(x) qDebug x
47#define MediaPlayerDebug(x) 47#define MediaPlayerDebug(x)
48 48
49 49
50MediaPlayerState::MediaPlayerState( QObject *parent, const char *name ) 50MediaPlayerState::MediaPlayerState( QObject *parent, const char *name )
51 : QObject( parent, name ) { 51 : QObject( parent, name ) {
52 Config cfg( "OpiePlayer" ); 52 Config cfg( "OpiePlayer" );
53 readConfig( cfg ); 53 readConfig( cfg );
54 isStreaming = false; 54 isStreaming = false;
55 isSeekable = true; 55 isSeekable = true;
56} 56}
57 57
58 58
59MediaPlayerState::~MediaPlayerState() { 59MediaPlayerState::~MediaPlayerState() {
60} 60}
61 61
62 62
63void MediaPlayerState::readConfig( Config& cfg ) { 63void MediaPlayerState::readConfig( Config& cfg ) {
64 cfg.setGroup("Options"); 64 cfg.setGroup("Options");
65 isFullscreen = cfg.readBoolEntry( "FullScreen" ); 65 isFullscreen = cfg.readBoolEntry( "FullScreen" );
66 isScaled = cfg.readBoolEntry( "Scaling" ); 66 isScaled = cfg.readBoolEntry( "Scaling" );
67 isLooping = cfg.readBoolEntry( "Looping" ); 67 isLooping = cfg.readBoolEntry( "Looping" );
68 isShuffled = cfg.readBoolEntry( "Shuffle" ); 68 isShuffled = cfg.readBoolEntry( "Shuffle" );
69 usePlaylist = cfg.readBoolEntry( "UsePlayList" ); 69 usePlaylist = cfg.readBoolEntry( "UsePlayList" );
70 videoGamma = cfg.readNumEntry( "VideoGamma" ); 70 videoGamma = cfg.readNumEntry( "VideoGamma" );
71 usePlaylist = TRUE; 71 usePlaylist = TRUE;
72 isPlaying = FALSE; 72 isPlaying = FALSE;
73 isStreaming = FALSE; 73 isStreaming = FALSE;
74 isPaused = FALSE; 74 isPaused = FALSE;
75 curPosition = 0; 75 curPosition = 0;
76 curLength = 0; 76 curLength = 0;
77 curView = 'l'; 77 curView = 'l';
78} 78}
79 79
80 80
81void MediaPlayerState::writeConfig( Config& cfg ) const { 81void MediaPlayerState::writeConfig( Config& cfg ) const {
82 cfg.setGroup( "Options" ); 82 cfg.setGroup( "Options" );
83 cfg.writeEntry( "FullScreen", isFullscreen ); 83 cfg.writeEntry( "FullScreen", isFullscreen );
84 cfg.writeEntry( "Scaling", isScaled ); 84 cfg.writeEntry( "Scaling", isScaled );
85 cfg.writeEntry( "Looping", isLooping ); 85 cfg.writeEntry( "Looping", isLooping );
86 cfg.writeEntry( "Shuffle", isShuffled ); 86 cfg.writeEntry( "Shuffle", isShuffled );
87 cfg.writeEntry( "UsePlayList", usePlaylist ); 87 cfg.writeEntry( "UsePlayList", usePlaylist );
88 cfg.writeEntry( "VideoGamma", videoGamma ); 88 cfg.writeEntry( "VideoGamma", videoGamma );
89} 89}
90 90
91 91
92// public stuff 92// public stuff
93 93
94 94
95bool MediaPlayerState::streaming() { 95bool MediaPlayerState::streaming() const {
96 return isStreaming; 96 return isStreaming;
97} 97}
98 98
99bool MediaPlayerState::seekable() { 99bool MediaPlayerState::seekable() const {
100 return isSeekable; 100 return isSeekable;
101} 101}
102 102
103bool MediaPlayerState::fullscreen() { 103bool MediaPlayerState::fullscreen() const {
104 return isFullscreen; 104 return isFullscreen;
105} 105}
106 106
107bool MediaPlayerState::scaled() { 107bool MediaPlayerState::scaled() const {
108 return isScaled; 108 return isScaled;
109} 109}
110 110
111bool MediaPlayerState::looping() { 111bool MediaPlayerState::looping() const {
112 return isLooping; 112 return isLooping;
113} 113}
114 114
115bool MediaPlayerState::shuffled() { 115bool MediaPlayerState::shuffled() const {
116 return isShuffled; 116 return isShuffled;
117} 117}
118 118
119 119
120bool MediaPlayerState::playlist() { 120bool MediaPlayerState::playlist() const {
121 return usePlaylist; 121 return usePlaylist;
122} 122}
123 123
124bool MediaPlayerState::paused() { 124bool MediaPlayerState::paused() const {
125 return isPaused; 125 return isPaused;
126} 126}
127 127
128bool MediaPlayerState::playing() { 128bool MediaPlayerState::playing() const {
129 return isPlaying; 129 return isPlaying;
130} 130}
131 131
132bool MediaPlayerState::stop() { 132bool MediaPlayerState::stop() const {
133 return isStoped; 133 return isStoped;
134} 134}
135 135
136long MediaPlayerState::position() { 136long MediaPlayerState::position() const {
137 return curPosition; 137 return curPosition;
138} 138}
139 139
140long MediaPlayerState::length() { 140long MediaPlayerState::length() const {
141 return curLength; 141 return curLength;
142} 142}
143 143
144char MediaPlayerState::view() { 144char MediaPlayerState::view() const {
145 return curView; 145 return curView;
146} 146}
147 147
148// slots 148// slots
149void MediaPlayerState::setIsStreaming( bool b ) { 149void MediaPlayerState::setIsStreaming( bool b ) {
150 150
151 if ( isStreaming == b ) { 151 if ( isStreaming == b ) {
152 return; 152 return;
153 } 153 }
154 isStreaming = b; 154 isStreaming = b;
155} 155}
156 156
157void MediaPlayerState::setIsSeekable( bool b ) { 157void MediaPlayerState::setIsSeekable( bool b ) {
158 158
159 //if ( isSeekable == b ) { 159 //if ( isSeekable == b ) {
160 // return; 160 // return;
161 // } 161 // }
162 isSeekable = b; 162 isSeekable = b;
163 emit isSeekableToggled(b); 163 emit isSeekableToggled(b);
164} 164}
165 165
166 166
167void MediaPlayerState::setFullscreen( bool b ) { 167void MediaPlayerState::setFullscreen( bool b ) {
168 if ( isFullscreen == b ) { 168 if ( isFullscreen == b ) {
169 return; 169 return;
170 } 170 }
171 isFullscreen = b; 171 isFullscreen = b;
172 emit fullscreenToggled(b); 172 emit fullscreenToggled(b);
173} 173}
174 174
175 175
176void MediaPlayerState::setBlanked( bool b ) { 176void MediaPlayerState::setBlanked( bool b ) {
177 if ( isBlanked == b ) { 177 if ( isBlanked == b ) {
178 return; 178 return;
179 } 179 }
180 isBlanked = b; 180 isBlanked = b;
181 emit blankToggled(b); 181 emit blankToggled(b);
182} 182}
183 183
184 184
185void MediaPlayerState::setScaled( bool b ) { 185void MediaPlayerState::setScaled( bool b ) {
186 if ( isScaled == b ) { 186 if ( isScaled == b ) {
187 return; 187 return;
188 } 188 }
189 isScaled = b; 189 isScaled = b;
190 emit scaledToggled(b); 190 emit scaledToggled(b);
191} 191}
192 192
193void MediaPlayerState::setLooping( bool b ) { 193void MediaPlayerState::setLooping( bool b ) {
194 if ( isLooping == b ) { 194 if ( isLooping == b ) {
195 return; 195 return;
196 } 196 }
197 isLooping = b; 197 isLooping = b;
198 emit loopingToggled(b); 198 emit loopingToggled(b);
199} 199}
200 200
201void MediaPlayerState::setShuffled( bool b ) { 201void MediaPlayerState::setShuffled( bool b ) {
202 if ( isShuffled == b ) { 202 if ( isShuffled == b ) {
203 return; 203 return;
204 } 204 }
205 isShuffled = b; 205 isShuffled = b;
206 emit shuffledToggled(b); 206 emit shuffledToggled(b);
207} 207}
208 208
209void MediaPlayerState::setPlaylist( bool b ) { 209void MediaPlayerState::setPlaylist( bool b ) {
210 if ( usePlaylist == b ) { 210 if ( usePlaylist == b ) {
211 return; 211 return;
212 } 212 }
213 usePlaylist = b; 213 usePlaylist = b;
214 emit playlistToggled(b); 214 emit playlistToggled(b);
215} 215}
216 216
217void MediaPlayerState::setPaused( bool b ) { 217void MediaPlayerState::setPaused( bool b ) {
218 if ( isPaused == b ) { 218 if ( isPaused == b ) {
219 isPaused = FALSE; 219 isPaused = FALSE;
220 emit pausedToggled(FALSE); 220 emit pausedToggled(FALSE);
221 return; 221 return;
222 } 222 }
223 isPaused = b; 223 isPaused = b;
224 emit pausedToggled(b); 224 emit pausedToggled(b);
225} 225}
226 226
227void MediaPlayerState::setPlaying( bool b ) { 227void MediaPlayerState::setPlaying( bool b ) {
228 if ( isPlaying == b ) { 228 if ( isPlaying == b ) {
229 return; 229 return;
230 } 230 }
231 isPlaying = b; 231 isPlaying = b;
232 isStoped = !b; 232 isStoped = !b;
233 emit playingToggled(b); 233 emit playingToggled(b);
234} 234}
235 235
236void MediaPlayerState::setStop( bool b ) { 236void MediaPlayerState::setStop( bool b ) {
237 if ( isStoped == b ) { 237 if ( isStoped == b ) {
238 return; 238 return;
239 } 239 }
240 isStoped = b; 240 isStoped = b;
241 emit stopToggled(b); 241 emit stopToggled(b);
242} 242}
243 243
244void MediaPlayerState::setPosition( long p ) { 244void MediaPlayerState::setPosition( long p ) {
245 if ( curPosition == p ) { 245 if ( curPosition == p ) {
246 return; 246 return;
247 } 247 }
248 curPosition = p; 248 curPosition = p;
249 emit positionChanged(p); 249 emit positionChanged(p);
250} 250}
251 251
252void MediaPlayerState::updatePosition( long p ){ 252void MediaPlayerState::updatePosition( long p ){
253 if ( curPosition == p ) { 253 if ( curPosition == p ) {
254 return; 254 return;
255 } 255 }
256 curPosition = p; 256 curPosition = p;
257 emit positionUpdated(p); 257 emit positionUpdated(p);
258} 258}
259 259
260void MediaPlayerState::setVideoGamma( int v ){ 260void MediaPlayerState::setVideoGamma( int v ){
261 if ( videoGamma == v ) { 261 if ( videoGamma == v ) {
262 return; 262 return;
263 } 263 }
264 videoGamma = v; 264 videoGamma = v;
265 emit videoGammaChanged( v ); 265 emit videoGammaChanged( v );
266} 266}
267 267
268void MediaPlayerState::setLength( long l ) { 268void MediaPlayerState::setLength( long l ) {
269 if ( curLength == l ) { 269 if ( curLength == l ) {
270 return; 270 return;
271 } 271 }
272 curLength = l; 272 curLength = l;
273 emit lengthChanged(l); 273 emit lengthChanged(l);
274} 274}
275 275
276void MediaPlayerState::setView( char v ) { 276void MediaPlayerState::setView( char v ) {
277 if ( curView == v ) { 277 if ( curView == v ) {
278 return; 278 return;
279 } 279 }
280 curView = v; 280 curView = v;
281 emit viewChanged(v); 281 emit viewChanged(v);
282} 282}
283 283
284void MediaPlayerState::setPrev(){ 284void MediaPlayerState::setPrev(){
285 emit prev(); 285 emit prev();
286} 286}
287 287
288void MediaPlayerState::setNext() { 288void MediaPlayerState::setNext() {
289 emit next(); 289 emit next();
290} 290}
291 291
292void MediaPlayerState::setList() { 292void MediaPlayerState::setList() {
293 setPlaying( FALSE ); 293 setPlaying( FALSE );
294 setView('l'); 294 setView('l');
295} 295}
296 296
297void MediaPlayerState::setVideo() { 297void MediaPlayerState::setVideo() {
298 setView('v'); 298 setView('v');
299} 299}
300 300
301void MediaPlayerState::setAudio() { 301void MediaPlayerState::setAudio() {
302 setView('a'); 302 setView('a');
303} 303}
304 304
305void MediaPlayerState::toggleFullscreen() { 305void MediaPlayerState::toggleFullscreen() {
306 setFullscreen( !isFullscreen ); 306 setFullscreen( !isFullscreen );
307} 307}
308 308
309void MediaPlayerState::toggleScaled() { 309void MediaPlayerState::toggleScaled() {
310 setScaled( !isScaled); 310 setScaled( !isScaled);
311} 311}
312 312
313void MediaPlayerState::toggleLooping() { 313void MediaPlayerState::toggleLooping() {
314 setLooping( !isLooping); 314 setLooping( !isLooping);
315} 315}
316 316
317void MediaPlayerState::toggleShuffled() { 317void MediaPlayerState::toggleShuffled() {
318 setShuffled( !isShuffled); 318 setShuffled( !isShuffled);
319} 319}
320 320
321void MediaPlayerState::togglePlaylist() { 321void MediaPlayerState::togglePlaylist() {
322 setPlaylist( !usePlaylist); 322 setPlaylist( !usePlaylist);
323} 323}
324 324
325void MediaPlayerState::togglePaused() { 325void MediaPlayerState::togglePaused() {
326 setPaused( !isPaused); 326 setPaused( !isPaused);
327} 327}
328 328
329void MediaPlayerState::togglePlaying() { 329void MediaPlayerState::togglePlaying() {
330 setPlaying( !isPlaying); 330 setPlaying( !isPlaying);
331} 331}
332 332
333void MediaPlayerState::toggleBlank() { 333void MediaPlayerState::toggleBlank() {
334 setBlanked( !isBlanked); 334 setBlanked( !isBlanked);
335} 335}
336 336
337 337
338 338
diff --git a/noncore/multimedia/opieplayer2/mediaplayerstate.h b/noncore/multimedia/opieplayer2/mediaplayerstate.h
index 154e3b0..f9c1eeb 100644
--- a/noncore/multimedia/opieplayer2/mediaplayerstate.h
+++ b/noncore/multimedia/opieplayer2/mediaplayerstate.h
@@ -1,143 +1,143 @@
1/* 1/*
2                This file is part of the Opie Project 2                This file is part of the Opie Project
3 3
4              Copyright (c) 2002 Max Reiss <harlekin@handhelds.org> 4              Copyright (c) 2002 Max Reiss <harlekin@handhelds.org>
5 Copyright (c) 2002 L. Potter <ljp@llornkcor.com> 5 Copyright (c) 2002 L. Potter <ljp@llornkcor.com>
6 Copyright (c) 2002 Holger Freyther <zecke@handhelds.org> 6 Copyright (c) 2002 Holger Freyther <zecke@handhelds.org>
7 =. 7 =.
8 .=l. 8 .=l.
9           .>+-= 9           .>+-=
10 _;:,     .>    :=|. This program is free software; you can 10 _;:,     .>    :=|. This program is free software; you can
11.> <`_,   >  .   <= redistribute it and/or modify it under 11.> <`_,   >  .   <= redistribute it and/or modify it under
12:`=1 )Y*s>-.--   : the terms of the GNU General Public 12:`=1 )Y*s>-.--   : the terms of the GNU General Public
13.="- .-=="i,     .._ License as published by the Free Software 13.="- .-=="i,     .._ License as published by the Free Software
14 - .   .-<_>     .<> Foundation; either version 2 of the License, 14 - .   .-<_>     .<> Foundation; either version 2 of the License,
15     ._= =}       : or (at your option) any later version. 15     ._= =}       : or (at your option) any later version.
16    .%`+i>       _;_. 16    .%`+i>       _;_.
17    .i_,=:_.      -<s. This program is distributed in the hope that 17    .i_,=:_.      -<s. This program is distributed in the hope that
18     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY; 18     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY;
19    : ..    .:,     . . . without even the implied warranty of 19    : ..    .:,     . . . without even the implied warranty of
20    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A 20    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A
21  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU 21  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU
22..}^=.=       =       ; General Public License for more 22..}^=.=       =       ; General Public License for more
23++=   -.     .`     .: details. 23++=   -.     .`     .: details.
24 :     =  ...= . :.=- 24 :     =  ...= . :.=-
25 -.   .:....=;==+<; You should have received a copy of the GNU 25 -.   .:....=;==+<; You should have received a copy of the GNU
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 streaming(); 53 bool streaming() const;
54 bool seekable(); 54 bool seekable() const;
55 bool fullscreen(); 55 bool fullscreen() const;
56 bool scaled(); 56 bool scaled() const;
57 bool looping(); 57 bool looping() const;
58 bool shuffled(); 58 bool shuffled() const;
59 bool playlist(); 59 bool playlist() const;
60 bool paused(); 60 bool paused() const;
61 bool playing(); 61 bool playing() const;
62 bool stop(); 62 bool stop() const;
63 long position(); 63 long position() const;
64 long length(); 64 long length() const;
65 char view(); 65 char view() const;
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 setPlaylist( bool b );
75 void setPaused( bool b ); 75 void setPaused( bool b );
76 void setPlaying( bool b ); 76 void setPlaying( bool b );
77 void setStop( bool b ); 77 void setStop( 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 isStreaming; 122 bool isStreaming;
123 bool isSeekable; 123 bool isSeekable;
124 bool isFullscreen; 124 bool isFullscreen;
125 bool isScaled; 125 bool isScaled;
126 bool isBlanked; 126 bool isBlanked;
127 bool isLooping; 127 bool isLooping;
128 bool isShuffled; 128 bool isShuffled;
129 bool usePlaylist; 129 bool usePlaylist;
130 bool isPaused; 130 bool isPaused;
131 bool isPlaying; 131 bool isPlaying;
132 bool isStoped; 132 bool isStoped;
133 long curPosition; 133 long curPosition;
134 long curLength; 134 long curLength;
135 char curView; 135 char curView;
136 int videoGamma; 136 int videoGamma;
137 void readConfig( Config& cfg ); 137 void readConfig( Config& cfg );
138 138
139}; 139};
140 140
141 141
142#endif // MEDIA_PLAYER_STATE_H 142#endif // MEDIA_PLAYER_STATE_H
143 143