-rw-r--r-- | noncore/multimedia/opieplayer2/audiowidget.cpp | 14 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/audiowidget.h | 2 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/mediaplayerstate.cpp | 16 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/mediaplayerstate.h | 6 |
4 files changed, 23 insertions, 15 deletions
diff --git a/noncore/multimedia/opieplayer2/audiowidget.cpp b/noncore/multimedia/opieplayer2/audiowidget.cpp index 74bc390..1600320 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) : | |||
162 | connect( mediaPlayerState, SIGNAL( lengthChanged(long) ), this, SLOT( setLength(long) ) ); | 162 | connect( mediaPlayerState, SIGNAL( lengthChanged(long) ), this, SLOT( setLength(long) ) ); |
163 | connect( mediaPlayerState, SIGNAL( mediaTypeChanged(MediaPlayerState::MediaType) ), this, SLOT( setMediaType(MediaPlayerState::MediaType) ) ); | 163 | connect( mediaPlayerState, SIGNAL( displayTypeChanged(MediaPlayerState::DisplayType) ), this, SLOT( setDisplayType(MediaPlayerState::DisplayType) ) ); |
164 | connect( mediaPlayerState, SIGNAL( loopingToggled(bool) ), this, SLOT( setLooping(bool) ) ); | 164 | connect( mediaPlayerState, SIGNAL( loopingToggled(bool) ), this, SLOT( setLooping(bool) ) ); |
@@ -266,6 +266,6 @@ void AudioWidget::setLength( long max ) { | |||
266 | 266 | ||
267 | void AudioWidget::setMediaType( MediaPlayerState::MediaType mediaType ) { | 267 | void AudioWidget::setDisplayType( MediaPlayerState::DisplayType mediaType ) { |
268 | if ( mediaType == MediaPlayerState::Video ) { | 268 | if ( mediaType == MediaPlayerState::Audio ) { |
269 | killTimers(); | 269 | // startTimer( 150 ); |
270 | hide(); | 270 | showMaximized(); |
271 | return; | 271 | return; |
@@ -273,4 +273,4 @@ void AudioWidget::setMediaType( MediaPlayerState::MediaType mediaType ) { | |||
273 | 273 | ||
274 | // startTimer( 150 ); | 274 | killTimers(); |
275 | showMaximized(); | 275 | hide(); |
276 | } | 276 | } |
diff --git a/noncore/multimedia/opieplayer2/audiowidget.h b/noncore/multimedia/opieplayer2/audiowidget.h index 3f0c059..91fcbc5 100644 --- a/noncore/multimedia/opieplayer2/audiowidget.h +++ b/noncore/multimedia/opieplayer2/audiowidget.h | |||
@@ -83,3 +83,3 @@ public slots: | |||
83 | void setSeekable( bool ); | 83 | void setSeekable( bool ); |
84 | void setMediaType( MediaPlayerState::MediaType mediaType ); | 84 | void setDisplayType( MediaPlayerState::DisplayType displayType ); |
85 | 85 | ||
diff --git a/noncore/multimedia/opieplayer2/mediaplayerstate.cpp b/noncore/multimedia/opieplayer2/mediaplayerstate.cpp index 22451b7..6806adc 100644 --- a/noncore/multimedia/opieplayer2/mediaplayerstate.cpp +++ b/noncore/multimedia/opieplayer2/mediaplayerstate.cpp | |||
@@ -43,3 +43,3 @@ | |||
43 | 43 | ||
44 | 44 | #include <assert.h> | |
45 | 45 | ||
@@ -87,5 +87,13 @@ void MediaPlayerState::writeConfig( Config& cfg ) const { | |||
87 | 87 | ||
88 | MediaPlayerState::MediaType MediaPlayerState::mediaType() const | 88 | MediaPlayerState::DisplayType MediaPlayerState::displayType() const |
89 | { | 89 | { |
90 | return view() == 'a' ? MediaPlayerState::Audio : MediaPlayerState::Video; | 90 | char v = view(); |
91 | switch ( v ) { | ||
92 | case 'a': return MediaPlayerState::Audio; | ||
93 | case 'v': return MediaPlayerState::Video; | ||
94 | case 'l': return MediaPlayerState::MediaSelection; | ||
95 | default: assert( false ); | ||
96 | } | ||
97 | // never reached | ||
98 | return MediaPlayerState::MediaSelection; | ||
91 | } | 99 | } |
@@ -210,3 +218,3 @@ void MediaPlayerState::setView( char v ) { | |||
210 | emit viewChanged(v); | 218 | emit viewChanged(v); |
211 | emit mediaTypeChanged( mediaType() ); | 219 | emit displayTypeChanged( displayType() ); |
212 | } | 220 | } |
diff --git a/noncore/multimedia/opieplayer2/mediaplayerstate.h b/noncore/multimedia/opieplayer2/mediaplayerstate.h index 05264cf..ca531c5 100644 --- a/noncore/multimedia/opieplayer2/mediaplayerstate.h +++ b/noncore/multimedia/opieplayer2/mediaplayerstate.h | |||
@@ -49,3 +49,3 @@ Q_OBJECT | |||
49 | public: | 49 | public: |
50 | enum MediaType { Audio, Video }; | 50 | enum DisplayType { Audio, Video, MediaSelection }; |
51 | 51 | ||
@@ -66,3 +66,3 @@ public: | |||
66 | char view() const { return curView; } | 66 | char view() const { return curView; } |
67 | MediaType mediaType() const; | 67 | DisplayType displayType() const; |
68 | 68 | ||
@@ -113,3 +113,3 @@ signals: | |||
113 | void viewChanged( char ); | 113 | void viewChanged( char ); |
114 | void mediaTypeChanged( MediaPlayerState::MediaType type ); | 114 | void displayTypeChanged( MediaPlayerState::DisplayType type ); |
115 | void isSeekableToggled( bool ); | 115 | void isSeekableToggled( bool ); |