author | simon <simon> | 2002-12-02 20:36:40 (UTC) |
---|---|---|
committer | simon <simon> | 2002-12-02 20:36:40 (UTC) |
commit | 0090a335a7162f4b0d34f78850ebf9a8bd544c01 (patch) (unidiff) | |
tree | aedbe7cbf4f30bb72dd4ded98f128227694de4b9 /noncore/multimedia/opieplayer2/xinecontrol.cpp | |
parent | 6cd1494f86f2f60614c9b9a7b959666dec2500ee (diff) | |
download | opie-0090a335a7162f4b0d34f78850ebf9a8bd544c01.zip opie-0090a335a7162f4b0d34f78850ebf9a8bd544c01.tar.gz opie-0090a335a7162f4b0d34f78850ebf9a8bd544c01.tar.bz2 |
- removed last traces of mediaPlayerState singleton. yay :)
Diffstat (limited to 'noncore/multimedia/opieplayer2/xinecontrol.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/multimedia/opieplayer2/xinecontrol.cpp | 33 |
1 files changed, 16 insertions, 17 deletions
diff --git a/noncore/multimedia/opieplayer2/xinecontrol.cpp b/noncore/multimedia/opieplayer2/xinecontrol.cpp index e7d5a7b..071ef7c 100644 --- a/noncore/multimedia/opieplayer2/xinecontrol.cpp +++ b/noncore/multimedia/opieplayer2/xinecontrol.cpp | |||
@@ -42,6 +42,5 @@ | |||
42 | 42 | ||
43 | extern MediaPlayerState *mediaPlayerState; | ||
44 | extern VideoWidget *videoUI; | 43 | extern VideoWidget *videoUI; |
45 | XineControl::XineControl( QObject *parent, const char *name ) | 44 | XineControl::XineControl( MediaPlayerState &_mediaPlayerState, QObject *parent, const char *name ) |
46 | : QObject( parent, name ) { | 45 | : QObject( parent, name ), mediaPlayerState( _mediaPlayerState ) { |
47 | 46 | ||
@@ -50,8 +49,8 @@ XineControl::XineControl( QObject *parent, const char *name ) | |||
50 | connect ( videoUI, SIGNAL( videoResized( const QSize & )), this, SLOT( videoResized ( const QSize & ) ) ); | 49 | connect ( videoUI, SIGNAL( videoResized( const QSize & )), this, SLOT( videoResized ( const QSize & ) ) ); |
51 | connect( mediaPlayerState, SIGNAL( pausedToggled( bool ) ), this, SLOT( pause( bool ) ) ); | 50 | connect( &mediaPlayerState, SIGNAL( pausedToggled( bool ) ), this, SLOT( pause( bool ) ) ); |
52 | connect( this, SIGNAL( positionChanged( long ) ), mediaPlayerState, SLOT( updatePosition( long ) ) ); | 51 | connect( this, SIGNAL( positionChanged( long ) ), &mediaPlayerState, SLOT( updatePosition( long ) ) ); |
53 | connect( mediaPlayerState, SIGNAL( playingToggled( bool ) ), this, SLOT( stop( bool ) ) ); | 52 | connect( &mediaPlayerState, SIGNAL( playingToggled( bool ) ), this, SLOT( stop( bool ) ) ); |
54 | connect( mediaPlayerState, SIGNAL( fullscreenToggled( bool ) ), this, SLOT( setFullscreen( bool ) ) ); | 53 | connect( &mediaPlayerState, SIGNAL( fullscreenToggled( bool ) ), this, SLOT( setFullscreen( bool ) ) ); |
55 | connect( mediaPlayerState, SIGNAL( positionChanged( long ) ), this, SLOT( seekTo( long ) ) ); | 54 | connect( &mediaPlayerState, SIGNAL( positionChanged( long ) ), this, SLOT( seekTo( long ) ) ); |
56 | connect( mediaPlayerState, SIGNAL( videoGammaChanged( int ) ), this, SLOT( setGamma( int ) ) ); | 55 | connect( &mediaPlayerState, SIGNAL( videoGammaChanged( int ) ), this, SLOT( setGamma( int ) ) ); |
57 | connect( libXine, SIGNAL( stopped() ), this, SLOT( nextMedia() ) ); | 56 | connect( libXine, SIGNAL( stopped() ), this, SLOT( nextMedia() ) ); |
@@ -82,6 +81,6 @@ void XineControl::play( const QString& fileName ) { | |||
82 | // toggle stop so the the play button is reset | 81 | // toggle stop so the the play button is reset |
83 | mediaPlayerState->setPlaying( false ); | 82 | mediaPlayerState.setPlaying( false ); |
84 | return; | 83 | return; |
85 | } | 84 | } |
86 | mediaPlayerState->setPlaying( true ); | 85 | mediaPlayerState.setPlaying( true ); |
87 | 86 | ||
@@ -101,6 +100,6 @@ void XineControl::play( const QString& fileName ) { | |||
101 | // determine if slider is shown | 100 | // determine if slider is shown |
102 | mediaPlayerState->setIsSeekable( libXine->isSeekable() ); | 101 | mediaPlayerState.setIsSeekable( libXine->isSeekable() ); |
103 | 102 | ||
104 | // which gui (video / audio) | 103 | // which gui (video / audio) |
105 | mediaPlayerState->setDisplayType( displayType ); | 104 | mediaPlayerState.setDisplayType( displayType ); |
106 | 105 | ||
@@ -120,3 +119,3 @@ void XineControl::play( const QString& fileName ) { | |||
120 | void XineControl::nextMedia() { | 119 | void XineControl::nextMedia() { |
121 | mediaPlayerState->setNext(); | 120 | mediaPlayerState.setNext(); |
122 | } | 121 | } |
@@ -169,3 +168,3 @@ void XineControl::length() { | |||
169 | m_length = libXine->length(); | 168 | m_length = libXine->length(); |
170 | mediaPlayerState->setLength( m_length ); | 169 | mediaPlayerState.setLength( m_length ); |
171 | } | 170 | } |
@@ -179,6 +178,6 @@ long XineControl::position() { | |||
179 | m_position = ( currentTime() ); | 178 | m_position = ( currentTime() ); |
180 | mediaPlayerState->updatePosition( m_position ); | 179 | mediaPlayerState.updatePosition( m_position ); |
181 | long emitPos = (long)m_position; | 180 | long emitPos = (long)m_position; |
182 | emit positionChanged( emitPos ); | 181 | emit positionChanged( emitPos ); |
183 | if( mediaPlayerState->isPlaying() ) { | 182 | if( mediaPlayerState.isPlaying() ) { |
184 | // needs to be stopped the media is stopped | 183 | // needs to be stopped the media is stopped |