summaryrefslogtreecommitdiff
authorsimon <simon>2002-12-02 14:23:06 (UTC)
committer simon <simon>2002-12-02 14:23:06 (UTC)
commit6440dfbca27a1716456c081ff1b1756616afc518 (patch) (side-by-side diff)
tree54c35f1acd1e3b06ba9b6cedbabc76dbc6a4783d
parent8179c80f459eeee815aeb279f73df754ba303198 (diff)
downloadopie-6440dfbca27a1716456c081ff1b1756616afc518.zip
opie-6440dfbca27a1716456c081ff1b1756616afc518.tar.gz
opie-6440dfbca27a1716456c081ff1b1756616afc518.tar.bz2
- use currentTab() instead of whichList()
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/audiowidget.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/noncore/multimedia/opieplayer2/audiowidget.cpp b/noncore/multimedia/opieplayer2/audiowidget.cpp
index 7c2b007..5cdfbf2 100644
--- a/noncore/multimedia/opieplayer2/audiowidget.cpp
+++ b/noncore/multimedia/opieplayer2/audiowidget.cpp
@@ -394,98 +394,98 @@ void AudioWidget::mouseMoveEvent( QMouseEvent *event ) {
for ( int i = 0; i < numButtons; i++ ) {
if ( event->state() == QMouseEvent::LeftButton ) {
// The test to see if the mouse click is inside the button or not
int x = event->pos().x() - xoff;
int y = event->pos().y() - yoff;
bool isOnButton = ( x > 0 && y > 0 && x < imgButtonMask->width()
&& y < imgButtonMask->height()
&& imgButtonMask->pixelIndex( x, y ) == i + 1 );
if ( isOnButton && !audioButtons[i].isHeld ) {
audioButtons[i].isHeld = TRUE;
toggleButton(i);
switch (i) {
case AudioVolumeUp:
emit moreClicked();
return;
case AudioVolumeDown:
emit lessClicked();
return;
case AudioForward:
emit forwardClicked();
return;
case AudioBack:
emit backClicked();
return;
}
} else if ( !isOnButton && audioButtons[i].isHeld ) {
audioButtons[i].isHeld = FALSE;
toggleButton(i);
}
} else {
if ( audioButtons[i].isHeld ) {
audioButtons[i].isHeld = FALSE;
if ( !audioButtons[i].isToggle ) {
setToggleButton( i, FALSE );
}
qDebug("mouseEvent %d", i);
switch (i) {
case AudioPlay:
if( mediaPlayerState->isPaused() ) {
mediaPlayerState->setPaused( FALSE );
return;
} else if( !mediaPlayerState->isPaused() ) {
mediaPlayerState->setPaused( TRUE );
return;
}
case AudioStop: mediaPlayerState->setPlaying(FALSE); return;
- case AudioNext: if( playList->whichList() ==0 ) mediaPlayerState->setNext(); return;
- case AudioPrevious: if( playList->whichList() ==0 ) mediaPlayerState->setPrev(); return;
+ case AudioNext: if( playList->currentTab() == PlayListWidget::CurrentPlayList ) mediaPlayerState->setNext(); return;
+ case AudioPrevious: if( playList->currentTab() == PlayListWidget::CurrentPlayList ) mediaPlayerState->setPrev(); return;
case AudioLoop: mediaPlayerState->setLooping(audioButtons[i].isDown); return;
case AudioVolumeUp: emit moreReleased(); return;
case AudioVolumeDown: emit lessReleased(); return;
case AudioPlayList: mediaPlayerState->setList(); return;
case AudioForward: emit forwardReleased(); return;
case AudioBack: emit backReleased(); return;
}
}
}
}
}
void AudioWidget::mousePressEvent( QMouseEvent *event ) {
mouseMoveEvent( event );
}
void AudioWidget::mouseReleaseEvent( QMouseEvent *event ) {
mouseMoveEvent( event );
}
void AudioWidget::showEvent( QShowEvent* ) {
QMouseEvent event( QEvent::MouseMove, QPoint( 0, 0 ), 0, 0 );
mouseMoveEvent( &event );
}
void AudioWidget::closeEvent( QCloseEvent* ) {
mediaPlayerState->setList();
}
void AudioWidget::paintEvent( QPaintEvent * pe ) {
if ( !pe->erased() ) {
// Combine with background and double buffer
QPixmap pix( pe->rect().size() );
QPainter p( &pix );
p.translate( -pe->rect().topLeft().x(), -pe->rect().topLeft().y() );
p.drawTiledPixmap( pe->rect(), *pixBg, pe->rect().topLeft() );
for ( int i = 0; i < numButtons; i++ )
paintButton( &p, i );
QPainter p2( this );
p2.drawPixmap( pe->rect().topLeft(), pix );
} else {
QPainter p( this );
for ( int i = 0; i < numButtons; i++ )