author | simon <simon> | 2002-12-02 18:11:26 (UTC) |
---|---|---|
committer | simon <simon> | 2002-12-02 18:11:26 (UTC) |
commit | 66979ef81a8e945f8d34db05399b1d92cdb3b67a (patch) (unidiff) | |
tree | 1d99c8cceb3abae3be0947c712b0fa28d0c24d87 | |
parent | 41fe383fe8b840de6dc0bcd47cd29b0d68bf760a (diff) | |
download | opie-66979ef81a8e945f8d34db05399b1d92cdb3b67a.zip opie-66979ef81a8e945f8d34db05399b1d92cdb3b67a.tar.gz opie-66979ef81a8e945f8d34db05399b1d92cdb3b67a.tar.bz2 |
- introducing MediaType { Video, Audio } enum, to get rid of the
char view ('a' and 'v') step by step
-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 | |||
@@ -86,4 +86,9 @@ void MediaPlayerState::writeConfig( Config& cfg ) const { | |||
86 | } | 86 | } |
87 | 87 | ||
88 | MediaPlayerState::MediaType MediaPlayerState::mediaType() const | ||
89 | { | ||
90 | return view() == 'a' ? MediaPlayerState::Audio : MediaPlayerState::Video; | ||
91 | } | ||
92 | |||
88 | // slots | 93 | // slots |
89 | void MediaPlayerState::setIsStreaming( bool b ) { | 94 | void MediaPlayerState::setIsStreaming( bool b ) { |
@@ -204,4 +209,5 @@ void MediaPlayerState::setView( char v ) { | |||
204 | curView = v; | 209 | curView = v; |
205 | emit viewChanged(v); | 210 | emit viewChanged(v); |
211 | emit mediaTypeChanged( mediaType() ); | ||
206 | } | 212 | } |
207 | 213 | ||
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 | |||
@@ -48,4 +48,6 @@ class MediaPlayerState : public QObject { | |||
48 | Q_OBJECT | 48 | Q_OBJECT |
49 | public: | 49 | public: |
50 | enum MediaType { Audio, Video }; | ||
51 | |||
50 | MediaPlayerState( QObject *parent, const char *name ); | 52 | MediaPlayerState( QObject *parent, const char *name ); |
51 | ~MediaPlayerState(); | 53 | ~MediaPlayerState(); |
@@ -63,4 +65,5 @@ public: | |||
63 | long length() const { return curLength; } | 65 | long length() const { return curLength; } |
64 | char view() const { return curView; } | 66 | char view() const { return curView; } |
67 | MediaType mediaType() const; | ||
65 | 68 | ||
66 | public slots: | 69 | public slots: |
@@ -109,4 +112,5 @@ signals: | |||
109 | void lengthChanged( long ); | 112 | void lengthChanged( long ); |
110 | void viewChanged( char ); | 113 | void viewChanged( char ); |
114 | void mediaTypeChanged( MediaType type ); | ||
111 | void isSeekableToggled( bool ); | 115 | void isSeekableToggled( bool ); |
112 | void blankToggled( bool ); | 116 | void blankToggled( bool ); |