author | simon <simon> | 2002-12-08 22:31:49 (UTC) |
---|---|---|
committer | simon <simon> | 2002-12-08 22:31:49 (UTC) |
commit | 3023dd47eefe179c245a186dd0870c2b4a76a4ae (patch) (side-by-side diff) | |
tree | 97dd05fd90a776e8fd72a630b3fb6e58b9b08f1b | |
parent | 3b5f97272ded8a40da3853476371b4edc41d1a34 (diff) | |
download | opie-3023dd47eefe179c245a186dd0870c2b4a76a4ae.zip opie-3023dd47eefe179c245a186dd0870c2b4a76a4ae.tar.gz opie-3023dd47eefe179c245a186dd0870c2b4a76a4ae.tar.bz2 |
- made XineControl independent from VideoWidget
-rw-r--r-- | noncore/multimedia/opieplayer2/mediaplayer.cpp | 2 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/xinecontrol.cpp | 12 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/xinecontrol.h | 9 |
3 files changed, 11 insertions, 12 deletions
diff --git a/noncore/multimedia/opieplayer2/mediaplayer.cpp b/noncore/multimedia/opieplayer2/mediaplayer.cpp index 06b1a04..ed7e37f 100644 --- a/noncore/multimedia/opieplayer2/mediaplayer.cpp +++ b/noncore/multimedia/opieplayer2/mediaplayer.cpp @@ -354,15 +354,15 @@ void MediaPlayer::recreateAudioAndVideoWidgets() videoUI = new VideoWidget( playList, mediaPlayerState, 0, "videoUI" ); 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( videoUI, SIGNAL( moreClicked() ), this, SLOT( startIncreasingVolume() ) ); connect( videoUI, SIGNAL( lessClicked() ), this, SLOT( startDecreasingVolume() ) ); connect( videoUI, SIGNAL( moreReleased() ), this, SLOT( stopChangingVolume() ) ); connect( videoUI, SIGNAL( lessReleased() ), this, SLOT( stopChangingVolume() ) ); - xineControl = new XineControl( videoUI, mediaPlayerState ); + xineControl = new XineControl( videoUI, videoUI->vidWidget(), mediaPlayerState ); } diff --git a/noncore/multimedia/opieplayer2/xinecontrol.cpp b/noncore/multimedia/opieplayer2/xinecontrol.cpp index b4ae783..6f1cd9c 100644 --- a/noncore/multimedia/opieplayer2/xinecontrol.cpp +++ b/noncore/multimedia/opieplayer2/xinecontrol.cpp @@ -29,32 +29,34 @@ Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include <qtimer.h> #include <qmessagebox.h> #include <qpe/qcopenvelope_qws.h> #include <qpe/qpeapplication.h> #include "xinecontrol.h" #include "mediaplayerstate.h" -#include "videowidget.h" -XineControl::XineControl( VideoWidget *videoWidget, MediaPlayerState &_mediaPlayerState, QObject *parent, const char *name ) - : QObject( parent, name ), mediaPlayerState( _mediaPlayerState ), videoUI( videoWidget ) { +XineControl::XineControl( QWidget *videoContainerWidget, XineVideoWidget *xineWidget, + MediaPlayerState &_mediaPlayerState, + QObject *parent, const char *name ) + : QObject( parent, name ), mediaPlayerState( _mediaPlayerState ) +{ - libXine = new XINE::Lib( videoUI->vidWidget() ); + libXine = new XINE::Lib( xineWidget ); - connect ( videoUI, SIGNAL( videoResized( const QSize & )), this, SLOT( videoResized ( const QSize & ) ) ); + connect ( videoContainerWidget, SIGNAL( videoResized( const QSize & )), this, SLOT( videoResized ( const QSize & ) ) ); 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 ) ) ); connect( libXine, SIGNAL( stopped() ), this, SLOT( nextMedia() ) ); disabledSuspendScreenSaver = FALSE; } XineControl::~XineControl() { diff --git a/noncore/multimedia/opieplayer2/xinecontrol.h b/noncore/multimedia/opieplayer2/xinecontrol.h index 24e966b..69a594f 100644 --- a/noncore/multimedia/opieplayer2/xinecontrol.h +++ b/noncore/multimedia/opieplayer2/xinecontrol.h @@ -30,30 +30,30 @@ Boston, MA 02111-1307, USA. */ #ifndef XINECONTROL_H #define XINECONTROL_H #include "lib.h" #include <qobject.h> #include "mediaplayerstate.h" -class VideoWidget; - class XineControl : public QObject { Q_OBJECT public: - XineControl( VideoWidget *videoWidget, MediaPlayerState &_mediaPlayerState, QObject *parent = 0, const char *name =0 ); + XineControl( QWidget *videoContainerWidget, XineVideoWidget *xineWidget, + MediaPlayerState &_mediaPlayerState, + QObject *parent = 0, const char *name =0 ); ~XineControl(); bool hasVideo() const { return hasVideoChannel; } bool hasAudio() const { return hasAudioChannel; } public slots: void play( const QString& fileName ); void stop( bool ); /** * Pause the media stream * @param if pause or not @@ -105,19 +105,16 @@ private: XINE::Lib *libXine; long m_currentTime; long m_position; int m_length; QString m_fileName; bool disabledSuspendScreenSaver : 1; bool hasVideoChannel : 1; bool hasAudioChannel : 1; MediaPlayerState &mediaPlayerState; signals: void positionChanged( long ); - -private: - VideoWidget *videoUI; }; #endif |