author | harlekin <harlekin> | 2002-08-07 19:30:13 (UTC) |
---|---|---|
committer | harlekin <harlekin> | 2002-08-07 19:30:13 (UTC) |
commit | c80f0885bf402b6dd4ea637ad1b7d8b3ebd69300 (patch) (side-by-side diff) | |
tree | 558e8528408f0ab27d644554279f646723c6dad9 /noncore/multimedia/opieplayer2/audiowidget.cpp | |
parent | 7effde67fd121736ec658e690858c6c54bd6d125 (diff) | |
download | opie-c80f0885bf402b6dd4ea637ad1b7d8b3ebd69300.zip opie-c80f0885bf402b6dd4ea637ad1b7d8b3ebd69300.tar.gz opie-c80f0885bf402b6dd4ea637ad1b7d8b3ebd69300.tar.bz2 |
added volume handling for audio gui and other small fixes
Diffstat (limited to 'noncore/multimedia/opieplayer2/audiowidget.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/multimedia/opieplayer2/audiowidget.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/noncore/multimedia/opieplayer2/audiowidget.cpp b/noncore/multimedia/opieplayer2/audiowidget.cpp index 0e9e7ea..955169c 100644 --- a/noncore/multimedia/opieplayer2/audiowidget.cpp +++ b/noncore/multimedia/opieplayer2/audiowidget.cpp @@ -68,7 +68,7 @@ struct MediaButton { MediaButton audioButtons[] = { { TRUE, FALSE, FALSE }, // play { FALSE, FALSE, FALSE }, // stop - { TRUE, FALSE, FALSE }, // pause + { FALSE, FALSE, FALSE }, // pause { FALSE, FALSE, FALSE }, // next { FALSE, FALSE, FALSE }, // previous { FALSE, FALSE, FALSE }, // volume up @@ -342,10 +342,6 @@ void AudioWidget::paintButton( QPainter *p, int i ) { void AudioWidget::timerEvent( QTimerEvent * ) { -// static int frame = 0; -// if ( !mediaPlayerState->paused() && audioButtons[ AudioPlay ].isDown ) { -// frame = frame >= 7 ? 0 : frame + 1; -// } } @@ -371,7 +367,9 @@ void AudioWidget::mouseMoveEvent( QMouseEvent *event ) { qDebug("more clicked"); emit moreClicked(); return; - case AudioVolumeDown: emit lessClicked(); return; + case AudioVolumeDown: + emit lessClicked(); + return; } } else if ( !isOnButton && audioButtons[i].isHeld ) { audioButtons[i].isHeld = FALSE; @@ -380,12 +378,14 @@ void AudioWidget::mouseMoveEvent( QMouseEvent *event ) { } else { if ( audioButtons[i].isHeld ) { audioButtons[i].isHeld = FALSE; - if ( !audioButtons[i].isToggle ) + if ( !audioButtons[i].isToggle ) { setToggleButton( i, FALSE ); + qDebug("button toggled3 %d",i); + } switch (i) { case AudioPlay: mediaPlayerState->setPlaying(audioButtons[i].isDown); return; case AudioStop: mediaPlayerState->setPlaying(FALSE); return; - case AudioPause: mediaPlayerState->setPaused(audioButtons[i].isDown); return; + case AudioPause: mediaPlayerState->setPaused( audioButtons[i].isDown); return; case AudioNext: mediaPlayerState->setNext(); return; case AudioPrevious: mediaPlayerState->setPrev(); return; case AudioLoop: mediaPlayerState->setLooping(audioButtons[i].isDown); return; |