author | simon <simon> | 2002-12-09 13:52:00 (UTC) |
---|---|---|
committer | simon <simon> | 2002-12-09 13:52:00 (UTC) |
commit | 46bca195f0dacc3b596eb1537ae47bc2117ce8e4 (patch) (unidiff) | |
tree | 135414127395da9466d77ef71fa85bd41b130bf0 /noncore/multimedia/opieplayer2/audiowidget.cpp | |
parent | 374d7ba11f669449900c7e93f7929d724eb85f26 (diff) | |
download | opie-46bca195f0dacc3b596eb1537ae47bc2117ce8e4.zip opie-46bca195f0dacc3b596eb1537ae47bc2117ce8e4.tar.gz opie-46bca195f0dacc3b596eb1537ae47bc2117ce8e4.tar.bz2 |
- isToggle is now an enum ButtonType { NormalButton, ToggleButton };
Diffstat (limited to 'noncore/multimedia/opieplayer2/audiowidget.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/multimedia/opieplayer2/audiowidget.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/noncore/multimedia/opieplayer2/audiowidget.cpp b/noncore/multimedia/opieplayer2/audiowidget.cpp index 8659971..56b75f2 100644 --- a/noncore/multimedia/opieplayer2/audiowidget.cpp +++ b/noncore/multimedia/opieplayer2/audiowidget.cpp | |||
@@ -75,12 +75,10 @@ AudioWidget::AudioWidget( PlayListWidget &playList, MediaPlayerState &mediaPlaye | |||
75 | MediaWidget( playList, mediaPlayerState, parent, name ), songInfo( this ), slider( Qt::Horizontal, this ), time( this ), | 75 | MediaWidget( playList, mediaPlayerState, parent, name ), songInfo( this ), slider( Qt::Horizontal, this ), time( this ), |
76 | audioSliderBeingMoved( false ) | 76 | audioSliderBeingMoved( false ) |
77 | { | 77 | { |
78 | Button defaultButton; | ||
78 | 79 | ||
79 | Button defaultButton; | 80 | Button toggleButton = defaultButton; |
80 | defaultButton.isToggle = defaultButton.isHeld = defaultButton.isDown = false; | 81 | toggleButton.buttonType = ToggleButton; |
81 | Button toggleButton; | ||
82 | toggleButton.isToggle = true; | ||
83 | toggleButton.isHeld = toggleButton.isDown = false; | ||
84 | 82 | ||
85 | buttons.reserve( 10 ); | 83 | buttons.reserve( 10 ); |
86 | buttons.push_back( toggleButton ); // play | 84 | buttons.push_back( toggleButton ); // play |
@@ -389,7 +387,7 @@ void AudioWidget::mouseMoveEvent( QMouseEvent *event ) { | |||
389 | } else { | 387 | } else { |
390 | if ( buttons[i].isHeld ) { | 388 | if ( buttons[i].isHeld ) { |
391 | buttons[i].isHeld = FALSE; | 389 | buttons[i].isHeld = FALSE; |
392 | if ( !buttons[i].isToggle ) { | 390 | if ( buttons[i].buttonType != ToggleButton ) { |
393 | setToggleButton( i, FALSE ); | 391 | setToggleButton( i, FALSE ); |
394 | } | 392 | } |
395 | qDebug("mouseEvent %d", i); | 393 | qDebug("mouseEvent %d", i); |