summaryrefslogtreecommitdiff
authorllornkcor <llornkcor>2002-07-29 23:45:41 (UTC)
committer llornkcor <llornkcor>2002-07-29 23:45:41 (UTC)
commit0adb56cb2cd83e9933baa9776c77c4c637f93d04 (patch) (side-by-side diff)
tree13cba758a845d0a7ec079924c8fd71fb1fa416dc
parent121002ebe4cdebd99fcba5ec833c1c7b05bb8892 (diff)
downloadopie-0adb56cb2cd83e9933baa9776c77c4c637f93d04.zip
opie-0adb56cb2cd83e9933baa9776c77c4c637f93d04.tar.gz
opie-0adb56cb2cd83e9933baa9776c77c4c637f93d04.tar.bz2
paintevent
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/audiowidget.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/noncore/multimedia/opieplayer2/audiowidget.cpp b/noncore/multimedia/opieplayer2/audiowidget.cpp
index 1fae689..689366e 100644
--- a/noncore/multimedia/opieplayer2/audiowidget.cpp
+++ b/noncore/multimedia/opieplayer2/audiowidget.cpp
@@ -368,97 +368,97 @@ void AudioWidget::mouseMoveEvent( QMouseEvent *event ) {
}
} 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 );
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 AudioNext: mediaPlayerState->setNext(); return;
case AudioPrevious: 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;
}
}
}
}
}
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 * ) {
+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++ )
paintButton( &p, i );
}
}
void AudioWidget::keyReleaseEvent( QKeyEvent *e)
{
switch ( e->key() ) {
////////////////////////////// Zaurus keys
case Key_Home:
break;
case Key_F9: //activity
hide();
// qDebug("Audio F9");
break;
case Key_F10: //contacts
break;
case Key_F11: //menu
break;
case Key_F12: //home
break;
case Key_F13: //mail
break;
case Key_Space: {
if(mediaPlayerState->playing()) {
// toggleButton(1);
mediaPlayerState->setPlaying(FALSE);
// toggleButton(1);
} else {
// toggleButton(0);
mediaPlayerState->setPlaying(TRUE);
// toggleButton(0);
}
}
break;
case Key_Down: