-rw-r--r-- | noncore/multimedia/opieplayer2/videowidget.cpp | 13 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/videowidget.h | 4 |
2 files changed, 10 insertions, 7 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 | |||
@@ -139,7 +139,7 @@ QWidget( parent, name, f ), scaledWidth( 0 ), scaledHeight( 0 ) { | |||
139 | resizeEvent( NULL ); | 139 | resizeEvent( NULL ); |
140 | 140 | ||
141 | connect( mediaPlayerState, SIGNAL( lengthChanged(long) ), this, SLOT( setLength(long) ) ); | 141 | connect( mediaPlayerState, SIGNAL( lengthChanged(long) ), this, SLOT( setLength(long) ) ); |
142 | connect( mediaPlayerState, SIGNAL( viewChanged(char) ), this, SLOT( setView(char) ) ); | 142 | connect( mediaPlayerState, SIGNAL( displayTypeChanged(MediaPlayerState::DisplayType) ), this, SLOT( setDisplayType(MediaPlayerState::DisplayType) ) ); |
143 | connect( mediaPlayerState, SIGNAL( playingToggled(bool) ), this, SLOT( setPlaying(bool) ) ); | 143 | connect( mediaPlayerState, SIGNAL( playingToggled(bool) ), this, SLOT( setPlaying(bool) ) ); |
144 | 144 | ||
145 | setLength( mediaPlayerState->length() ); | 145 | setLength( mediaPlayerState->length() ); |
@@ -239,17 +239,18 @@ void VideoWidget::setLength( long max ) { | |||
239 | updateSlider( mediaPlayerState->position(), max ); | 239 | updateSlider( mediaPlayerState->position(), max ); |
240 | } | 240 | } |
241 | 241 | ||
242 | void VideoWidget::setView( char view ) { | 242 | void VideoWidget::setDisplayType( MediaPlayerState::DisplayType displayType ) |
243 | 243 | { | |
244 | if ( view == 'v' ) { | 244 | if ( displayType == MediaPlayerState::Video ) { |
245 | makeVisible(); | 245 | makeVisible(); |
246 | } else { | 246 | return; |
247 | } | ||
248 | |||
247 | // Effectively blank the view next time we show it so it looks nicer | 249 | // Effectively blank the view next time we show it so it looks nicer |
248 | scaledWidth = 0; | 250 | scaledWidth = 0; |
249 | scaledHeight = 0; | 251 | scaledHeight = 0; |
250 | hide(); | 252 | hide(); |
251 | } | 253 | } |
252 | } | ||
253 | 254 | ||
254 | void VideoWidget::updateSlider( long i, long max ) { | 255 | void VideoWidget::updateSlider( long i, long max ) { |
255 | // Will flicker too much if we don't do this | 256 | // Will flicker too much if we don't do this |
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 @@ | |||
37 | #include <qwidget.h> | 37 | #include <qwidget.h> |
38 | #include "xinevideowidget.h" | 38 | #include "xinevideowidget.h" |
39 | 39 | ||
40 | #include "mediaplayerstate.h" | ||
41 | |||
40 | class QPixmap; | 42 | class QPixmap; |
41 | class QSlider; | 43 | class QSlider; |
42 | 44 | ||
@@ -69,7 +71,7 @@ public slots: | |||
69 | void backToNormal(); | 71 | void backToNormal(); |
70 | void setPosition( long ); | 72 | void setPosition( long ); |
71 | void setLength( long ); | 73 | void setLength( long ); |
72 | void setView( char ); | 74 | void setDisplayType( MediaPlayerState::DisplayType displayType ); |
73 | 75 | ||
74 | signals: | 76 | signals: |
75 | void moreClicked(); | 77 | void moreClicked(); |