author | harlekin <harlekin> | 2002-07-09 01:02:37 (UTC) |
---|---|---|
committer | harlekin <harlekin> | 2002-07-09 01:02:37 (UTC) |
commit | 577841e20b5657411194d74a143b0319fc05cda3 (patch) (side-by-side diff) | |
tree | 0e41da19fff8e2f47d43612a96d503b49b6a6a0b /noncore | |
parent | 56554891922367c5d4e7d0f6965daa1026c0cc54 (diff) | |
download | opie-577841e20b5657411194d74a143b0319fc05cda3.zip opie-577841e20b5657411194d74a143b0319fc05cda3.tar.gz opie-577841e20b5657411194d74a143b0319fc05cda3.tar.bz2 |
more gui updates
-rw-r--r-- | noncore/multimedia/opieplayer2/audiowidget.cpp | 4 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/mediaplayer.cpp | 7 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/mediaplayerstate.cpp | 29 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/mediaplayerstate.h | 8 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/xinecontrol.cpp | 9 |
5 files changed, 42 insertions, 15 deletions
diff --git a/noncore/multimedia/opieplayer2/audiowidget.cpp b/noncore/multimedia/opieplayer2/audiowidget.cpp index 125fd72..303e56e 100644 --- a/noncore/multimedia/opieplayer2/audiowidget.cpp +++ b/noncore/multimedia/opieplayer2/audiowidget.cpp @@ -127,3 +127,3 @@ AudioWidget::AudioWidget(QWidget* parent, const char* name, WFlags f) : AudioWidget::~AudioWidget() { - mediaPlayerState->isStreaming = FALSE; + mediaPlayerState->setIsStreaming( FALSE ); for ( int i = 0; i < 3; i++ ) { @@ -163,3 +163,3 @@ void AudioWidget::setLength( long max ) { void AudioWidget::setView( char view ) { - if (mediaPlayerState->isStreaming) { + if (mediaPlayerState->streaming() ) { if( !slider->isHidden()) slider->hide(); diff --git a/noncore/multimedia/opieplayer2/mediaplayer.cpp b/noncore/multimedia/opieplayer2/mediaplayer.cpp index 0ab0124..38ba08f 100644 --- a/noncore/multimedia/opieplayer2/mediaplayer.cpp +++ b/noncore/multimedia/opieplayer2/mediaplayer.cpp @@ -77,9 +77,2 @@ void MediaPlayer::setPlaying( bool play ) { xineControl->play( currentFile->file() ); - - // alles nicht nötig, xine kümmert sich drum, man muss nur den return andio oder video gui geben - - // Ob auch video 'v' : 'a' - // mediaPlayerState->setView( 'v' ); - - // abspielen starten. } 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 @@ -58,2 +58,8 @@ void MediaPlayerState::writeConfig( Config& cfg ) const { // public stuff + + +bool MediaPlayerState::streaming() { + return isStreaming; +} + bool MediaPlayerState::fullscreen() { @@ -87,2 +93,6 @@ bool MediaPlayerState::playing() { +bool MediaPlayerState::stop() { + return isStoped; +} + long MediaPlayerState::position() { @@ -100,2 +110,10 @@ char MediaPlayerState::view() { // slots +void MediaPlayerState::setIsStreaming( bool b ) { + if ( isStreaming == b ) { + return; + } + isStreaming = b; +} + + void MediaPlayerState::setFullscreen( bool b ) { @@ -154,2 +172,3 @@ void MediaPlayerState::setPlaying( bool b ) { isPlaying = b; + isStoped = !b; emit playingToggled(b); @@ -157,2 +176,10 @@ void MediaPlayerState::setPlaying( bool b ) { +void MediaPlayerState::setStop( bool b ) { + if ( isStoped == b ) { + return; + } + isStoped = b; + emit stopToggled(b); +} + void MediaPlayerState::setPosition( long p ) { @@ -210,4 +237,2 @@ void MediaPlayerState::setAudio() { - - void MediaPlayerState::toggleFullscreen() { diff --git a/noncore/multimedia/opieplayer2/mediaplayerstate.h b/noncore/multimedia/opieplayer2/mediaplayerstate.h index dbbb0f2..20e3552 100644 --- a/noncore/multimedia/opieplayer2/mediaplayerstate.h +++ b/noncore/multimedia/opieplayer2/mediaplayerstate.h @@ -18,3 +18,3 @@ public: - bool isStreaming; + bool streaming(); bool fullscreen(); @@ -26,2 +26,3 @@ public: bool playing(); + bool stop(); long position(); @@ -31,2 +32,3 @@ public: public slots: + void setIsStreaming( bool b ); void setFullscreen( bool b ); @@ -38,2 +40,3 @@ public slots: void setPlaying( bool b ); + void setStop( bool b ); void setPosition( long p ); @@ -65,2 +68,3 @@ signals: void playingToggled( bool ); + void stopToggled( bool ); void positionChanged( long ); // When the slider is moved @@ -74,2 +78,3 @@ signals: private: + bool isStreaming; bool isFullscreen; @@ -81,2 +86,3 @@ private: bool isPlaying; + bool isStoped; long curPosition; diff --git a/noncore/multimedia/opieplayer2/xinecontrol.cpp b/noncore/multimedia/opieplayer2/xinecontrol.cpp index cda9be2..5b674f8 100644 --- a/noncore/multimedia/opieplayer2/xinecontrol.cpp +++ b/noncore/multimedia/opieplayer2/xinecontrol.cpp @@ -26,3 +26,3 @@ void XineControl::play( const QString& fileName ) { // determines of slider is shown - mediaPlayerState->isStreaming = false; + // mediaPlayerState->setIsStreaming( false ); // hier dann schaun welcher view @@ -31,6 +31,9 @@ void XineControl::play( const QString& fileName ) { void XineControl::stop( bool isSet ) { - if ( isSet) { + if ( !isSet) { libXine->stop(); + mediaPlayerState->setNext(); + //mediaPlayerState->setPlaying( false ); + } else { + // play again } - // mediaPlayerState->setPlaying( false ); } |