summaryrefslogtreecommitdiff
authorsimon <simon>2002-12-02 13:47:10 (UTC)
committer simon <simon>2002-12-02 13:47:10 (UTC)
commit1646c471d8a1f54df65c8d58402bc80af004f498 (patch) (unidiff)
treee6697a36c96e7d1c7295e46bea5a6847fe2e22ec
parentb992707037f3bbf4573c52b34b3d25cbbf07bad0 (diff)
downloadopie-1646c471d8a1f54df65c8d58402bc80af004f498.zip
opie-1646c471d8a1f54df65c8d58402bc80af004f498.tar.gz
opie-1646c471d8a1f54df65c8d58402bc80af004f498.tar.bz2
- paused() -> isPaused() and the like for all accessor functions in the
mediaplayerstate class
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/audiowidget.cpp10
-rw-r--r--noncore/multimedia/opieplayer2/mediaplayer.cpp12
-rw-r--r--noncore/multimedia/opieplayer2/mediaplayerstate.cpp120
-rw-r--r--noncore/multimedia/opieplayer2/mediaplayerstate.h40
-rw-r--r--noncore/multimedia/opieplayer2/playlistwidget.cpp36
-rw-r--r--noncore/multimedia/opieplayer2/videowidget.cpp20
-rw-r--r--noncore/multimedia/opieplayer2/xinecontrol.cpp2
7 files changed, 120 insertions, 120 deletions
diff --git a/noncore/multimedia/opieplayer2/audiowidget.cpp b/noncore/multimedia/opieplayer2/audiowidget.cpp
index a52319b..7c2b007 100644
--- a/noncore/multimedia/opieplayer2/audiowidget.cpp
+++ b/noncore/multimedia/opieplayer2/audiowidget.cpp
@@ -173,9 +173,9 @@ AudioWidget::AudioWidget(QWidget* parent, const char* name, WFlags f) :
173 // Intialise state 173 // Intialise state
174 setLength( mediaPlayerState->length() ); 174 setLength( mediaPlayerState->length() );
175 setPosition( mediaPlayerState->position() ); 175 setPosition( mediaPlayerState->position() );
176 setLooping( mediaPlayerState->fullscreen() ); 176 setLooping( mediaPlayerState->isFullscreen() );
177 // setPaused( mediaPlayerState->paused() ); 177 // setPaused( mediaPlayerState->paused() );
178 setPlaying( mediaPlayerState->playing() ); 178 setPlaying( mediaPlayerState->isPlaying() );
179 179
180} 180}
181 181
@@ -431,10 +431,10 @@ void AudioWidget::mouseMoveEvent( QMouseEvent *event ) {
431 qDebug("mouseEvent %d", i); 431 qDebug("mouseEvent %d", i);
432 switch (i) { 432 switch (i) {
433 case AudioPlay: 433 case AudioPlay:
434 if( mediaPlayerState->paused() ) { 434 if( mediaPlayerState->isPaused() ) {
435 mediaPlayerState->setPaused( FALSE ); 435 mediaPlayerState->setPaused( FALSE );
436 return; 436 return;
437 } else if( !mediaPlayerState->paused() ) { 437 } else if( !mediaPlayerState->isPaused() ) {
438 mediaPlayerState->setPaused( TRUE ); 438 mediaPlayerState->setPaused( TRUE );
439 return; 439 return;
440 } 440 }
@@ -513,7 +513,7 @@ void AudioWidget::keyReleaseEvent( QKeyEvent *e) {
513 mediaPlayerState->toggleBlank(); 513 mediaPlayerState->toggleBlank();
514 break; 514 break;
515 case Key_Space: { 515 case Key_Space: {
516 if(mediaPlayerState->playing()) { 516 if(mediaPlayerState->isPlaying()) {
517 // toggleButton(1); 517 // toggleButton(1);
518 mediaPlayerState->setPlaying(FALSE); 518 mediaPlayerState->setPlaying(FALSE);
519 // toggleButton(1); 519 // toggleButton(1);
diff --git a/noncore/multimedia/opieplayer2/mediaplayer.cpp b/noncore/multimedia/opieplayer2/mediaplayer.cpp
index 1f19b30..8136ff1 100644
--- a/noncore/multimedia/opieplayer2/mediaplayer.cpp
+++ b/noncore/multimedia/opieplayer2/mediaplayer.cpp
@@ -74,7 +74,7 @@ MediaPlayer::~MediaPlayer() {
74} 74}
75 75
76void MediaPlayer::pauseCheck( bool b ) { 76void MediaPlayer::pauseCheck( bool b ) {
77 if ( b && !mediaPlayerState->playing() ) { 77 if ( b && !mediaPlayerState->isPlaying() ) {
78 mediaPlayerState->setPaused( FALSE ); 78 mediaPlayerState->setPaused( FALSE );
79 } 79 }
80} 80}
@@ -89,7 +89,7 @@ void MediaPlayer::setPlaying( bool play ) {
89 return; 89 return;
90 } 90 }
91 91
92 if ( mediaPlayerState->paused() ) { 92 if ( mediaPlayerState->isPaused() ) {
93 mediaPlayerState->setPaused( FALSE ); 93 mediaPlayerState->setPaused( FALSE );
94 return; 94 return;
95 } 95 }
@@ -111,11 +111,11 @@ void MediaPlayer::setPlaying( bool play ) {
111 // random and looping settings enabled causes problems here, 111 // random and looping settings enabled causes problems here,
112 // since there is no selected file in the playlist, but a selected file in the file list, 112 // since there is no selected file in the playlist, but a selected file in the file list,
113 // so we remember and shutoff 113 // so we remember and shutoff
114 l = mediaPlayerState->looping(); 114 l = mediaPlayerState->isLooping();
115 if(l) { 115 if(l) {
116 mediaPlayerState->setLooping( false ); 116 mediaPlayerState->setLooping( false );
117 } 117 }
118 r = mediaPlayerState->shuffled(); 118 r = mediaPlayerState->isShuffled();
119 mediaPlayerState->setShuffled( false ); 119 mediaPlayerState->setShuffled( false );
120 120
121 fileName = playList->currentFileListPathName(); 121 fileName = playList->currentFileListPathName();
@@ -150,7 +150,7 @@ void MediaPlayer::prev() {
150 if( playList->whichList() == 0 ) { //if using the playlist 150 if( playList->whichList() == 0 ) { //if using the playlist
151 if ( playList->prev() ) { 151 if ( playList->prev() ) {
152 play(); 152 play();
153 } else if ( mediaPlayerState->looping() ) { 153 } else if ( mediaPlayerState->isLooping() ) {
154 if ( playList->last() ) { 154 if ( playList->last() ) {
155 play(); 155 play();
156 } 156 }
@@ -166,7 +166,7 @@ void MediaPlayer::next() {
166 if(playList->whichList() == 0) { //if using the playlist 166 if(playList->whichList() == 0) { //if using the playlist
167 if ( playList->next() ) { 167 if ( playList->next() ) {
168 play(); 168 play();
169 } else if ( mediaPlayerState->looping() ) { 169 } else if ( mediaPlayerState->isLooping() ) {
170 if ( playList->first() ) { 170 if ( playList->first() ) {
171 play(); 171 play();
172 } 172 }
diff --git a/noncore/multimedia/opieplayer2/mediaplayerstate.cpp b/noncore/multimedia/opieplayer2/mediaplayerstate.cpp
index a80d8fd..85d9bac 100644
--- a/noncore/multimedia/opieplayer2/mediaplayerstate.cpp
+++ b/noncore/multimedia/opieplayer2/mediaplayerstate.cpp
@@ -51,8 +51,8 @@ MediaPlayerState::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 streaming = false;
55 isSeekable = true; 55 seekable = true;
56} 56}
57 57
58 58
@@ -62,16 +62,16 @@ MediaPlayerState::~MediaPlayerState() {
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 fullscreen = cfg.readBoolEntry( "FullScreen" );
66 isScaled = cfg.readBoolEntry( "Scaling" ); 66 scaled = cfg.readBoolEntry( "Scaling" );
67 isLooping = cfg.readBoolEntry( "Looping" ); 67 looping = cfg.readBoolEntry( "Looping" );
68 isShuffled = cfg.readBoolEntry( "Shuffle" ); 68 shuffled = 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 playing = FALSE;
73 isStreaming = FALSE; 73 streaming = FALSE;
74 isPaused = FALSE; 74 paused = FALSE;
75 curPosition = 0; 75 curPosition = 0;
76 curLength = 0; 76 curLength = 0;
77 curView = 'l'; 77 curView = 'l';
@@ -80,10 +80,10 @@ void MediaPlayerState::readConfig( Config& cfg ) {
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", fullscreen );
84 cfg.writeEntry( "Scaling", isScaled ); 84 cfg.writeEntry( "Scaling", scaled );
85 cfg.writeEntry( "Looping", isLooping ); 85 cfg.writeEntry( "Looping", looping );
86 cfg.writeEntry( "Shuffle", isShuffled ); 86 cfg.writeEntry( "Shuffle", shuffled );
87 cfg.writeEntry( "UsePlayList", usePlaylist ); 87 cfg.writeEntry( "UsePlayList", usePlaylist );
88 cfg.writeEntry( "VideoGamma", videoGamma ); 88 cfg.writeEntry( "VideoGamma", videoGamma );
89} 89}
@@ -92,45 +92,45 @@ void MediaPlayerState::writeConfig( Config& cfg ) const {
92// public stuff 92// public stuff
93 93
94 94
95bool MediaPlayerState::streaming() const { 95bool MediaPlayerState::isStreaming() const {
96 return isStreaming; 96 return streaming;
97} 97}
98 98
99bool MediaPlayerState::seekable() const { 99bool MediaPlayerState::isSeekable() const {
100 return isSeekable; 100 return seekable;
101} 101}
102 102
103bool MediaPlayerState::fullscreen() const { 103bool MediaPlayerState::isFullscreen() const {
104 return isFullscreen; 104 return fullscreen;
105} 105}
106 106
107bool MediaPlayerState::scaled() const { 107bool MediaPlayerState::isScaled() const {
108 return isScaled; 108 return scaled;
109} 109}
110 110
111bool MediaPlayerState::looping() const { 111bool MediaPlayerState::isLooping() const {
112 return isLooping; 112 return looping;
113} 113}
114 114
115bool MediaPlayerState::shuffled() const { 115bool MediaPlayerState::isShuffled() const {
116 return isShuffled; 116 return shuffled;
117} 117}
118 118
119 119
120bool MediaPlayerState::playlist() const { 120bool MediaPlayerState::isUsingPlaylist() const {
121 return usePlaylist; 121 return usePlaylist;
122} 122}
123 123
124bool MediaPlayerState::paused() const { 124bool MediaPlayerState::isPaused() const {
125 return isPaused; 125 return paused;
126} 126}
127 127
128bool MediaPlayerState::playing() const { 128bool MediaPlayerState::isPlaying() const {
129 return isPlaying; 129 return playing;
130} 130}
131 131
132bool MediaPlayerState::stop() const { 132bool MediaPlayerState::isStop() const {
133 return isStoped; 133 return stoped;
134} 134}
135 135
136long MediaPlayerState::position() const { 136long MediaPlayerState::position() const {
@@ -148,10 +148,10 @@ char MediaPlayerState::view() const {
148// slots 148// slots
149void MediaPlayerState::setIsStreaming( bool b ) { 149void MediaPlayerState::setIsStreaming( bool b ) {
150 150
151 if ( isStreaming == b ) { 151 if ( streaming == b ) {
152 return; 152 return;
153 } 153 }
154 isStreaming = b; 154 streaming = b;
155} 155}
156 156
157void MediaPlayerState::setIsSeekable( bool b ) { 157void MediaPlayerState::setIsSeekable( bool b ) {
@@ -159,50 +159,50 @@ void MediaPlayerState::setIsSeekable( bool b ) {
159 //if ( isSeekable == b ) { 159 //if ( isSeekable == b ) {
160 // return; 160 // return;
161 // } 161 // }
162 isSeekable = b; 162 seekable = 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 ( fullscreen == b ) {
169 return; 169 return;
170 } 170 }
171 isFullscreen = b; 171 fullscreen = 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 ( blanked == b ) {
178 return; 178 return;
179 } 179 }
180 isBlanked = b; 180 blanked = 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 ( scaled == b ) {
187 return; 187 return;
188 } 188 }
189 isScaled = b; 189 scaled = 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 ( looping == b ) {
195 return; 195 return;
196 } 196 }
197 isLooping = b; 197 looping = 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 ( shuffled == b ) {
203 return; 203 return;
204 } 204 }
205 isShuffled = b; 205 shuffled = b;
206 emit shuffledToggled(b); 206 emit shuffledToggled(b);
207} 207}
208 208
@@ -215,29 +215,29 @@ void MediaPlayerState::setPlaylist( bool b ) {
215} 215}
216 216
217void MediaPlayerState::setPaused( bool b ) { 217void MediaPlayerState::setPaused( bool b ) {
218 if ( isPaused == b ) { 218 if ( paused == b ) {
219 isPaused = FALSE; 219 paused = FALSE;
220 emit pausedToggled(FALSE); 220 emit pausedToggled(FALSE);
221 return; 221 return;
222 } 222 }
223 isPaused = b; 223 paused = 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 ( playing == b ) {
229 return; 229 return;
230 } 230 }
231 isPlaying = b; 231 playing = b;
232 isStoped = !b; 232 stoped = !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 ( stoped == b ) {
238 return; 238 return;
239 } 239 }
240 isStoped = b; 240 stoped = b;
241 emit stopToggled(b); 241 emit stopToggled(b);
242} 242}
243 243
@@ -303,19 +303,19 @@ void MediaPlayerState::setAudio() {
303} 303}
304 304
305void MediaPlayerState::toggleFullscreen() { 305void MediaPlayerState::toggleFullscreen() {
306 setFullscreen( !isFullscreen ); 306 setFullscreen( !fullscreen );
307} 307}
308 308
309void MediaPlayerState::toggleScaled() { 309void MediaPlayerState::toggleScaled() {
310 setScaled( !isScaled); 310 setScaled( !scaled);
311} 311}
312 312
313void MediaPlayerState::toggleLooping() { 313void MediaPlayerState::toggleLooping() {
314 setLooping( !isLooping); 314 setLooping( !looping);
315} 315}
316 316
317void MediaPlayerState::toggleShuffled() { 317void MediaPlayerState::toggleShuffled() {
318 setShuffled( !isShuffled); 318 setShuffled( !shuffled);
319} 319}
320 320
321void MediaPlayerState::togglePlaylist() { 321void MediaPlayerState::togglePlaylist() {
@@ -323,15 +323,15 @@ void MediaPlayerState::togglePlaylist() {
323} 323}
324 324
325void MediaPlayerState::togglePaused() { 325void MediaPlayerState::togglePaused() {
326 setPaused( !isPaused); 326 setPaused( !paused);
327} 327}
328 328
329void MediaPlayerState::togglePlaying() { 329void MediaPlayerState::togglePlaying() {
330 setPlaying( !isPlaying); 330 setPlaying( !playing);
331} 331}
332 332
333void MediaPlayerState::toggleBlank() { 333void MediaPlayerState::toggleBlank() {
334 setBlanked( !isBlanked); 334 setBlanked( !blanked);
335} 335}
336 336
337 337
diff --git a/noncore/multimedia/opieplayer2/mediaplayerstate.h b/noncore/multimedia/opieplayer2/mediaplayerstate.h
index f9c1eeb..4e837e3 100644
--- a/noncore/multimedia/opieplayer2/mediaplayerstate.h
+++ b/noncore/multimedia/opieplayer2/mediaplayerstate.h
@@ -50,16 +50,16 @@ public:
50 MediaPlayerState( QObject *parent, const char *name ); 50 MediaPlayerState( QObject *parent, const char *name );
51 ~MediaPlayerState(); 51 ~MediaPlayerState();
52 52
53 bool streaming() const; 53 bool isStreaming() const;
54 bool seekable() const; 54 bool isSeekable() const;
55 bool fullscreen() const; 55 bool isFullscreen() const;
56 bool scaled() const; 56 bool isScaled() const;
57 bool looping() const; 57 bool isLooping() const;
58 bool shuffled() const; 58 bool isShuffled() const;
59 bool playlist() const; 59 bool isUsingPlaylist() const;
60 bool paused() const; 60 bool isPaused() const;
61 bool playing() const; 61 bool isPlaying() const;
62 bool stop() const; 62 bool isStop() const;
63 long position() const; 63 long position() const;
64 long length() const; 64 long length() const;
65 char view() const; 65 char view() const;
@@ -119,17 +119,17 @@ signals:
119 void next(); 119 void next();
120 120
121private: 121private:
122 bool isStreaming; 122 bool streaming;
123 bool isSeekable; 123 bool seekable;
124 bool isFullscreen; 124 bool fullscreen;
125 bool isScaled; 125 bool scaled;
126 bool isBlanked; 126 bool blanked;
127 bool isLooping; 127 bool looping;
128 bool isShuffled; 128 bool shuffled;
129 bool usePlaylist; 129 bool usePlaylist;
130 bool isPaused; 130 bool paused;
131 bool isPlaying; 131 bool playing;
132 bool isStoped; 132 bool stoped;
133 long curPosition; 133 long curPosition;
134 long curLength; 134 long curLength;
135 char curView; 135 char curView;
diff --git a/noncore/multimedia/opieplayer2/playlistwidget.cpp b/noncore/multimedia/opieplayer2/playlistwidget.cpp
index 593f072..d1506db 100644
--- a/noncore/multimedia/opieplayer2/playlistwidget.cpp
+++ b/noncore/multimedia/opieplayer2/playlistwidget.cpp
@@ -176,9 +176,9 @@ PlayListWidget::~PlayListWidget() {
176 176
177 177
178void PlayListWidget::initializeStates() { 178void PlayListWidget::initializeStates() {
179 d->tbPlay->setOn( mediaPlayerState->playing() ); 179 d->tbPlay->setOn( mediaPlayerState->isPlaying() );
180 d->tbLoop->setOn( mediaPlayerState->looping() ); 180 d->tbLoop->setOn( mediaPlayerState->isLooping() );
181 d->tbShuffle->setOn( mediaPlayerState->shuffled() ); 181 d->tbShuffle->setOn( mediaPlayerState->isShuffled() );
182 setPlaylist( true ); 182 setPlaylist( true );
183} 183}
184 184
@@ -209,7 +209,7 @@ void PlayListWidget::writeDefaultPlaylist() {
209 209
210void PlayListWidget::addToSelection( const DocLnk& lnk ) { 210void PlayListWidget::addToSelection( const DocLnk& lnk ) {
211 d->setDocumentUsed = FALSE; 211 d->setDocumentUsed = FALSE;
212 if ( mediaPlayerState->playlist() ) { 212 if ( mediaPlayerState->isUsingPlaylist() ) {
213 if( QFileInfo( lnk.file() ).exists() || 213 if( QFileInfo( lnk.file() ).exists() ||
214 lnk.file().left(4) == "http" ) { 214 lnk.file().left(4) == "http" ) {
215 d->selectedFiles->addToSelection( lnk ); 215 d->selectedFiles->addToSelection( lnk );
@@ -428,7 +428,7 @@ const DocLnk *PlayListWidget::current() { // this is fugly
428 case 0: //playlist 428 case 0: //playlist
429 { 429 {
430// qDebug("playlist"); 430// qDebug("playlist");
431 if ( mediaPlayerState->playlist() ) { 431 if ( mediaPlayerState->isUsingPlaylist() ) {
432 return d->selectedFiles->current(); 432 return d->selectedFiles->current();
433 } else if ( d->setDocumentUsed && d->current ) { 433 } else if ( d->setDocumentUsed && d->current ) {
434 return d->current; 434 return d->current;
@@ -443,8 +443,8 @@ const DocLnk *PlayListWidget::current() { // this is fugly
443 443
444 444
445bool PlayListWidget::prev() { 445bool PlayListWidget::prev() {
446 if ( mediaPlayerState->playlist() ) { 446 if ( mediaPlayerState->isUsingPlaylist() ) {
447 if ( mediaPlayerState->shuffled() ) { 447 if ( mediaPlayerState->isShuffled() ) {
448 const DocLnk *cur = current(); 448 const DocLnk *cur = current();
449 int j = 1 + (int)(97.0 * rand() / (RAND_MAX + 1.0)); 449 int j = 1 + (int)(97.0 * rand() / (RAND_MAX + 1.0));
450 for ( int i = 0; i < j; i++ ) { 450 for ( int i = 0; i < j; i++ ) {
@@ -458,7 +458,7 @@ bool PlayListWidget::prev() {
458 return TRUE; 458 return TRUE;
459 } else { 459 } else {
460 if ( !d->selectedFiles->prev() ) { 460 if ( !d->selectedFiles->prev() ) {
461 if ( mediaPlayerState->looping() ) { 461 if ( mediaPlayerState->isLooping() ) {
462 return d->selectedFiles->last(); 462 return d->selectedFiles->last();
463 } else { 463 } else {
464 return FALSE; 464 return FALSE;
@@ -467,19 +467,19 @@ bool PlayListWidget::prev() {
467 return TRUE; 467 return TRUE;
468 } 468 }
469 } else { 469 } else {
470 return mediaPlayerState->looping(); 470 return mediaPlayerState->isLooping();
471 } 471 }
472} 472}
473 473
474 474
475bool PlayListWidget::next() { 475bool PlayListWidget::next() {
476//qDebug("<<<<<<<<<<<<next()"); 476//qDebug("<<<<<<<<<<<<next()");
477 if ( mediaPlayerState->playlist() ) { 477 if ( mediaPlayerState->isUsingPlaylist() ) {
478 if ( mediaPlayerState->shuffled() ) { 478 if ( mediaPlayerState->isShuffled() ) {
479 return prev(); 479 return prev();
480 } else { 480 } else {
481 if ( !d->selectedFiles->next() ) { 481 if ( !d->selectedFiles->next() ) {
482 if ( mediaPlayerState->looping() ) { 482 if ( mediaPlayerState->isLooping() ) {
483 return d->selectedFiles->first(); 483 return d->selectedFiles->first();
484 } else { 484 } else {
485 return FALSE; 485 return FALSE;
@@ -488,24 +488,24 @@ bool PlayListWidget::next() {
488 return TRUE; 488 return TRUE;
489 } 489 }
490 } else { 490 } else {
491 return mediaPlayerState->looping(); 491 return mediaPlayerState->isLooping();
492 } 492 }
493} 493}
494 494
495 495
496bool PlayListWidget::first() { 496bool PlayListWidget::first() {
497 if ( mediaPlayerState->playlist() ) 497 if ( mediaPlayerState->isUsingPlaylist() )
498 return d->selectedFiles->first(); 498 return d->selectedFiles->first();
499 else 499 else
500 return mediaPlayerState->looping(); 500 return mediaPlayerState->isLooping();
501} 501}
502 502
503 503
504bool PlayListWidget::last() { 504bool PlayListWidget::last() {
505 if ( mediaPlayerState->playlist() ) 505 if ( mediaPlayerState->isUsingPlaylist() )
506 return d->selectedFiles->last(); 506 return d->selectedFiles->last();
507 else 507 else
508 return mediaPlayerState->looping(); 508 return mediaPlayerState->isLooping();
509} 509}
510 510
511 511
@@ -1089,7 +1089,7 @@ void PlayListWidget::pmViewActivated(int index) {
1089 case -16: 1089 case -16:
1090 { 1090 {
1091 mediaPlayerState->toggleFullscreen(); 1091 mediaPlayerState->toggleFullscreen();
1092 bool b=mediaPlayerState->fullscreen(); 1092 bool b=mediaPlayerState->isFullscreen();
1093 pmView->setItemChecked( index, b); 1093 pmView->setItemChecked( index, b);
1094 Config cfg( "OpiePlayer" ); 1094 Config cfg( "OpiePlayer" );
1095 cfg.writeEntry( "FullScreen", b ); 1095 cfg.writeEntry( "FullScreen", b );
diff --git a/noncore/multimedia/opieplayer2/videowidget.cpp b/noncore/multimedia/opieplayer2/videowidget.cpp
index 3a757f0..c435241 100644
--- a/noncore/multimedia/opieplayer2/videowidget.cpp
+++ b/noncore/multimedia/opieplayer2/videowidget.cpp
@@ -144,8 +144,8 @@ QWidget( parent, name, f ), scaledWidth( 0 ), scaledHeight( 0 ) {
144 144
145 setLength( mediaPlayerState->length() ); 145 setLength( mediaPlayerState->length() );
146 setPosition( mediaPlayerState->position() ); 146 setPosition( mediaPlayerState->position() );
147 setFullscreen( mediaPlayerState->fullscreen() ); 147 setFullscreen( mediaPlayerState->isFullscreen() );
148 setPlaying( mediaPlayerState->playing() ); 148 setPlaying( mediaPlayerState->isPlaying() );
149} 149}
150 150
151 151
@@ -258,7 +258,7 @@ void VideoWidget::updateSlider( long i, long max ) {
258 } 258 }
259 int width = slider->width(); 259 int width = slider->width();
260 int val = int((double)i * width / max); 260 int val = int((double)i * width / max);
261 if ( !mediaPlayerState->fullscreen() && !videoSliderBeingMoved ) { 261 if ( !mediaPlayerState->isFullscreen() && !videoSliderBeingMoved ) {
262 if ( slider->value() != val ) { 262 if ( slider->value() != val ) {
263 slider->setValue( val ); 263 slider->setValue( val );
264 } 264 }
@@ -327,11 +327,11 @@ void VideoWidget::mouseMoveEvent( QMouseEvent *event ) {
327 switch(i) { 327 switch(i) {
328 328
329 case VideoPlay: { 329 case VideoPlay: {
330 if( mediaPlayerState->paused() ) { 330 if( mediaPlayerState->isPaused() ) {
331 setToggleButton( i, FALSE ); 331 setToggleButton( i, FALSE );
332 mediaPlayerState->setPaused( FALSE ); 332 mediaPlayerState->setPaused( FALSE );
333 return; 333 return;
334 } else if( !mediaPlayerState->paused() ) { 334 } else if( !mediaPlayerState->isPaused() ) {
335 setToggleButton( i, TRUE ); 335 setToggleButton( i, TRUE );
336 mediaPlayerState->setPaused( TRUE ); 336 mediaPlayerState->setPaused( TRUE );
337 return; 337 return;
@@ -357,7 +357,7 @@ void VideoWidget::mousePressEvent( QMouseEvent *event ) {
357} 357}
358 358
359void VideoWidget::mouseReleaseEvent( QMouseEvent *event ) { 359void VideoWidget::mouseReleaseEvent( QMouseEvent *event ) {
360 if ( mediaPlayerState->fullscreen() ) { 360 if ( mediaPlayerState->isFullscreen() ) {
361 mediaPlayerState->setFullscreen( FALSE ); 361 mediaPlayerState->setFullscreen( FALSE );
362 makeVisible(); 362 makeVisible();
363 } 363 }
@@ -376,7 +376,7 @@ void VideoWidget::showEvent( QShowEvent* ) {
376 } 376 }
377 377
378void VideoWidget::makeVisible() { 378void VideoWidget::makeVisible() {
379 if ( mediaPlayerState->fullscreen() ) { 379 if ( mediaPlayerState->isFullscreen() ) {
380 setBackgroundMode( QWidget::NoBackground ); 380 setBackgroundMode( QWidget::NoBackground );
381 showFullScreen(); 381 showFullScreen();
382 resize( qApp->desktop()->size() ); 382 resize( qApp->desktop()->size() );
@@ -403,7 +403,7 @@ void VideoWidget::makeVisible() {
403 videoFrame->setGeometry( QRect( 0, 30, 240, 170 ) ); 403 videoFrame->setGeometry( QRect( 0, 30, 240, 170 ) );
404 } 404 }
405 405
406 if ( !mediaPlayerState->seekable() ) { 406 if ( !mediaPlayerState->isSeekable() ) {
407 if( !slider->isHidden()) { 407 if( !slider->isHidden()) {
408 slider->hide(); 408 slider->hide();
409 } 409 }
@@ -427,7 +427,7 @@ void VideoWidget::makeVisible() {
427void VideoWidget::paintEvent( QPaintEvent * pe) { 427void VideoWidget::paintEvent( QPaintEvent * pe) {
428 QPainter p( this ); 428 QPainter p( this );
429 429
430 if ( mediaPlayerState->fullscreen() ) { 430 if ( mediaPlayerState->isFullscreen() ) {
431 // Clear the background 431 // Clear the background
432 p.setBrush( QBrush( Qt::black ) ); 432 p.setBrush( QBrush( Qt::black ) );
433 } else { 433 } else {
@@ -474,7 +474,7 @@ void VideoWidget::keyReleaseEvent( QKeyEvent *e) {
474 case Key_F13: //mail 474 case Key_F13: //mail
475 break; 475 break;
476 case Key_Space: { 476 case Key_Space: {
477 if(mediaPlayerState->playing()) { 477 if(mediaPlayerState->isPlaying()) {
478 mediaPlayerState->setPlaying(FALSE); 478 mediaPlayerState->setPlaying(FALSE);
479 } else { 479 } else {
480 mediaPlayerState->setPlaying(TRUE); 480 mediaPlayerState->setPlaying(TRUE);
diff --git a/noncore/multimedia/opieplayer2/xinecontrol.cpp b/noncore/multimedia/opieplayer2/xinecontrol.cpp
index f6289d7..71e08a6 100644
--- a/noncore/multimedia/opieplayer2/xinecontrol.cpp
+++ b/noncore/multimedia/opieplayer2/xinecontrol.cpp
@@ -180,7 +180,7 @@ long XineControl::position() {
180 mediaPlayerState->updatePosition( m_position ); 180 mediaPlayerState->updatePosition( m_position );
181 long emitPos = (long)m_position; 181 long emitPos = (long)m_position;
182 emit positionChanged( emitPos ); 182 emit positionChanged( emitPos );
183 if( mediaPlayerState->playing() ) { 183 if( mediaPlayerState->isPlaying() ) {
184 // needs to be stopped the media is stopped 184 // needs to be stopped the media is stopped
185 QTimer::singleShot( 1000, this, SLOT( position() ) ); 185 QTimer::singleShot( 1000, this, SLOT( position() ) );
186 } 186 }