Diffstat (limited to 'noncore/multimedia/opieplayer2/mediaplayer.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/multimedia/opieplayer2/mediaplayer.cpp | 7 |
1 files changed, 6 insertions, 1 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 @@ -12,43 +12,47 @@ #include "playlistwidget.h" #include "audiowidget.h" #include "mediaplayerstate.h" + extern AudioWidget *audioUI; extern PlayListWidget *playList; extern MediaPlayerState *mediaPlayerState; MediaPlayer::MediaPlayer( QObject *parent, const char *name ) : QObject( parent, name ), volumeDirection( 0 ), currentFile( NULL ) { + xineControl = new XineControl(); // QPEApplication::grabKeyboard(); // EVIL connect( qApp,SIGNAL( aboutToQuit()),SLOT( cleanUp()) ); 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( 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() ) ); + } MediaPlayer::~MediaPlayer() { } void MediaPlayer::pauseCheck( bool b ) { // Only pause if playing - if ( b && !mediaPlayerState->playing() ) + if ( b && !mediaPlayerState->playing() ) { mediaPlayerState->setPaused( FALSE ); } +} void MediaPlayer::play() { mediaPlayerState->setPlaying( FALSE ); mediaPlayerState->setPlaying( TRUE ); } @@ -67,12 +71,13 @@ void MediaPlayer::setPlaying( bool play ) { if ( playListCurrent != NULL ) { currentFile = playListCurrent; } 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 // Ob auch video 'v' : 'a' // mediaPlayerState->setView( 'v' ); |