From 56554891922367c5d4e7d0f6965daa1026c0cc54 Mon Sep 17 00:00:00 2001 From: harlekin Date: Mon, 08 Jul 2002 23:46:13 +0000 Subject: more gui parts working now --- 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 @@ -86,24 +86,28 @@ 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(); + } } 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 @@ -10,6 +10,7 @@ XineControl::XineControl( QObject *parent, const char *name ) connect( mediaPlayerState, SIGNAL( pausedToggled(bool) ), this, SLOT( pause(bool) ) ); connect( this, SIGNAL( positionChanged( int position ) ), mediaPlayerState, SLOT( updatePosition( long p ) ) ); + connect( mediaPlayerState, SIGNAL( playingToggled( bool ) ), this, SLOT( stop( bool ) ) ); } @@ -20,15 +21,22 @@ XineControl::~XineControl() { void XineControl::play( const QString& fileName ) { libXine->play( 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 } -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 @@ -13,7 +13,7 @@ public: public slots: void play( const QString& fileName ); - void stop(); + void stop( bool ); void pause( bool ); int currentTime(); -- cgit v0.9.0.2