summaryrefslogtreecommitdiff
authorsimon <simon>2002-12-09 14:10:58 (UTC)
committer simon <simon>2002-12-09 14:10:58 (UTC)
commitfffd954b4ea3c124a37cab9af99b248986029436 (patch) (unidiff)
treef5ae7f123b7e50957c7682cbb8b3c7144aadf71b
parent17f319bb44feb947a26be333a4c7e6fef7020c87 (diff)
downloadopie-fffd954b4ea3c124a37cab9af99b248986029436.zip
opie-fffd954b4ea3c124a37cab9af99b248986029436.tar.gz
opie-fffd954b4ea3c124a37cab9af99b248986029436.tar.bz2
- oops, buttonType is a bad name for a variable, given its redundancy
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/audiowidget.cpp4
-rw-r--r--noncore/multimedia/opieplayer2/mediawidget.h6
-rw-r--r--noncore/multimedia/opieplayer2/videowidget.cpp4
3 files changed, 7 insertions, 7 deletions
diff --git a/noncore/multimedia/opieplayer2/audiowidget.cpp b/noncore/multimedia/opieplayer2/audiowidget.cpp
index 3b33209..6e9c14a 100644
--- a/noncore/multimedia/opieplayer2/audiowidget.cpp
+++ b/noncore/multimedia/opieplayer2/audiowidget.cpp
@@ -83,17 +83,17 @@ void changeTextColor( QWidget * w) {
83 83
84AudioWidget::AudioWidget( PlayListWidget &playList, MediaPlayerState &mediaPlayerState, QWidget* parent, const char* name) : 84AudioWidget::AudioWidget( PlayListWidget &playList, MediaPlayerState &mediaPlayerState, QWidget* parent, const char* name) :
85 85
86 MediaWidget( playList, mediaPlayerState, parent, name ), songInfo( this ), slider( Qt::Horizontal, this ), time( this ), 86 MediaWidget( playList, mediaPlayerState, parent, name ), songInfo( this ), slider( Qt::Horizontal, this ), time( this ),
87 audioSliderBeingMoved( false ) 87 audioSliderBeingMoved( false )
88{ 88{
89 for ( uint i = 0; i < buttonCount; ++i ) { 89 for ( uint i = 0; i < buttonCount; ++i ) {
90 Button button; 90 Button button;
91 button.buttonType = skinInfo[ i ].buttonType; 91 button.type = skinInfo[ i ].type;
92 buttons.push_back( button ); 92 buttons.push_back( button );
93 } 93 }
94 94
95 setCaption( tr("OpiePlayer") ); 95 setCaption( tr("OpiePlayer") );
96 96
97 Config cfg("OpiePlayer"); 97 Config cfg("OpiePlayer");
98 cfg.setGroup("Options"); 98 cfg.setGroup("Options");
99 skin = cfg.readEntry("Skin","default"); 99 skin = cfg.readEntry("Skin","default");
@@ -382,17 +382,17 @@ void AudioWidget::mouseMoveEvent( QMouseEvent *event ) {
382 } 382 }
383 } else if ( !isOnButton && buttons[i].isHeld ) { 383 } else if ( !isOnButton && buttons[i].isHeld ) {
384 buttons[i].isHeld = FALSE; 384 buttons[i].isHeld = FALSE;
385 toggleButton(i); 385 toggleButton(i);
386 } 386 }
387 } else { 387 } else {
388 if ( buttons[i].isHeld ) { 388 if ( buttons[i].isHeld ) {
389 buttons[i].isHeld = FALSE; 389 buttons[i].isHeld = FALSE;
390 if ( buttons[i].buttonType != ToggleButton ) { 390 if ( buttons[i].type != ToggleButton ) {
391 setToggleButton( i, FALSE ); 391 setToggleButton( i, FALSE );
392 } 392 }
393 qDebug("mouseEvent %d", i); 393 qDebug("mouseEvent %d", i);
394 handleCommand( static_cast<Command>( i ), buttons[ i ].isDown ); 394 handleCommand( static_cast<Command>( i ), buttons[ i ].isDown );
395 } 395 }
396 } 396 }
397 } 397 }
398} 398}
diff --git a/noncore/multimedia/opieplayer2/mediawidget.h b/noncore/multimedia/opieplayer2/mediawidget.h
index e0f2cf1..9fb3499 100644
--- a/noncore/multimedia/opieplayer2/mediawidget.h
+++ b/noncore/multimedia/opieplayer2/mediawidget.h
@@ -34,29 +34,29 @@ class MediaWidget : public QWidget
34{ 34{
35 Q_OBJECT 35 Q_OBJECT
36public: 36public:
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 enum ButtonType { NormalButton, ToggleButton };
39 39
40 struct Button 40 struct Button
41 { 41 {
42 Button() : buttonType( NormalButton ), isHeld( false ), isDown( false ) {} 42 Button() : type( NormalButton ), isHeld( false ), isDown( false ) {}
43 43
44 ButtonType buttonType : 1; 44 ButtonType type : 1;
45 bool isHeld : 1; 45 bool isHeld : 1;
46 bool isDown : 1; 46 bool isDown : 1;
47 }; 47 };
48 typedef std::vector<Button> ButtonVector; 48 typedef std::vector<Button> ButtonVector;
49 49
50 struct SkinButtonInfo 50 struct SkinButtonInfo
51 { 51 {
52 Command command; 52 Command command;
53 const char *fileName; 53 const char *fileName;
54 ButtonType buttonType; 54 ButtonType type;
55 }; 55 };
56 56
57 MediaWidget( PlayListWidget &_playList, MediaPlayerState &_mediaPlayerState, QWidget *parent = 0, const char *name = 0 ); 57 MediaWidget( PlayListWidget &_playList, MediaPlayerState &_mediaPlayerState, QWidget *parent = 0, const char *name = 0 );
58 virtual ~MediaWidget(); 58 virtual ~MediaWidget();
59 59
60public slots: 60public slots:
61 virtual void setDisplayType( MediaPlayerState::DisplayType displayType ) = 0; 61 virtual void setDisplayType( MediaPlayerState::DisplayType displayType ) = 0;
62 virtual void setLength( long length ) = 0; 62 virtual void setLength( long length ) = 0;
diff --git a/noncore/multimedia/opieplayer2/videowidget.cpp b/noncore/multimedia/opieplayer2/videowidget.cpp
index 23acfa3..380c703 100644
--- a/noncore/multimedia/opieplayer2/videowidget.cpp
+++ b/noncore/multimedia/opieplayer2/videowidget.cpp
@@ -67,17 +67,17 @@ const char * const skinV_mask_file_names[7] = {
67 67
68VideoWidget::VideoWidget( PlayListWidget &playList, MediaPlayerState &mediaPlayerState, QWidget* parent, const char* name ) 68VideoWidget::VideoWidget( PlayListWidget &playList, MediaPlayerState &mediaPlayerState, QWidget* parent, const char* name )
69 : MediaWidget( playList, mediaPlayerState, parent, name ), scaledWidth( 0 ), scaledHeight( 0 ) 69 : MediaWidget( playList, mediaPlayerState, parent, name ), scaledWidth( 0 ), scaledHeight( 0 )
70{ 70{
71 setCaption( tr("OpiePlayer - Video") ); 71 setCaption( tr("OpiePlayer - Video") );
72 72
73 Button defaultButton; 73 Button defaultButton;
74 Button toggleButton = defaultButton; 74 Button toggleButton = defaultButton;
75 toggleButton.buttonType = ToggleButton; 75 toggleButton.type = ToggleButton;
76 76
77 buttons.reserve( 7 ); 77 buttons.reserve( 7 );
78 buttons.push_back( toggleButton ); // play 78 buttons.push_back( toggleButton ); // play
79 buttons.push_back( defaultButton ); // stop 79 buttons.push_back( defaultButton ); // stop
80 buttons.push_back( defaultButton ); // next 80 buttons.push_back( defaultButton ); // next
81 buttons.push_back( defaultButton ); // previous 81 buttons.push_back( defaultButton ); // previous
82 buttons.push_back( defaultButton ); // volUp 82 buttons.push_back( defaultButton ); // volUp
83 buttons.push_back( defaultButton ); // volDown 83 buttons.push_back( defaultButton ); // volDown
@@ -291,17 +291,17 @@ void VideoWidget::mouseMoveEvent( QMouseEvent *event ) {
291 } else if ( !isOnButton && buttons[i].isHeld ) { 291 } else if ( !isOnButton && buttons[i].isHeld ) {
292 buttons[i].isHeld = FALSE; 292 buttons[i].isHeld = FALSE;
293 toggleButton(i); 293 toggleButton(i);
294 } 294 }
295 } else { 295 } else {
296 296
297 if ( buttons[i].isHeld ) { 297 if ( buttons[i].isHeld ) {
298 buttons[i].isHeld = FALSE; 298 buttons[i].isHeld = FALSE;
299 if ( buttons[i].buttonType != ToggleButton ) { 299 if ( buttons[i].type != ToggleButton ) {
300 setToggleButton( i, FALSE ); 300 setToggleButton( i, FALSE );
301 } 301 }
302 302
303 switch(i) { 303 switch(i) {
304 304
305 case VideoPlay: { 305 case VideoPlay: {
306 if( mediaPlayerState.isPaused() ) { 306 if( mediaPlayerState.isPaused() ) {
307 setToggleButton( i, FALSE ); 307 setToggleButton( i, FALSE );