author | simon <simon> | 2002-12-09 15:57:34 (UTC) |
---|---|---|
committer | simon <simon> | 2002-12-09 15:57:34 (UTC) |
commit | f676d71c1fe40539ceb0c0708fdaefcc9b5e1800 (patch) (unidiff) | |
tree | 5298119bdbd8bffafcd1a31aed1c6fbcb908d3bc | |
parent | 743155915f659d701ad468eadcc2b2173b6e2770 (diff) | |
download | opie-f676d71c1fe40539ceb0c0708fdaefcc9b5e1800.zip opie-f676d71c1fe40539ceb0c0708fdaefcc9b5e1800.tar.gz opie-f676d71c1fe40539ceb0c0708fdaefcc9b5e1800.tar.bz2 |
- back to a vector :P
-rw-r--r-- | noncore/multimedia/opieplayer2/audiowidget.cpp | 7 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/mediawidget.cpp | 3 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/mediawidget.h | 10 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/videowidget.cpp | 16 |
4 files changed, 19 insertions, 17 deletions
diff --git a/noncore/multimedia/opieplayer2/audiowidget.cpp b/noncore/multimedia/opieplayer2/audiowidget.cpp index 714509e..c3e206c 100644 --- a/noncore/multimedia/opieplayer2/audiowidget.cpp +++ b/noncore/multimedia/opieplayer2/audiowidget.cpp | |||
@@ -106,2 +106,3 @@ AudioWidget::AudioWidget( PlayListWidget &playList, MediaPlayerState &mediaPlaye | |||
106 | Button button; | 106 | Button button; |
107 | button.command = skinInfo[ i ].command; | ||
107 | button.type = skinInfo[ i ].type; | 108 | button.type = skinInfo[ i ].type; |
@@ -122,3 +123,3 @@ AudioWidget::AudioWidget( PlayListWidget &playList, MediaPlayerState &mediaPlaye | |||
122 | 123 | ||
123 | buttons.insert( i, button ); | 124 | buttons.push_back( button ); |
124 | } | 125 | } |
@@ -210,3 +211,3 @@ void AudioWidget::resizeEvent( QResizeEvent * ) { | |||
210 | 211 | ||
211 | for ( uint i = 0; i < buttons.count(); i++ ) { | 212 | for ( uint i = 0; i < buttons.size(); i++ ) { |
212 | if ( !buttons[i].mask.isNull() ) { | 213 | if ( !buttons[i].mask.isNull() ) { |
@@ -336,3 +337,3 @@ void AudioWidget::timerEvent( QTimerEvent * ) { | |||
336 | void AudioWidget::mouseMoveEvent( QMouseEvent *event ) { | 337 | void AudioWidget::mouseMoveEvent( QMouseEvent *event ) { |
337 | for ( unsigned int i = 0; i < buttons.count(); i++ ) { | 338 | for ( unsigned int i = 0; i < buttons.size(); i++ ) { |
338 | 339 | ||
diff --git a/noncore/multimedia/opieplayer2/mediawidget.cpp b/noncore/multimedia/opieplayer2/mediawidget.cpp index 66129c9..7891a7e 100644 --- a/noncore/multimedia/opieplayer2/mediawidget.cpp +++ b/noncore/multimedia/opieplayer2/mediawidget.cpp | |||
@@ -84,2 +84,3 @@ void MediaWidget::handleCommand( Command command, bool buttonDown ) | |||
84 | case Back: emit backReleased(); return; | 84 | case Back: emit backReleased(); return; |
85 | default: assert( false ); | ||
85 | } | 86 | } |
@@ -97,3 +98,3 @@ void MediaWidget::paintAllButtons( QPainter &p ) | |||
97 | { | 98 | { |
98 | for ( ButtonMap::ConstIterator it = buttons.begin(); | 99 | for ( ButtonVector::const_iterator it = buttons.begin(); |
99 | it != buttons.end(); ++it ) | 100 | it != buttons.end(); ++it ) |
diff --git a/noncore/multimedia/opieplayer2/mediawidget.h b/noncore/multimedia/opieplayer2/mediawidget.h index 05b7b71..efba6f3 100644 --- a/noncore/multimedia/opieplayer2/mediawidget.h +++ b/noncore/multimedia/opieplayer2/mediawidget.h | |||
@@ -37,3 +37,3 @@ class MediaWidget : public QWidget | |||
37 | public: | 37 | public: |
38 | enum Command { Play = 0, Stop, Next, Previous, VolumeUp, VolumeDown, Loop, PlayList, Forward, Back }; | 38 | enum Command { Play = 0, Stop, Next, Previous, VolumeUp, VolumeDown, Loop, PlayList, Forward, Back, Undefined }; |
39 | enum ButtonType { NormalButton, ToggleButton }; | 39 | enum ButtonType { NormalButton, ToggleButton }; |
@@ -42,3 +42,5 @@ public: | |||
42 | { | 42 | { |
43 | Button() : type( NormalButton ), isHeld( false ), isDown( false ) {} | 43 | Button() : command( Undefined ), type( NormalButton ), isHeld( false ), isDown( false ) {} |
44 | |||
45 | Command command; | ||
44 | 46 | ||
@@ -53,4 +55,2 @@ public: | |||
53 | typedef std::vector<Button> ButtonVector; | 55 | typedef std::vector<Button> ButtonVector; |
54 | // when the transition is done this should be Command -> Button | ||
55 | typedef QMap<int, Button> ButtonMap; | ||
56 | 56 | ||
@@ -99,3 +99,3 @@ protected: | |||
99 | 99 | ||
100 | ButtonMap buttons; | 100 | ButtonVector buttons; |
101 | 101 | ||
diff --git a/noncore/multimedia/opieplayer2/videowidget.cpp b/noncore/multimedia/opieplayer2/videowidget.cpp index 9782b68..f59772e 100644 --- a/noncore/multimedia/opieplayer2/videowidget.cpp +++ b/noncore/multimedia/opieplayer2/videowidget.cpp | |||
@@ -76,9 +76,9 @@ VideoWidget::VideoWidget( PlayListWidget &playList, MediaPlayerState &mediaPlaye | |||
76 | 76 | ||
77 | buttons.insert( 0, toggleButton ); // play | 77 | buttons.push_back( toggleButton ); // play |
78 | buttons.insert( 1, toggleButton ); // stop | 78 | buttons.push_back( toggleButton ); // stop |
79 | buttons.insert( 2, toggleButton ); // next | 79 | buttons.push_back( toggleButton ); // next |
80 | buttons.insert( 3, toggleButton ); // previous | 80 | buttons.push_back( toggleButton ); // previous |
81 | buttons.insert( 4, toggleButton ); // volUp | 81 | buttons.push_back( toggleButton ); // volUp |
82 | buttons.insert( 5, toggleButton ); // volDown | 82 | buttons.push_back( toggleButton ); // volDown |
83 | buttons.insert( 6, toggleButton ); // fullscreen | 83 | buttons.push_back( toggleButton ); // fullscreen |
84 | 84 | ||
@@ -245,3 +245,3 @@ void VideoWidget::updateSlider( long i, long max ) { | |||
245 | void VideoWidget::mouseMoveEvent( QMouseEvent *event ) { | 245 | void VideoWidget::mouseMoveEvent( QMouseEvent *event ) { |
246 | for ( unsigned int i = 0; i < buttons.count(); i++ ) { | 246 | for ( unsigned int i = 0; i < buttons.size(); i++ ) { |
247 | 247 | ||