Diffstat (limited to 'noncore/multimedia/opieplayer2') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/multimedia/opieplayer2/mediaplayerstate.cpp | 6 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/mediaplayerstate.h | 4 |
2 files changed, 10 insertions, 0 deletions
diff --git a/noncore/multimedia/opieplayer2/mediaplayerstate.cpp b/noncore/multimedia/opieplayer2/mediaplayerstate.cpp index 586870c..22451b7 100644 --- a/noncore/multimedia/opieplayer2/mediaplayerstate.cpp +++ b/noncore/multimedia/opieplayer2/mediaplayerstate.cpp @@ -87,2 +87,7 @@ void MediaPlayerState::writeConfig( Config& cfg ) const { +MediaPlayerState::MediaType MediaPlayerState::mediaType() const +{ + return view() == 'a' ? MediaPlayerState::Audio : MediaPlayerState::Video; +} + // slots @@ -205,2 +210,3 @@ void MediaPlayerState::setView( char v ) { emit viewChanged(v); + emit mediaTypeChanged( mediaType() ); } diff --git a/noncore/multimedia/opieplayer2/mediaplayerstate.h b/noncore/multimedia/opieplayer2/mediaplayerstate.h index fc4e6cb..9474882 100644 --- a/noncore/multimedia/opieplayer2/mediaplayerstate.h +++ b/noncore/multimedia/opieplayer2/mediaplayerstate.h @@ -49,2 +49,4 @@ Q_OBJECT public: + enum MediaType { Audio, Video }; + MediaPlayerState( QObject *parent, const char *name ); @@ -64,2 +66,3 @@ public: char view() const { return curView; } + MediaType mediaType() const; @@ -110,2 +113,3 @@ signals: void viewChanged( char ); + void mediaTypeChanged( MediaType type ); void isSeekableToggled( bool ); |