Diffstat (limited to 'noncore/multimedia/opieplayer2/mediaplayer.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/multimedia/opieplayer2/mediaplayer.cpp | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/noncore/multimedia/opieplayer2/mediaplayer.cpp b/noncore/multimedia/opieplayer2/mediaplayer.cpp index 87184ba..be59d8d 100644 --- a/noncore/multimedia/opieplayer2/mediaplayer.cpp +++ b/noncore/multimedia/opieplayer2/mediaplayer.cpp @@ -16,4 +16,5 @@ + extern AudioWidget *audioUI; extern PlayListWidget *playList; @@ -25,4 +26,5 @@ MediaPlayer::MediaPlayer( QObject *parent, const char *name ) + xineControl = new XineControl(); // QPEApplication::grabKeyboard(); // EVIL connect( qApp,SIGNAL( aboutToQuit()),SLOT( cleanUp()) ); @@ -30,11 +32,12 @@ MediaPlayer::MediaPlayer( QObject *parent, const char *name ) connect( mediaPlayerState, SIGNAL( playingToggled( bool ) ), this, SLOT( setPlaying( bool ) ) ); connect( mediaPlayerState, SIGNAL( pausedToggled( bool ) ), this, SLOT( pauseCheck( bool ) ) ); - connect( mediaPlayerState, SIGNAL( next() ), this, SLOT( next() ) ); - connect( mediaPlayerState, SIGNAL( prev() ), this, SLOT( prev() ) ); + connect( mediaPlayerState, SIGNAL( next() ), this, SLOT( next() ) ); + connect( mediaPlayerState, SIGNAL( prev() ), this, SLOT( prev() ) ); + + connect( audioUI, SIGNAL( moreClicked() ), this, SLOT( startIncreasingVolume() ) ); + connect( audioUI, SIGNAL( lessClicked() ), this, SLOT( startDecreasingVolume() ) ); + connect( audioUI, SIGNAL( moreReleased() ), this, SLOT( stopChangingVolume() ) ); + connect( audioUI, SIGNAL( lessReleased() ), this, SLOT( stopChangingVolume() ) ); - connect( audioUI, SIGNAL( moreClicked() ), this, SLOT( startIncreasingVolume() ) ); - connect( audioUI, SIGNAL( lessClicked() ), this, SLOT( startDecreasingVolume() ) ); - connect( audioUI, SIGNAL( moreReleased() ), this, SLOT( stopChangingVolume() ) ); - connect( audioUI, SIGNAL( lessReleased() ), this, SLOT( stopChangingVolume() ) ); } @@ -44,6 +47,7 @@ MediaPlayer::~MediaPlayer() { void MediaPlayer::pauseCheck( bool b ) { // Only pause if playing - if ( b && !mediaPlayerState->playing() ) - mediaPlayerState->setPaused( FALSE ); + if ( b && !mediaPlayerState->playing() ) { + mediaPlayerState->setPaused( FALSE ); + } } @@ -69,6 +73,7 @@ void MediaPlayer::setPlaying( bool play ) { } - audioUI->setTickerText( currentFile->file() ); + audioUI->setTickerText( currentFile->file( ) ); + xineControl->play( currentFile->file() ); // alles nicht nötig, xine kümmert sich drum, man muss nur den return andio oder video gui geben |