summaryrefslogtreecommitdiff
authorsimon <simon>2002-12-02 13:47:10 (UTC)
committer simon <simon>2002-12-02 13:47:10 (UTC)
commit1646c471d8a1f54df65c8d58402bc80af004f498 (patch) (side-by-side diff)
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) (ignore 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
@@ -175,5 +175,5 @@ AudioWidget::AudioWidget(QWidget* parent, const char* name, WFlags f) :
setPosition( mediaPlayerState->position() );
- setLooping( mediaPlayerState->fullscreen() );
+ setLooping( mediaPlayerState->isFullscreen() );
// setPaused( mediaPlayerState->paused() );
- setPlaying( mediaPlayerState->playing() );
+ setPlaying( mediaPlayerState->isPlaying() );
@@ -433,6 +433,6 @@ void AudioWidget::mouseMoveEvent( QMouseEvent *event ) {
case AudioPlay:
- if( mediaPlayerState->paused() ) {
+ if( mediaPlayerState->isPaused() ) {
mediaPlayerState->setPaused( FALSE );
return;
- } else if( !mediaPlayerState->paused() ) {
+ } else if( !mediaPlayerState->isPaused() ) {
mediaPlayerState->setPaused( TRUE );
@@ -515,3 +515,3 @@ void AudioWidget::keyReleaseEvent( QKeyEvent *e) {
case Key_Space: {
- if(mediaPlayerState->playing()) {
+ if(mediaPlayerState->isPlaying()) {
// 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
@@ -76,3 +76,3 @@ MediaPlayer::~MediaPlayer() {
void MediaPlayer::pauseCheck( bool b ) {
- if ( b && !mediaPlayerState->playing() ) {
+ if ( b && !mediaPlayerState->isPlaying() ) {
mediaPlayerState->setPaused( FALSE );
@@ -91,3 +91,3 @@ void MediaPlayer::setPlaying( bool play ) {
- if ( mediaPlayerState->paused() ) {
+ if ( mediaPlayerState->isPaused() ) {
mediaPlayerState->setPaused( FALSE );
@@ -113,3 +113,3 @@ void MediaPlayer::setPlaying( bool play ) {
// so we remember and shutoff
- l = mediaPlayerState->looping();
+ l = mediaPlayerState->isLooping();
if(l) {
@@ -117,3 +117,3 @@ void MediaPlayer::setPlaying( bool play ) {
}
- r = mediaPlayerState->shuffled();
+ r = mediaPlayerState->isShuffled();
mediaPlayerState->setShuffled( false );
@@ -152,3 +152,3 @@ void MediaPlayer::prev() {
play();
- } else if ( mediaPlayerState->looping() ) {
+ } else if ( mediaPlayerState->isLooping() ) {
if ( playList->last() ) {
@@ -168,3 +168,3 @@ void MediaPlayer::next() {
play();
- } else if ( mediaPlayerState->looping() ) {
+ } else if ( mediaPlayerState->isLooping() ) {
if ( playList->first() ) {
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
@@ -53,4 +53,4 @@ MediaPlayerState::MediaPlayerState( QObject *parent, const char *name )
readConfig( cfg );
- isStreaming = false;
- isSeekable = true;
+ streaming = false;
+ seekable = true;
}
@@ -64,6 +64,6 @@ void MediaPlayerState::readConfig( Config& cfg ) {
cfg.setGroup("Options");
- isFullscreen = cfg.readBoolEntry( "FullScreen" );
- isScaled = cfg.readBoolEntry( "Scaling" );
- isLooping = cfg.readBoolEntry( "Looping" );
- isShuffled = cfg.readBoolEntry( "Shuffle" );
+ fullscreen = cfg.readBoolEntry( "FullScreen" );
+ scaled = cfg.readBoolEntry( "Scaling" );
+ looping = cfg.readBoolEntry( "Looping" );
+ shuffled = cfg.readBoolEntry( "Shuffle" );
usePlaylist = cfg.readBoolEntry( "UsePlayList" );
@@ -71,5 +71,5 @@ void MediaPlayerState::readConfig( Config& cfg ) {
usePlaylist = TRUE;
- isPlaying = FALSE;
- isStreaming = FALSE;
- isPaused = FALSE;
+ playing = FALSE;
+ streaming = FALSE;
+ paused = FALSE;
curPosition = 0;
@@ -82,6 +82,6 @@ void MediaPlayerState::writeConfig( Config& cfg ) const {
cfg.setGroup( "Options" );
- cfg.writeEntry( "FullScreen", isFullscreen );
- cfg.writeEntry( "Scaling", isScaled );
- cfg.writeEntry( "Looping", isLooping );
- cfg.writeEntry( "Shuffle", isShuffled );
+ cfg.writeEntry( "FullScreen", fullscreen );
+ cfg.writeEntry( "Scaling", scaled );
+ cfg.writeEntry( "Looping", looping );
+ cfg.writeEntry( "Shuffle", shuffled );
cfg.writeEntry( "UsePlayList", usePlaylist );
@@ -94,24 +94,24 @@ void MediaPlayerState::writeConfig( Config& cfg ) const {
-bool MediaPlayerState::streaming() const {
- return isStreaming;
+bool MediaPlayerState::isStreaming() const {
+ return streaming;
}
-bool MediaPlayerState::seekable() const {
- return isSeekable;
+bool MediaPlayerState::isSeekable() const {
+ return seekable;
}
-bool MediaPlayerState::fullscreen() const {
- return isFullscreen;
+bool MediaPlayerState::isFullscreen() const {
+ return fullscreen;
}
-bool MediaPlayerState::scaled() const {
- return isScaled;
+bool MediaPlayerState::isScaled() const {
+ return scaled;
}
-bool MediaPlayerState::looping() const {
- return isLooping;
+bool MediaPlayerState::isLooping() const {
+ return looping;
}
-bool MediaPlayerState::shuffled() const {
- return isShuffled;
+bool MediaPlayerState::isShuffled() const {
+ return shuffled;
}
@@ -119,3 +119,3 @@ bool MediaPlayerState::shuffled() const {
-bool MediaPlayerState::playlist() const {
+bool MediaPlayerState::isUsingPlaylist() const {
return usePlaylist;
@@ -123,12 +123,12 @@ bool MediaPlayerState::playlist() const {
-bool MediaPlayerState::paused() const {
- return isPaused;
+bool MediaPlayerState::isPaused() const {
+ return paused;
}
-bool MediaPlayerState::playing() const {
- return isPlaying;
+bool MediaPlayerState::isPlaying() const {
+ return playing;
}
-bool MediaPlayerState::stop() const {
- return isStoped;
+bool MediaPlayerState::isStop() const {
+ return stoped;
}
@@ -150,6 +150,6 @@ void MediaPlayerState::setIsStreaming( bool b ) {
- if ( isStreaming == b ) {
+ if ( streaming == b ) {
return;
}
- isStreaming = b;
+ streaming = b;
}
@@ -161,3 +161,3 @@ void MediaPlayerState::setIsSeekable( bool b ) {
// }
- isSeekable = b;
+ seekable = b;
emit isSeekableToggled(b);
@@ -167,6 +167,6 @@ void MediaPlayerState::setIsSeekable( bool b ) {
void MediaPlayerState::setFullscreen( bool b ) {
- if ( isFullscreen == b ) {
+ if ( fullscreen == b ) {
return;
}
- isFullscreen = b;
+ fullscreen = b;
emit fullscreenToggled(b);
@@ -176,6 +176,6 @@ void MediaPlayerState::setFullscreen( bool b ) {
void MediaPlayerState::setBlanked( bool b ) {
- if ( isBlanked == b ) {
+ if ( blanked == b ) {
return;
}
- isBlanked = b;
+ blanked = b;
emit blankToggled(b);
@@ -185,6 +185,6 @@ void MediaPlayerState::setBlanked( bool b ) {
void MediaPlayerState::setScaled( bool b ) {
- if ( isScaled == b ) {
+ if ( scaled == b ) {
return;
}
- isScaled = b;
+ scaled = b;
emit scaledToggled(b);
@@ -193,6 +193,6 @@ void MediaPlayerState::setScaled( bool b ) {
void MediaPlayerState::setLooping( bool b ) {
- if ( isLooping == b ) {
+ if ( looping == b ) {
return;
}
- isLooping = b;
+ looping = b;
emit loopingToggled(b);
@@ -201,6 +201,6 @@ void MediaPlayerState::setLooping( bool b ) {
void MediaPlayerState::setShuffled( bool b ) {
- if ( isShuffled == b ) {
+ if ( shuffled == b ) {
return;
}
- isShuffled = b;
+ shuffled = b;
emit shuffledToggled(b);
@@ -217,4 +217,4 @@ void MediaPlayerState::setPlaylist( bool b ) {
void MediaPlayerState::setPaused( bool b ) {
- if ( isPaused == b ) {
- isPaused = FALSE;
+ if ( paused == b ) {
+ paused = FALSE;
emit pausedToggled(FALSE);
@@ -222,3 +222,3 @@ void MediaPlayerState::setPaused( bool b ) {
}
- isPaused = b;
+ paused = b;
emit pausedToggled(b);
@@ -227,7 +227,7 @@ void MediaPlayerState::setPaused( bool b ) {
void MediaPlayerState::setPlaying( bool b ) {
- if ( isPlaying == b ) {
+ if ( playing == b ) {
return;
}
- isPlaying = b;
- isStoped = !b;
+ playing = b;
+ stoped = !b;
emit playingToggled(b);
@@ -236,6 +236,6 @@ void MediaPlayerState::setPlaying( bool b ) {
void MediaPlayerState::setStop( bool b ) {
- if ( isStoped == b ) {
+ if ( stoped == b ) {
return;
}
- isStoped = b;
+ stoped = b;
emit stopToggled(b);
@@ -305,3 +305,3 @@ void MediaPlayerState::setAudio() {
void MediaPlayerState::toggleFullscreen() {
- setFullscreen( !isFullscreen );
+ setFullscreen( !fullscreen );
}
@@ -309,3 +309,3 @@ void MediaPlayerState::toggleFullscreen() {
void MediaPlayerState::toggleScaled() {
- setScaled( !isScaled);
+ setScaled( !scaled);
}
@@ -313,3 +313,3 @@ void MediaPlayerState::toggleScaled() {
void MediaPlayerState::toggleLooping() {
- setLooping( !isLooping);
+ setLooping( !looping);
}
@@ -317,3 +317,3 @@ void MediaPlayerState::toggleLooping() {
void MediaPlayerState::toggleShuffled() {
- setShuffled( !isShuffled);
+ setShuffled( !shuffled);
}
@@ -325,3 +325,3 @@ void MediaPlayerState::togglePlaylist() {
void MediaPlayerState::togglePaused() {
- setPaused( !isPaused);
+ setPaused( !paused);
}
@@ -329,3 +329,3 @@ void MediaPlayerState::togglePaused() {
void MediaPlayerState::togglePlaying() {
- setPlaying( !isPlaying);
+ setPlaying( !playing);
}
@@ -333,3 +333,3 @@ void MediaPlayerState::togglePlaying() {
void MediaPlayerState::toggleBlank() {
- setBlanked( !isBlanked);
+ setBlanked( !blanked);
}
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
@@ -52,12 +52,12 @@ public:
- bool streaming() const;
- bool seekable() const;
- bool fullscreen() const;
- bool scaled() const;
- bool looping() const;
- bool shuffled() const;
- bool playlist() const;
- bool paused() const;
- bool playing() const;
- bool stop() const;
+ bool isStreaming() const;
+ bool isSeekable() const;
+ bool isFullscreen() const;
+ bool isScaled() const;
+ bool isLooping() const;
+ bool isShuffled() const;
+ bool isUsingPlaylist() const;
+ bool isPaused() const;
+ bool isPlaying() const;
+ bool isStop() const;
long position() const;
@@ -121,13 +121,13 @@ signals:
private:
- bool isStreaming;
- bool isSeekable;
- bool isFullscreen;
- bool isScaled;
- bool isBlanked;
- bool isLooping;
- bool isShuffled;
+ bool streaming;
+ bool seekable;
+ bool fullscreen;
+ bool scaled;
+ bool blanked;
+ bool looping;
+ bool shuffled;
bool usePlaylist;
- bool isPaused;
- bool isPlaying;
- bool isStoped;
+ bool paused;
+ bool playing;
+ bool stoped;
long curPosition;
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
@@ -178,5 +178,5 @@ PlayListWidget::~PlayListWidget() {
void PlayListWidget::initializeStates() {
- d->tbPlay->setOn( mediaPlayerState->playing() );
- d->tbLoop->setOn( mediaPlayerState->looping() );
- d->tbShuffle->setOn( mediaPlayerState->shuffled() );
+ d->tbPlay->setOn( mediaPlayerState->isPlaying() );
+ d->tbLoop->setOn( mediaPlayerState->isLooping() );
+ d->tbShuffle->setOn( mediaPlayerState->isShuffled() );
setPlaylist( true );
@@ -211,3 +211,3 @@ void PlayListWidget::addToSelection( const DocLnk& lnk ) {
d->setDocumentUsed = FALSE;
- if ( mediaPlayerState->playlist() ) {
+ if ( mediaPlayerState->isUsingPlaylist() ) {
if( QFileInfo( lnk.file() ).exists() ||
@@ -430,3 +430,3 @@ const DocLnk *PlayListWidget::current() { // this is fugly
// qDebug("playlist");
- if ( mediaPlayerState->playlist() ) {
+ if ( mediaPlayerState->isUsingPlaylist() ) {
return d->selectedFiles->current();
@@ -445,4 +445,4 @@ const DocLnk *PlayListWidget::current() { // this is fugly
bool PlayListWidget::prev() {
- if ( mediaPlayerState->playlist() ) {
- if ( mediaPlayerState->shuffled() ) {
+ if ( mediaPlayerState->isUsingPlaylist() ) {
+ if ( mediaPlayerState->isShuffled() ) {
const DocLnk *cur = current();
@@ -460,3 +460,3 @@ bool PlayListWidget::prev() {
if ( !d->selectedFiles->prev() ) {
- if ( mediaPlayerState->looping() ) {
+ if ( mediaPlayerState->isLooping() ) {
return d->selectedFiles->last();
@@ -469,3 +469,3 @@ bool PlayListWidget::prev() {
} else {
- return mediaPlayerState->looping();
+ return mediaPlayerState->isLooping();
}
@@ -476,4 +476,4 @@ bool PlayListWidget::next() {
//qDebug("<<<<<<<<<<<<next()");
- if ( mediaPlayerState->playlist() ) {
- if ( mediaPlayerState->shuffled() ) {
+ if ( mediaPlayerState->isUsingPlaylist() ) {
+ if ( mediaPlayerState->isShuffled() ) {
return prev();
@@ -481,3 +481,3 @@ bool PlayListWidget::next() {
if ( !d->selectedFiles->next() ) {
- if ( mediaPlayerState->looping() ) {
+ if ( mediaPlayerState->isLooping() ) {
return d->selectedFiles->first();
@@ -490,3 +490,3 @@ bool PlayListWidget::next() {
} else {
- return mediaPlayerState->looping();
+ return mediaPlayerState->isLooping();
}
@@ -496,6 +496,6 @@ bool PlayListWidget::next() {
bool PlayListWidget::first() {
- if ( mediaPlayerState->playlist() )
+ if ( mediaPlayerState->isUsingPlaylist() )
return d->selectedFiles->first();
else
- return mediaPlayerState->looping();
+ return mediaPlayerState->isLooping();
}
@@ -504,6 +504,6 @@ bool PlayListWidget::first() {
bool PlayListWidget::last() {
- if ( mediaPlayerState->playlist() )
+ if ( mediaPlayerState->isUsingPlaylist() )
return d->selectedFiles->last();
else
- return mediaPlayerState->looping();
+ return mediaPlayerState->isLooping();
}
@@ -1091,3 +1091,3 @@ void PlayListWidget::pmViewActivated(int index) {
mediaPlayerState->toggleFullscreen();
- bool b=mediaPlayerState->fullscreen();
+ bool b=mediaPlayerState->isFullscreen();
pmView->setItemChecked( index, 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
@@ -146,4 +146,4 @@ QWidget( parent, name, f ), scaledWidth( 0 ), scaledHeight( 0 ) {
setPosition( mediaPlayerState->position() );
- setFullscreen( mediaPlayerState->fullscreen() );
- setPlaying( mediaPlayerState->playing() );
+ setFullscreen( mediaPlayerState->isFullscreen() );
+ setPlaying( mediaPlayerState->isPlaying() );
}
@@ -260,3 +260,3 @@ void VideoWidget::updateSlider( long i, long max ) {
int val = int((double)i * width / max);
- if ( !mediaPlayerState->fullscreen() && !videoSliderBeingMoved ) {
+ if ( !mediaPlayerState->isFullscreen() && !videoSliderBeingMoved ) {
if ( slider->value() != val ) {
@@ -329,3 +329,3 @@ void VideoWidget::mouseMoveEvent( QMouseEvent *event ) {
case VideoPlay: {
- if( mediaPlayerState->paused() ) {
+ if( mediaPlayerState->isPaused() ) {
setToggleButton( i, FALSE );
@@ -333,3 +333,3 @@ void VideoWidget::mouseMoveEvent( QMouseEvent *event ) {
return;
- } else if( !mediaPlayerState->paused() ) {
+ } else if( !mediaPlayerState->isPaused() ) {
setToggleButton( i, TRUE );
@@ -359,3 +359,3 @@ void VideoWidget::mousePressEvent( QMouseEvent *event ) {
void VideoWidget::mouseReleaseEvent( QMouseEvent *event ) {
- if ( mediaPlayerState->fullscreen() ) {
+ if ( mediaPlayerState->isFullscreen() ) {
mediaPlayerState->setFullscreen( FALSE );
@@ -378,3 +378,3 @@ void VideoWidget::showEvent( QShowEvent* ) {
void VideoWidget::makeVisible() {
- if ( mediaPlayerState->fullscreen() ) {
+ if ( mediaPlayerState->isFullscreen() ) {
setBackgroundMode( QWidget::NoBackground );
@@ -405,3 +405,3 @@ void VideoWidget::makeVisible() {
- if ( !mediaPlayerState->seekable() ) {
+ if ( !mediaPlayerState->isSeekable() ) {
if( !slider->isHidden()) {
@@ -429,3 +429,3 @@ void VideoWidget::paintEvent( QPaintEvent * pe) {
- if ( mediaPlayerState->fullscreen() ) {
+ if ( mediaPlayerState->isFullscreen() ) {
// Clear the background
@@ -476,3 +476,3 @@ void VideoWidget::keyReleaseEvent( QKeyEvent *e) {
case Key_Space: {
- if(mediaPlayerState->playing()) {
+ if(mediaPlayerState->isPlaying()) {
mediaPlayerState->setPlaying(FALSE);
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
@@ -182,3 +182,3 @@ long XineControl::position() {
emit positionChanged( emitPos );
- if( mediaPlayerState->playing() ) {
+ if( mediaPlayerState->isPlaying() ) {
// needs to be stopped the media is stopped