From 3b5f97272ded8a40da3853476371b4edc41d1a34 Mon Sep 17 00:00:00 2001 From: simon Date: Sun, 08 Dec 2002 22:26:34 +0000 Subject: - share the imgButtonMask member variable in the base class --- (limited to 'noncore/multimedia/opieplayer2/audiowidget.cpp') diff --git a/noncore/multimedia/opieplayer2/audiowidget.cpp b/noncore/multimedia/opieplayer2/audiowidget.cpp index a9d5a88..022aa82 100644 --- a/noncore/multimedia/opieplayer2/audiowidget.cpp +++ b/noncore/multimedia/opieplayer2/audiowidget.cpp @@ -105,8 +105,8 @@ AudioWidget::AudioWidget( PlayListWidget &playList, MediaPlayerState &mediaPlaye imgUp = QImage( Resource::loadImage( QString("%1/skin_up").arg(skinPath) ) ); imgDn = QImage( Resource::loadImage( QString("%1/skin_down").arg(skinPath) ) ); - imgButtonMask = QImage( imgUp.width(), imgUp.height(), 8, 255 ); - imgButtonMask.fill( 0 ); + buttonMask = QImage( imgUp.width(), imgUp.height(), 8, 255 ); + buttonMask.fill( 0 ); for ( int i = 0; i < 10; i++ ) { QString filename = QString( QPEApplication::qpeDir() + "/pics/" + skinPath + "/skin_mask_" + skin_mask_file_names[i] + ".png" ); @@ -114,7 +114,7 @@ AudioWidget::AudioWidget( PlayListWidget &playList, MediaPlayerState &mediaPlaye if ( !masks[i]->isNull() ) { QImage imgMask = masks[i]->convertToImage(); - uchar **dest = imgButtonMask.jumpTable(); + uchar **dest = buttonMask.jumpTable(); for ( int y = 0; y < imgUp.height(); y++ ) { uchar *line = dest[y]; for ( int x = 0; x < imgUp.width(); x++ ) @@ -384,9 +384,9 @@ void AudioWidget::mouseMoveEvent( QMouseEvent *event ) { 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 ); + bool isOnButton = ( x > 0 && y > 0 && x < buttonMask.width() + && y < buttonMask.height() + && buttonMask.pixelIndex( x, y ) == i + 1 ); if ( isOnButton && !buttons[i].isHeld ) { buttons[i].isHeld = TRUE; -- cgit v0.9.0.2