-rw-r--r-- | noncore/multimedia/opieplayer2/audiowidget.cpp | 15 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/audiowidget.h | 4 |
2 files changed, 10 insertions, 9 deletions
diff --git a/noncore/multimedia/opieplayer2/audiowidget.cpp b/noncore/multimedia/opieplayer2/audiowidget.cpp index 46d374d..74bc390 100644 --- a/noncore/multimedia/opieplayer2/audiowidget.cpp +++ b/noncore/multimedia/opieplayer2/audiowidget.cpp @@ -157,13 +157,13 @@ AudioWidget::AudioWidget(QWidget* parent, const char* name, WFlags f) : // time.setFrame(FALSE); // changeTextColor( &time ); resizeEvent( NULL ); connect( mediaPlayerState, SIGNAL( lengthChanged(long) ), this, SLOT( setLength(long) ) ); - connect( mediaPlayerState, SIGNAL( viewChanged(char) ), this, SLOT( setView(char) ) ); + connect( mediaPlayerState, SIGNAL( mediaTypeChanged(MediaPlayerState::MediaType) ), this, SLOT( setMediaType(MediaPlayerState::MediaType) ) ); connect( mediaPlayerState, SIGNAL( loopingToggled(bool) ), this, SLOT( setLooping(bool) ) ); connect( mediaPlayerState, SIGNAL( playingToggled(bool) ), this, SLOT( setPlaying(bool) ) ); connect( mediaPlayerState, SIGNAL( isSeekableToggled( bool ) ), this, SLOT( setSeekable( bool ) ) ); connect( this, SIGNAL( forwardClicked() ), this, SLOT( skipFor() ) ); connect( this, SIGNAL( backClicked() ), this, SLOT( skipBack() ) ); @@ -261,22 +261,21 @@ void AudioWidget::setPosition( long i ) { void AudioWidget::setLength( long max ) { updateSlider( mediaPlayerState->position(), max ); } -void AudioWidget::setView( char view ) { - -if ( view == 'a' ) { - // startTimer( 150 ); - showMaximized(); - } else { +void AudioWidget::setMediaType( MediaPlayerState::MediaType mediaType ) { + if ( mediaType == MediaPlayerState::Video ) { killTimers(); hide(); + return; } - // qApp->processEvents(); + + // startTimer( 150 ); + showMaximized(); } void AudioWidget::setSeekable( bool isSeekable ) { if ( !isSeekable ) { diff --git a/noncore/multimedia/opieplayer2/audiowidget.h b/noncore/multimedia/opieplayer2/audiowidget.h index 54adb36..3f0c059 100644 --- a/noncore/multimedia/opieplayer2/audiowidget.h +++ b/noncore/multimedia/opieplayer2/audiowidget.h @@ -43,12 +43,14 @@ #include <qframe.h> #include <qlineedit.h> #include <qimage.h> #include <opie/oticker.h> +#include "mediaplayerstate.h" + class QPixmap; namespace { enum AudioButtons { AudioPlay=0, @@ -76,13 +78,13 @@ public slots: void sliderReleased( ); void setLooping( bool b) { setToggleButton( AudioLoop, b ); } void setPlaying( bool b) { setToggleButton( AudioPlay, b ); } void setPosition( long ); void setLength( long ); void setSeekable( bool ); - void setView( char ); + void setMediaType( MediaPlayerState::MediaType mediaType ); signals: void moreClicked(); void lessClicked(); void moreReleased(); void lessReleased(); |