author | harlekin <harlekin> | 2002-07-08 23:46:13 (UTC) |
---|---|---|
committer | harlekin <harlekin> | 2002-07-08 23:46:13 (UTC) |
commit | 56554891922367c5d4e7d0f6965daa1026c0cc54 (patch) (side-by-side diff) | |
tree | a21ce87e748517bfb5011a78f2e306826c493db2 | |
parent | 647a6c7ec282ea9b0b45baf8935b8eefc3ff8269 (diff) | |
download | opie-56554891922367c5d4e7d0f6965daa1026c0cc54.zip opie-56554891922367c5d4e7d0f6965daa1026c0cc54.tar.gz opie-56554891922367c5d4e7d0f6965daa1026c0cc54.tar.bz2 |
more gui parts working now
-rw-r--r-- | noncore/multimedia/opieplayer2/mediaplayer.cpp | 32 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/xinecontrol.cpp | 16 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/xinecontrol.h | 2 |
3 files changed, 31 insertions, 19 deletions
diff --git a/noncore/multimedia/opieplayer2/mediaplayer.cpp b/noncore/multimedia/opieplayer2/mediaplayer.cpp index be59d8d..0ab0124 100644 --- a/noncore/multimedia/opieplayer2/mediaplayer.cpp +++ b/noncore/multimedia/opieplayer2/mediaplayer.cpp @@ -88,9 +88,11 @@ void MediaPlayer::setPlaying( bool play ) { void MediaPlayer::prev() { - if ( playList->prev() ) - play(); - else if ( mediaPlayerState->looping() ) { - if ( playList->last() ) - play(); - } else - mediaPlayerState->setList(); + if ( playList->prev() ) { + play(); + } else if ( mediaPlayerState->looping() ) { + if ( playList->last() ) { + play(); + } + } else { + mediaPlayerState->setList(); + } } @@ -99,9 +101,11 @@ void MediaPlayer::prev() { void MediaPlayer::next() { - if ( playList->next() ) - play(); - else if ( mediaPlayerState->looping() ) { - if ( playList->first() ) - play(); - } else - mediaPlayerState->setList(); + if ( playList->next() ) { + play(); + } else if ( mediaPlayerState->looping() ) { + if ( playList->first() ) { + play(); + } + } else { + mediaPlayerState->setList(); + } } diff --git a/noncore/multimedia/opieplayer2/xinecontrol.cpp b/noncore/multimedia/opieplayer2/xinecontrol.cpp index aaa1a24..cda9be2 100644 --- a/noncore/multimedia/opieplayer2/xinecontrol.cpp +++ b/noncore/multimedia/opieplayer2/xinecontrol.cpp @@ -12,2 +12,3 @@ XineControl::XineControl( QObject *parent, const char *name ) connect( this, SIGNAL( positionChanged( int position ) ), mediaPlayerState, SLOT( updatePosition( long p ) ) ); + connect( mediaPlayerState, SIGNAL( playingToggled( bool ) ), this, SLOT( stop( bool ) ) ); @@ -22,2 +23,6 @@ void XineControl::play( const QString& fileName ) { mediaPlayerState->setPlaying( true ); + // default to audio view until we know how to handle video + mediaPlayerState->setView('a'); + // determines of slider is shown + mediaPlayerState->isStreaming = false; // hier dann schaun welcher view @@ -25,8 +30,11 @@ void XineControl::play( const QString& fileName ) { -void XineControl::stop() { - libXine->stop(); - mediaPlayerState->setPlaying( false ); +void XineControl::stop( bool isSet ) { + if ( isSet) { + libXine->stop(); + } + // mediaPlayerState->setPlaying( false ); } -void XineControl::pause( bool ) { +void XineControl::pause( bool isSet) { + libXine->pause(); diff --git a/noncore/multimedia/opieplayer2/xinecontrol.h b/noncore/multimedia/opieplayer2/xinecontrol.h index 58ad8ec..e45f1df 100644 --- a/noncore/multimedia/opieplayer2/xinecontrol.h +++ b/noncore/multimedia/opieplayer2/xinecontrol.h @@ -15,3 +15,3 @@ public slots: void play( const QString& fileName ); - void stop(); + void stop( bool ); void pause( bool ); |