Diffstat (limited to 'noncore/multimedia/opieplayer2/mediaplayerstate.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/multimedia/opieplayer2/mediaplayerstate.cpp | 29 |
1 files changed, 27 insertions, 2 deletions
diff --git a/noncore/multimedia/opieplayer2/mediaplayerstate.cpp b/noncore/multimedia/opieplayer2/mediaplayerstate.cpp index 3090b08..778cd1e 100644 --- a/noncore/multimedia/opieplayer2/mediaplayerstate.cpp +++ b/noncore/multimedia/opieplayer2/mediaplayerstate.cpp @@ -47,24 +47,30 @@ 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("UsePlayList", usePlaylist ); } // public stuff + + +bool MediaPlayerState::streaming() { + return isStreaming; +} + bool MediaPlayerState::fullscreen() { return isFullscreen; } bool MediaPlayerState::scaled() { return isScaled; } bool MediaPlayerState::looping() { return isLooping; } @@ -76,37 +82,49 @@ bool MediaPlayerState::shuffled() { bool MediaPlayerState:: playlist() { return usePlaylist; } bool MediaPlayerState::paused() { return isPaused; } bool MediaPlayerState::playing() { return isPlaying; } +bool MediaPlayerState::stop() { + return isStoped; +} + long MediaPlayerState::position() { return curPosition; } long MediaPlayerState::length() { return curLength; } char MediaPlayerState::view() { return curView; } // slots +void MediaPlayerState::setIsStreaming( bool b ) { + if ( isStreaming == b ) { + return; + } + isStreaming = b; +} + + void MediaPlayerState::setFullscreen( bool b ) { if ( isFullscreen == b ) { return; } isFullscreen = b; emit fullscreenToggled(b); } void MediaPlayerState::setScaled( bool b ) { if ( isScaled == b ) { return; @@ -143,27 +161,36 @@ void MediaPlayerState::setPaused( bool b ) { if ( isPaused == b ) { return; } isPaused = b; emit pausedToggled(b); } void MediaPlayerState::setPlaying( bool b ) { if ( isPlaying == b ) { return; } isPlaying = b; + isStoped = !b; emit playingToggled(b); } +void MediaPlayerState::setStop( bool b ) { + if ( isStoped == b ) { + return; + } + isStoped = b; + emit stopToggled(b); +} + void MediaPlayerState::setPosition( long p ) { if ( curPosition == p ) { return; } curPosition = p; emit positionChanged(p); } void MediaPlayerState::updatePosition( long p ){ if ( curPosition == p ) { return; } @@ -199,26 +226,24 @@ void MediaPlayerState::setList() { setPlaying( FALSE ); setView('l'); } void MediaPlayerState::setVideo() { setView('v'); } void MediaPlayerState::setAudio() { setView('a'); } - - void MediaPlayerState::toggleFullscreen() { setFullscreen( !isFullscreen ); } void MediaPlayerState::toggleScaled() { setScaled( !isScaled); } void MediaPlayerState::toggleLooping() { setLooping( !isLooping); } |