summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/xinecontrol.cpp13
-rw-r--r--noncore/multimedia/opieplayer2/xinecontrol.h7
2 files changed, 20 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
@@ -49,4 +49,17 @@ XineControl::XineControl( 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 ) ) );
diff --git a/noncore/multimedia/opieplayer2/xinecontrol.h b/noncore/multimedia/opieplayer2/xinecontrol.h
index fdc5d2b..0e985d6 100644
--- a/noncore/multimedia/opieplayer2/xinecontrol.h
+++ b/noncore/multimedia/opieplayer2/xinecontrol.h
@@ -46,4 +46,9 @@ public:
MediaPlayerState &_mediaPlayerState,
QObject *parent = 0, const char *name =0 );
+ // note that this constructor takes over ownership of the passed
+ // XINE::Lib object.
+ XineControl( XINE::Lib *xine, XineVideoWidget *xineWidget,
+ MediaPlayerState &_mediaPlayerState,
+ QObject *parent = 0, const char *name =0 );
~XineControl();
@@ -102,4 +107,6 @@ public slots:
private:
+ void init();
+
XINE::Lib *libXine;
long m_currentTime;