From 54665278a9b7d703deb73ede0d74d3948c265b39 Mon Sep 17 00:00:00 2001 From: simon Date: Mon, 02 Dec 2002 18:37:23 +0000 Subject: - converted to MediaPlayerState::DisplayType --- (limited to 'noncore') diff --git a/noncore/multimedia/opieplayer2/videowidget.cpp b/noncore/multimedia/opieplayer2/videowidget.cpp index ff3f5f7..9ce2b57 100644 --- a/noncore/multimedia/opieplayer2/videowidget.cpp +++ b/noncore/multimedia/opieplayer2/videowidget.cpp @@ -139,7 +139,7 @@ QWidget( parent, name, f ), scaledWidth( 0 ), scaledHeight( 0 ) { resizeEvent( NULL ); connect( mediaPlayerState, SIGNAL( lengthChanged(long) ), this, SLOT( setLength(long) ) ); - connect( mediaPlayerState, SIGNAL( viewChanged(char) ), this, SLOT( setView(char) ) ); + connect( mediaPlayerState, SIGNAL( displayTypeChanged(MediaPlayerState::DisplayType) ), this, SLOT( setDisplayType(MediaPlayerState::DisplayType) ) ); connect( mediaPlayerState, SIGNAL( playingToggled(bool) ), this, SLOT( setPlaying(bool) ) ); setLength( mediaPlayerState->length() ); @@ -239,16 +239,17 @@ void VideoWidget::setLength( long max ) { updateSlider( mediaPlayerState->position(), max ); } -void VideoWidget::setView( char view ) { - - if ( view == 'v' ) { +void VideoWidget::setDisplayType( MediaPlayerState::DisplayType displayType ) +{ + if ( displayType == MediaPlayerState::Video ) { makeVisible(); - } else { - // Effectively blank the view next time we show it so it looks nicer - scaledWidth = 0; - scaledHeight = 0; - hide(); + return; } + + // Effectively blank the view next time we show it so it looks nicer + scaledWidth = 0; + scaledHeight = 0; + hide(); } void VideoWidget::updateSlider( long i, long max ) { diff --git a/noncore/multimedia/opieplayer2/videowidget.h b/noncore/multimedia/opieplayer2/videowidget.h index 990fa5f..89af646 100644 --- a/noncore/multimedia/opieplayer2/videowidget.h +++ b/noncore/multimedia/opieplayer2/videowidget.h @@ -37,6 +37,8 @@ #include #include "xinevideowidget.h" +#include "mediaplayerstate.h" + class QPixmap; class QSlider; @@ -69,7 +71,7 @@ public slots: void backToNormal(); void setPosition( long ); void setLength( long ); - void setView( char ); + void setDisplayType( MediaPlayerState::DisplayType displayType ); signals: void moreClicked(); -- cgit v0.9.0.2