-rw-r--r-- | noncore/multimedia/opieplayer2/audiowidget.cpp | 22 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/xinecontrol.cpp | 7 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/xinecontrol.h | 2 |
3 files changed, 16 insertions, 15 deletions
diff --git a/noncore/multimedia/opieplayer2/audiowidget.cpp b/noncore/multimedia/opieplayer2/audiowidget.cpp index 23f4329..0e9e7ea 100644 --- a/noncore/multimedia/opieplayer2/audiowidget.cpp +++ b/noncore/multimedia/opieplayer2/audiowidget.cpp @@ -77,5 +77,5 @@ MediaButton audioButtons[] = { { FALSE, FALSE, FALSE }, // playlist { FALSE, FALSE, FALSE }, // forward - { FALSE, FALSE, FALSE } // back + { FALSE, FALSE, FALSE } // back }; @@ -99,5 +99,5 @@ AudioWidget::AudioWidget(QWidget* parent, const char* name, WFlags f) : QWidget( parent, name, f ), songInfo( this ), slider( Qt::Horizontal, this ), time( this ) { setCaption( tr("OpiePlayer") ); - + Config cfg("OpiePlayer"); cfg.setGroup("AudioWidget"); @@ -123,6 +123,6 @@ AudioWidget::AudioWidget(QWidget* parent, const char* name, WFlags f) : for ( int y = 0; y < imgUp->height(); y++ ) { uchar *line = dest[y]; - for ( int x = 0; x < imgUp->width(); x++ ) - if ( !qRed( imgMask.pixel( x, y ) ) ) + for ( int x = 0; x < imgUp->width(); x++ ) + if ( !qRed( imgMask.pixel( x, y ) ) ) line[x] = i + 1; } @@ -162,5 +162,5 @@ AudioWidget::AudioWidget(QWidget* parent, const char* name, WFlags f) : connect( mediaPlayerState, SIGNAL( pausedToggled(bool) ), this, SLOT( setPaused(bool) ) ); connect( mediaPlayerState, SIGNAL( playingToggled(bool) ), this, SLOT( setPlaying(bool) ) ); - + // Intialise state setLength( mediaPlayerState->length() ); @@ -173,5 +173,5 @@ AudioWidget::AudioWidget(QWidget* parent, const char* name, WFlags f) : AudioWidget::~AudioWidget() { - + for ( int i = 0; i < 11; i++ ) { delete buttonPixUp[i]; @@ -275,5 +275,5 @@ void AudioWidget::setView( char view ) { // this stops the slider from being moved, thus // does not stop stream when it reaches the end - slider.show(); + // slider.show(); connect( mediaPlayerState, SIGNAL( positionChanged(long) ),this, SLOT( setPosition(long) ) ); connect( mediaPlayerState, SIGNAL( positionUpdated(long) ),this, SLOT( setPosition(long) ) ); @@ -300,5 +300,5 @@ void AudioWidget::updateSlider( long i, long max ) { time.setText( timeAsString( i ) + " / " + timeAsString( max ) ); // qDebug( timeAsString( i ) + " / " + timeAsString( max ) ) ; - + if ( max == 0 ) { return; @@ -361,5 +361,5 @@ void AudioWidget::mouseMoveEvent( QMouseEvent *event ) { && y < imgButtonMask->height() && imgButtonMask->pixelIndex( x, y ) == i + 1 ); - if ( isOnButton && i == AudioVolumeUp ) + if ( isOnButton && i == AudioVolumeUp ) qDebug("on up"); @@ -368,7 +368,7 @@ void AudioWidget::mouseMoveEvent( QMouseEvent *event ) { toggleButton(i); switch (i) { - case AudioVolumeUp: + case AudioVolumeUp: qDebug("more clicked"); - emit moreClicked(); + emit moreClicked(); return; case AudioVolumeDown: emit lessClicked(); return; diff --git a/noncore/multimedia/opieplayer2/xinecontrol.cpp b/noncore/multimedia/opieplayer2/xinecontrol.cpp index 33889d0..d08ff04 100644 --- a/noncore/multimedia/opieplayer2/xinecontrol.cpp +++ b/noncore/multimedia/opieplayer2/xinecontrol.cpp @@ -47,5 +47,4 @@ XineControl::XineControl( QObject *parent, const char *name ) connect( mediaPlayerState, SIGNAL( pausedToggled(bool) ), this, SLOT( pause(bool) ) ); connect( this, SIGNAL( positionChanged( long ) ), mediaPlayerState, SLOT( updatePosition( long ) ) ); - connect( this, SIGNAL( positionChanged( long ) ), mediaPlayerState, SLOT( setPosition( long ) ) ); connect( mediaPlayerState, SIGNAL( playingToggled( bool ) ), this, SLOT( stop( bool ) ) ); connect( mediaPlayerState, SIGNAL( fullscreenToggled( bool ) ), this, SLOT( setFullscreen( bool ) ) ); @@ -59,4 +58,5 @@ XineControl::~XineControl() { void XineControl::play( const QString& fileName ) { + m_fileName = fileName; libXine->play( fileName ); mediaPlayerState->setPlaying( true ); @@ -112,5 +112,5 @@ void XineControl::length() { long XineControl::position() { m_position = ( currentTime() ); - mediaPlayerState->setPosition( m_position ); + mediaPlayerState->updatePosition( m_position ); long emitPos = (long)m_position; emit positionChanged( emitPos ); @@ -127,5 +127,6 @@ void XineControl::setFullscreen( bool isSet ) { void XineControl::seekTo( long second ) { - // libXine-> + qDebug("seek triggered!!"); + libXine->play( m_fileName , 0, (int)second ); } diff --git a/noncore/multimedia/opieplayer2/xinecontrol.h b/noncore/multimedia/opieplayer2/xinecontrol.h index 4a61f32..c7aefd4 100644 --- a/noncore/multimedia/opieplayer2/xinecontrol.h +++ b/noncore/multimedia/opieplayer2/xinecontrol.h @@ -64,5 +64,5 @@ private: long m_currentTime; long m_position; - + QString m_fileName; signals: void positionChanged( long ); |