summaryrefslogtreecommitdiff
path: root/noncore/multimedia/opieplayer2/xinecontrol.cpp
Side-by-side diff
Diffstat (limited to 'noncore/multimedia/opieplayer2/xinecontrol.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/xinecontrol.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/noncore/multimedia/opieplayer2/xinecontrol.cpp b/noncore/multimedia/opieplayer2/xinecontrol.cpp
index ee2cd83..efa9934 100644
--- a/noncore/multimedia/opieplayer2/xinecontrol.cpp
+++ b/noncore/multimedia/opieplayer2/xinecontrol.cpp
@@ -45,12 +45,25 @@ XineControl::XineControl( XineVideoWidget *xineWidget,
QObject *parent, const char *name )
: QObject( parent, name ), mediaPlayerState( _mediaPlayerState ), xineVideoWidget( xineWidget )
{
libXine = new XINE::Lib( xineWidget );
+ init();
+}
+
+XineControl::XineControl( XINE::Lib *xine, XineVideoWidget *xineWidget,
+ MediaPlayerState &_mediaPlayerState,
+ QObject *parent, const char *name )
+ : QObject( parent, name ), libXine( xine ), mediaPlayerState( _mediaPlayerState ), xineVideoWidget( xineWidget )
+{
+ init();
+}
+
+void XineControl::init()
+{
connect( &mediaPlayerState, SIGNAL( pausedToggled( bool ) ), this, SLOT( pause( bool ) ) );
connect( this, SIGNAL( positionChanged( long ) ), &mediaPlayerState, SLOT( updatePosition( long ) ) );
connect( &mediaPlayerState, SIGNAL( playingToggled( bool ) ), this, SLOT( stop( bool ) ) );
connect( &mediaPlayerState, SIGNAL( fullscreenToggled( bool ) ), this, SLOT( setFullscreen( bool ) ) );
connect( &mediaPlayerState, SIGNAL( positionChanged( long ) ), this, SLOT( seekTo( long ) ) );
connect( &mediaPlayerState, SIGNAL( videoGammaChanged( int ) ), this, SLOT( setGamma( int ) ) );