summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (show 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.cpp14
-rw-r--r--noncore/multimedia/opieplayer2/videowidget.h1
5 files changed, 15 insertions, 15 deletions
diff --git a/noncore/multimedia/opieplayer2/audiowidget.cpp b/noncore/multimedia/opieplayer2/audiowidget.cpp
index 5cc2814..553c56b 100644
--- a/noncore/multimedia/opieplayer2/audiowidget.cpp
+++ b/noncore/multimedia/opieplayer2/audiowidget.cpp
@@ -92,13 +92,13 @@ AudioWidget::AudioWidget( PlayListWidget &playList, MediaPlayerState &mediaPlaye
cfg.setGroup("Options");
skin = cfg.readEntry("Skin","default");
//skin = "scaleTest";
// color of background, frame, degree of transparency
QString skinPath = "opieplayer2/skins/" + skin;
- pixBg = QPixmap( Resource::loadPixmap( QString("%1/background").arg(skinPath) ) );
+ backgroundPixmap = 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) ) );
buttonMask = QImage( imgUp.width(), imgUp.height(), 8, 255 );
buttonMask.fill( 0 );
@@ -120,26 +120,26 @@ AudioWidget::AudioWidget( PlayListWidget &playList, MediaPlayerState &mediaPlaye
}
}
buttons.insert( i, button );
}
- setBackgroundPixmap( pixBg );
+ setBackgroundPixmap( backgroundPixmap );
songInfo.setFocusPolicy( QWidget::NoFocus );
// changeTextColor( &songInfo );
// songInfo.setBackgroundColor( QColor( 167, 212, 167 ));
// songInfo.setFrameStyle( QFrame::NoFrame);
songInfo.setFrameStyle( QFrame::WinPanel | QFrame::Sunken );
// songInfo.setForegroundColor(Qt::white);
slider.setFixedHeight( 20 );
slider.setMinValue( 0 );
slider.setMaxValue( 1 );
slider.setFocusPolicy( QWidget::NoFocus );
- slider.setBackgroundPixmap( pixBg );
+ slider.setBackgroundPixmap( backgroundPixmap );
// Config cofg("qpe");
// cofg.setGroup("Appearance");
// QColor backgroundcolor = QColor( cofg.readEntry( "Background", "#E5E1D5" ) );
time.setFocusPolicy( QWidget::NoFocus );
@@ -202,14 +202,14 @@ void AudioWidget::resizeEvent( QResizeEvent * ) {
time.setGeometry( QRect( w - 85, h - 30, 70, 20 ) );
upperLeftOfButtonMask.rx() = ( w - imgUp.width() ) / 2;
upperLeftOfButtonMask.ry() = (( h - imgUp.height() ) / 2) - 10;
QPoint p = upperLeftOfButtonMask;
- QPixmap pixUp = combineImageWithBackground( imgUp, pixBg, p );
- QPixmap pixDn = combineImageWithBackground( imgDn, pixBg, p );
+ QPixmap pixUp = combineImageWithBackground( imgUp, backgroundPixmap, p );
+ QPixmap pixDn = combineImageWithBackground( imgDn, backgroundPixmap, p );
for ( uint i = 0; i < buttons.count(); i++ ) {
if ( !buttons[i].mask.isNull() ) {
buttons[i].pixUp = maskPixToMask( pixUp, buttons[i].mask );
buttons[i].pixDown = maskPixToMask( pixDn, buttons[i].mask );
}
@@ -401,13 +401,13 @@ void AudioWidget::showEvent( QShowEvent* ) {
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() );
+ p.drawTiledPixmap( pe->rect(), backgroundPixmap, pe->rect().topLeft() );
for ( unsigned int i = 0; i < buttons.count(); i++ )
paintButton( p, buttons[ i ] );
QPainter p2( this );
p2.drawPixmap( pe->rect().topLeft(), pix );
} else {
QPainter p( this );
diff --git a/noncore/multimedia/opieplayer2/audiowidget.h b/noncore/multimedia/opieplayer2/audiowidget.h
index 7a775cd..69837cd 100644
--- a/noncore/multimedia/opieplayer2/audiowidget.h
+++ b/noncore/multimedia/opieplayer2/audiowidget.h
@@ -91,13 +91,12 @@ private slots:
void skipBack();
void stopSkip();
private:
void setToggleButton( int, bool );
int skipDirection;
QString skin;
- QPixmap pixBg;
QImage imgUp;
QImage imgDn;
OTicker songInfo;
QSlider slider;
QLineEdit time;
diff --git a/noncore/multimedia/opieplayer2/mediawidget.h b/noncore/multimedia/opieplayer2/mediawidget.h
index 163f449..211e56c 100644
--- a/noncore/multimedia/opieplayer2/mediawidget.h
+++ b/noncore/multimedia/opieplayer2/mediawidget.h
@@ -95,11 +95,13 @@ protected:
ButtonMap buttons;
QImage buttonMask;
QPoint upperLeftOfButtonMask;
+
+ QPixmap backgroundPixmap;
};
#endif // MEDIAWIDGET_H
/* vim: et sw=4 ts=4
*/
diff --git a/noncore/multimedia/opieplayer2/videowidget.cpp b/noncore/multimedia/opieplayer2/videowidget.cpp
index a483434..a8bf252 100644
--- a/noncore/multimedia/opieplayer2/videowidget.cpp
+++ b/noncore/multimedia/opieplayer2/videowidget.cpp
@@ -89,13 +89,13 @@ VideoWidget::VideoWidget( PlayListWidget &playList, MediaPlayerState &mediaPlaye
Config cfg("OpiePlayer");
cfg.setGroup("Options");
skin = cfg.readEntry("Skin","default");
QString skinPath = "opieplayer2/skins/" + skin;
- pixBg = QPixmap( Resource::loadPixmap( QString("%1/background").arg(skinPath) ) );
+ backgroundPixmap = 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) ) );
buttonMask = QImage( imgUp.width(), imgUp.height(), 8, 255 );
buttonMask.fill( 0 );
@@ -115,13 +115,13 @@ VideoWidget::VideoWidget( PlayListWidget &playList, MediaPlayerState &mediaPlaye
line[x] = i + 1;
}
}
}
}
- setBackgroundPixmap( pixBg );
+ setBackgroundPixmap( backgroundPixmap );
slider = new QSlider( Qt::Horizontal, this );
slider->setMinValue( 0 );
slider->setMaxValue( 1 );
slider->setBackgroundPixmap( Resource::loadPixmap( backgroundPix ) );
//slider->setFocusPolicy( QWidget::NoFocus );
@@ -160,23 +160,23 @@ void VideoWidget::resizeEvent( QResizeEvent * ) {
//int Vw = 220;
slider->setFixedWidth( w - 20 );
slider->setGeometry( QRect( 15, h - 22, w - 90, 20 ) );
slider->setBackgroundOrigin( QWidget::ParentOrigin );
slider->setFocusPolicy( QWidget::NoFocus );
- slider->setBackgroundPixmap( pixBg );
+ slider->setBackgroundPixmap( backgroundPixmap );
upperLeftOfButtonMask.rx() = 0;// ( imgUp->width() ) / 2;
if(w>h)
upperLeftOfButtonMask.ry() = 0;
else
upperLeftOfButtonMask.ry() = 185;//(( Vh - imgUp->height() ) / 2) - 10;
QPoint p = upperLeftOfButtonMask;
- QPixmap *pixUp = combineVImageWithBackground( imgUp, pixBg, p );
- QPixmap *pixDn = combineVImageWithBackground( imgDn, pixBg, p );
+ QPixmap *pixUp = combineVImageWithBackground( imgUp, backgroundPixmap, p );
+ QPixmap *pixDn = combineVImageWithBackground( imgDn, backgroundPixmap, p );
for ( int i = 0; i < 7; i++ ) {
Button &button = buttons[ i ];
if ( !button.mask.isNull() ) {
button.pixUp = maskVPixToMask( *pixUp, button.mask );
@@ -342,13 +342,13 @@ void VideoWidget::makeVisible() {
disconnect( slider, SIGNAL( sliderPressed() ), this, SLOT( sliderPressed() ) );
disconnect( slider, SIGNAL( sliderReleased() ), this, SLOT( sliderReleased() ) );
} else {
showNormal();
showMaximized();
- setBackgroundPixmap( pixBg );
+ setBackgroundPixmap( backgroundPixmap );
QWidget *d = QApplication::desktop();
int w = d->width();
int h = d->height();
if(w>h) {
int newW=(w/2)-(246/2); //this will only work with 320x240
@@ -387,13 +387,13 @@ void VideoWidget::paintEvent( QPaintEvent * pe) {
} else {
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() );
+ p.drawTiledPixmap( pe->rect(), backgroundPixmap, pe->rect().topLeft() );
for ( unsigned int i = 0; i < buttons.count(); i++ ) {
paintButton( p, buttons[ i ] );
}
QPainter p2( this );
p2.drawPixmap( pe->rect().topLeft(), pix );
} else {
diff --git a/noncore/multimedia/opieplayer2/videowidget.h b/noncore/multimedia/opieplayer2/videowidget.h
index a271120..9d5239b 100644
--- a/noncore/multimedia/opieplayer2/videowidget.h
+++ b/noncore/multimedia/opieplayer2/videowidget.h
@@ -94,13 +94,12 @@ protected:
void mousePressEvent( QMouseEvent *event );
void mouseReleaseEvent( QMouseEvent *event );
void keyReleaseEvent( QKeyEvent *e);
private:
// Ticker songInfo;
- QPixmap pixBg;
QImage imgUp;
QImage imgDn;
QString skin;
void setToggleButton( int, bool );