-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 @@ -162,3 +162,3 @@ AudioWidget::AudioWidget(QWidget* parent, const char* name, WFlags f) : 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) ) ); @@ -266,12 +266,11 @@ void AudioWidget::setLength( long 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(); } 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 @@ -48,2 +48,4 @@ +#include "mediaplayerstate.h" + class QPixmap; @@ -81,3 +83,3 @@ public slots: void setSeekable( bool ); - void setView( char ); + void setMediaType( MediaPlayerState::MediaType mediaType ); |