Diffstat (limited to 'noncore/multimedia/opieplayer2/mediawidget.h') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/multimedia/opieplayer2/mediawidget.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/noncore/multimedia/opieplayer2/mediawidget.h b/noncore/multimedia/opieplayer2/mediawidget.h index 46c304d..aa8891f 100644 --- a/noncore/multimedia/opieplayer2/mediawidget.h +++ b/noncore/multimedia/opieplayer2/mediawidget.h | |||
@@ -26,30 +26,31 @@ | |||
26 | #include <qwidget.h> | 26 | #include <qwidget.h> |
27 | 27 | ||
28 | #include "mediaplayerstate.h" | 28 | #include "mediaplayerstate.h" |
29 | #include "playlistwidget.h" | 29 | #include "playlistwidget.h" |
30 | 30 | ||
31 | #include <vector> | 31 | #include <vector> |
32 | 32 | ||
33 | class MediaWidget : public QWidget | 33 | class MediaWidget : public QWidget |
34 | { | 34 | { |
35 | Q_OBJECT | 35 | Q_OBJECT |
36 | public: | 36 | public: |
37 | enum Command { Play = 0, Stop, Next, Previous, VolumeUp, VolumeDown, Loop, PlayList, Forward, Back }; | 37 | enum Command { Play = 0, Stop, Next, Previous, VolumeUp, VolumeDown, Loop, PlayList, Forward, Back }; |
38 | enum ButtonType { NormalButton, ToggleButton }; | ||
38 | 39 | ||
39 | struct Button | 40 | struct Button |
40 | { | 41 | { |
41 | Button() : isToggle( false ), isHeld( false ), isDown( false ) {} | 42 | Button() : buttonType( NormalButton ), isHeld( false ), isDown( false ) {} |
42 | 43 | ||
43 | bool isToggle : 1; | 44 | ButtonType buttonType : 1; |
44 | bool isHeld : 1; | 45 | bool isHeld : 1; |
45 | bool isDown : 1; | 46 | bool isDown : 1; |
46 | }; | 47 | }; |
47 | typedef std::vector<Button> ButtonVector; | 48 | typedef std::vector<Button> ButtonVector; |
48 | 49 | ||
49 | MediaWidget( PlayListWidget &_playList, MediaPlayerState &_mediaPlayerState, QWidget *parent = 0, const char *name = 0 ); | 50 | MediaWidget( PlayListWidget &_playList, MediaPlayerState &_mediaPlayerState, QWidget *parent = 0, const char *name = 0 ); |
50 | virtual ~MediaWidget(); | 51 | virtual ~MediaWidget(); |
51 | 52 | ||
52 | public slots: | 53 | public slots: |
53 | virtual void setDisplayType( MediaPlayerState::DisplayType displayType ) = 0; | 54 | virtual void setDisplayType( MediaPlayerState::DisplayType displayType ) = 0; |
54 | virtual void setLength( long length ) = 0; | 55 | virtual void setLength( long length ) = 0; |
55 | virtual void setPlaying( bool playing ) = 0; | 56 | virtual void setPlaying( bool playing ) = 0; |