summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/videowidget.cpp19
-rw-r--r--noncore/multimedia/opieplayer2/videowidget.h4
2 files changed, 13 insertions, 10 deletions
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
@@ -141,3 +141,3 @@ QWidget( parent, name, f ), scaledWidth( 0 ), scaledHeight( 0 ) {
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) ) );
@@ -241,12 +241,13 @@ void VideoWidget::setLength( long 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();
}
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
@@ -39,2 +39,4 @@
+#include "mediaplayerstate.h"
+
class QPixmap;
@@ -71,3 +73,3 @@ public slots:
void setLength( long );
- void setView( char );
+ void setDisplayType( MediaPlayerState::DisplayType displayType );