summaryrefslogtreecommitdiff
path: root/noncore/multimedia
Side-by-side diff
Diffstat (limited to 'noncore/multimedia') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/audiowidget.cpp12
-rw-r--r--noncore/multimedia/opieplayer2/audiowidget.h1
-rw-r--r--noncore/multimedia/opieplayer2/mediawidget.h2
-rw-r--r--noncore/multimedia/opieplayer2/videowidget.cpp12
-rw-r--r--noncore/multimedia/opieplayer2/videowidget.h1
5 files changed, 14 insertions, 14 deletions
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
@@ -102,22 +102,22 @@ AudioWidget::AudioWidget( PlayListWidget &playList, MediaPlayerState &mediaPlaye
QString skinPath = "opieplayer2/skins/" + skin;
pixBg = QPixmap( Resource::loadPixmap( QString("%1/background").arg(skinPath) ) );
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" );
masks[i] = new QBitmap( filename );
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++ )
if ( !qRed( imgMask.pixel( x, y ) ) )
line[x] = i + 1;
}
@@ -381,15 +381,15 @@ void AudioWidget::mouseMoveEvent( QMouseEvent *event ) {
for ( unsigned int i = 0; i < buttons.size(); 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 );
+ 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;
toggleButton(i);
switch (i) {
case VolumeUp:
diff --git a/noncore/multimedia/opieplayer2/audiowidget.h b/noncore/multimedia/opieplayer2/audiowidget.h
index 52a358c..da22946 100644
--- a/noncore/multimedia/opieplayer2/audiowidget.h
+++ b/noncore/multimedia/opieplayer2/audiowidget.h
@@ -96,13 +96,12 @@ private:
void paintButton( QPainter *p, int i );
int skipDirection;
QString skin;
QPixmap pixBg;
QImage imgUp;
QImage imgDn;
- QImage imgButtonMask;
QBitmap *masks[10];
QPixmap *buttonPixUp[10];
QPixmap *buttonPixDown[10];
QPixmap *pixmaps[4];
OTicker songInfo;
diff --git a/noncore/multimedia/opieplayer2/mediawidget.h b/noncore/multimedia/opieplayer2/mediawidget.h
index b88d7e2..044ab6c 100644
--- a/noncore/multimedia/opieplayer2/mediawidget.h
+++ b/noncore/multimedia/opieplayer2/mediawidget.h
@@ -66,11 +66,13 @@ protected:
void handleCommand( Command command, bool buttonDown );
MediaPlayerState &mediaPlayerState;
PlayListWidget &playList;
ButtonVector buttons;
+
+ QImage buttonMask;
};
#endif // MEDIAWIDGET_H
/* vim: et sw=4 ts=4
*/
diff --git a/noncore/multimedia/opieplayer2/videowidget.cpp b/noncore/multimedia/opieplayer2/videowidget.cpp
index 7838229..459f592 100644
--- a/noncore/multimedia/opieplayer2/videowidget.cpp
+++ b/noncore/multimedia/opieplayer2/videowidget.cpp
@@ -96,22 +96,22 @@ VideoWidget::VideoWidget( PlayListWidget &playList, MediaPlayerState &mediaPlaye
QString skinPath = "opieplayer2/skins/" + skin;
pixBg = QPixmap( Resource::loadPixmap( QString("%1/background").arg(skinPath) ) );
imgUp = QImage( Resource::loadImage( QString("%1/skinV_up").arg(skinPath) ) );
imgDn = QImage( Resource::loadImage( QString("%1/skinV_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 < 7; i++ ) {
QString filename = QString( QPEApplication::qpeDir() + "/pics/" + skinPath + "/skinV_mask_" + skinV_mask_file_names[i] + ".png" );
masks[i] = new QBitmap( filename );
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++ ) {
if ( !qRed( imgMask.pixel( x, y ) ) )
line[x] = i + 1;
}
@@ -282,15 +282,15 @@ void VideoWidget::mouseMoveEvent( QMouseEvent *event ) {
for ( unsigned int i = 0; i < buttons.size(); 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 );
+ 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;
toggleButton(i);
switch (i) {
diff --git a/noncore/multimedia/opieplayer2/videowidget.h b/noncore/multimedia/opieplayer2/videowidget.h
index f996803..a5500d7 100644
--- a/noncore/multimedia/opieplayer2/videowidget.h
+++ b/noncore/multimedia/opieplayer2/videowidget.h
@@ -97,13 +97,12 @@ protected:
private:
// Ticker songInfo;
QPixmap pixBg;
QImage imgUp;
QImage imgDn;
- QImage imgButtonMask;
QBitmap *masks[7];
QPixmap *buttonPixUp[7];
QPixmap *buttonPixDown[7];
QString skin;
// QPixmap *pixmaps[4];
int xoff, yoff;