author | simon <simon> | 2002-12-08 20:44:22 (UTC) |
---|---|---|
committer | simon <simon> | 2002-12-08 20:44:22 (UTC) |
commit | 8824690b4900ebfac866b90cf3e715b62a2acc89 (patch) (unidiff) | |
tree | 943b937168bc723402b4f94471dfdcc8db10f5ae | |
parent | 7c3bd0be34ef70a2297e6f27c592da62f3010da5 (diff) | |
download | opie-8824690b4900ebfac866b90cf3e715b62a2acc89.zip opie-8824690b4900ebfac866b90cf3e715b62a2acc89.tar.gz opie-8824690b4900ebfac866b90cf3e715b62a2acc89.tar.bz2 |
- merged duplicated MediaButton definition into common MediaWidget::Button
structure
-rw-r--r-- | noncore/multimedia/opieplayer2/audiowidget.cpp | 4 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/mediawidget.h | 9 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/videowidget.cpp | 9 |
3 files changed, 13 insertions, 9 deletions
diff --git a/noncore/multimedia/opieplayer2/audiowidget.cpp b/noncore/multimedia/opieplayer2/audiowidget.cpp index 7bf3a19..879d0b4 100644 --- a/noncore/multimedia/opieplayer2/audiowidget.cpp +++ b/noncore/multimedia/opieplayer2/audiowidget.cpp | |||
@@ -61,7 +61,7 @@ struct MediaButton { | |||
61 | }; | 61 | }; |
62 | 62 | ||
63 | //Layout information for the audioButtons (and if it is a toggle button or not) | 63 | //Layout information for the audioButtons (and if it is a toggle button or not) |
64 | MediaButton audioButtons[] = { | 64 | MediaWidget::Button audioButtons[] = { |
65 | { TRUE, FALSE, FALSE }, // play | 65 | { TRUE, FALSE, FALSE }, // play |
66 | { FALSE, FALSE, FALSE }, // stop | 66 | { FALSE, FALSE, FALSE }, // stop |
67 | { FALSE, FALSE, FALSE }, // next | 67 | { FALSE, FALSE, FALSE }, // next |
@@ -86,7 +86,7 @@ void changeTextColor( QWidget * w) { | |||
86 | w->setPalette( p ); | 86 | w->setPalette( p ); |
87 | } | 87 | } |
88 | 88 | ||
89 | const int numButtons = (sizeof(audioButtons)/sizeof(MediaButton)); | 89 | const int numButtons = (sizeof(audioButtons)/sizeof(MediaWidget::Button)); |
90 | 90 | ||
91 | } | 91 | } |
92 | 92 | ||
diff --git a/noncore/multimedia/opieplayer2/mediawidget.h b/noncore/multimedia/opieplayer2/mediawidget.h index 2d92d65..0b9d826 100644 --- a/noncore/multimedia/opieplayer2/mediawidget.h +++ b/noncore/multimedia/opieplayer2/mediawidget.h | |||
@@ -31,6 +31,15 @@ class MediaWidget : public QWidget | |||
31 | public: | 31 | public: |
32 | enum Command { Play = 0, Stop, Next, Previous, VolumeUp, VolumeDown, Loop, PlayList, Forward, Back }; | 32 | enum Command { Play = 0, Stop, Next, Previous, VolumeUp, VolumeDown, Loop, PlayList, Forward, Back }; |
33 | 33 | ||
34 | struct Button | ||
35 | { | ||
36 | // Button() : isToggle( false ), isHeld( false ), isDown( false ) {} | ||
37 | |||
38 | bool isToggle : 1; | ||
39 | bool isHeld : 1; | ||
40 | bool isDown : 1; | ||
41 | }; | ||
42 | |||
34 | MediaWidget( PlayListWidget &_playList, MediaPlayerState &_mediaPlayerState, QWidget *parent = 0, const char *name = 0 ); | 43 | MediaWidget( PlayListWidget &_playList, MediaPlayerState &_mediaPlayerState, QWidget *parent = 0, const char *name = 0 ); |
35 | virtual ~MediaWidget(); | 44 | virtual ~MediaWidget(); |
36 | 45 | ||
diff --git a/noncore/multimedia/opieplayer2/videowidget.cpp b/noncore/multimedia/opieplayer2/videowidget.cpp index a0aed62..7c20c6d 100644 --- a/noncore/multimedia/opieplayer2/videowidget.cpp +++ b/noncore/multimedia/opieplayer2/videowidget.cpp | |||
@@ -59,12 +59,7 @@ namespace | |||
59 | const int xo = 2; // movable x offset | 59 | const int xo = 2; // movable x offset |
60 | const int yo = 0; // movable y offset | 60 | const int yo = 0; // movable y offset |
61 | 61 | ||
62 | 62 | MediaWidget::Button videoButtons[] = { | |
63 | struct MediaButton { | ||
64 | bool isToggle, isHeld, isDown; | ||
65 | }; | ||
66 | |||
67 | MediaButton videoButtons[] = { | ||
68 | { FALSE, FALSE, FALSE }, // stop | 63 | { FALSE, FALSE, FALSE }, // stop |
69 | { TRUE, FALSE, FALSE }, // play | 64 | { TRUE, FALSE, FALSE }, // play |
70 | { FALSE, FALSE, FALSE }, // previous | 65 | { FALSE, FALSE, FALSE }, // previous |
@@ -78,7 +73,7 @@ const char * const skinV_mask_file_names[7] = { | |||
78 | "stop","play","back","fwd","up","down","full" | 73 | "stop","play","back","fwd","up","down","full" |
79 | }; | 74 | }; |
80 | 75 | ||
81 | const int numVButtons = (sizeof(videoButtons)/sizeof(MediaButton)); | 76 | const int numVButtons = (sizeof(videoButtons)/sizeof(MediaWidget::Button)); |
82 | 77 | ||
83 | } | 78 | } |
84 | 79 | ||