summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/videowidget.cpp13
-rw-r--r--noncore/multimedia/opieplayer2/videowidget.h4
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
@@ -138,9 +138,9 @@ 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() );
setPosition( mediaPlayerState->position() );
@@ -238,19 +238,20 @@ void VideoWidget::setPosition( long i ) {
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 {
+ 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 ) {
// Will flicker too much if we don't do this
if ( max == 0 ) {
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
@@ -36,8 +36,10 @@
#include <qwidget.h>
#include "xinevideowidget.h"
+#include "mediaplayerstate.h"
+
class QPixmap;
class QSlider;
enum VideoButtons {
@@ -68,9 +70,9 @@ public slots:
void makeVisible();
void backToNormal();
void setPosition( long );
void setLength( long );
- void setView( char );
+ void setDisplayType( MediaPlayerState::DisplayType displayType );
signals:
void moreClicked();
void lessClicked();