summaryrefslogtreecommitdiff
path: root/noncore
authorsimon <simon>2002-12-09 15:15:23 (UTC)
committer simon <simon>2002-12-09 15:15:23 (UTC)
commit3f37a852175ace7ee69b626f48eaea19d736b6ed (patch) (side-by-side diff)
tree5b35af63926143660dc634d27b9b230cc13aca7c /noncore
parent80902b6ade54252e05cf948040a11b2e975f6759 (diff)
downloadopie-3f37a852175ace7ee69b626f48eaea19d736b6ed.zip
opie-3f37a852175ace7ee69b626f48eaea19d736b6ed.tar.gz
opie-3f37a852175ace7ee69b626f48eaea19d736b6ed.tar.bz2
- pixBg is now backgroundPixmap and shared in the base class
Diffstat (limited to 'noncore') (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.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
@@ -95,7 +95,7 @@ AudioWidget::AudioWidget( PlayListWidget &playList, MediaPlayerState &mediaPlaye
// 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) ) );
@@ -123,7 +123,7 @@ AudioWidget::AudioWidget( PlayListWidget &playList, MediaPlayerState &mediaPlaye
buttons.insert( i, button );
}
- setBackgroundPixmap( pixBg );
+ setBackgroundPixmap( backgroundPixmap );
songInfo.setFocusPolicy( QWidget::NoFocus );
// changeTextColor( &songInfo );
@@ -136,7 +136,7 @@ AudioWidget::AudioWidget( PlayListWidget &playList, MediaPlayerState &mediaPlaye
slider.setMinValue( 0 );
slider.setMaxValue( 1 );
slider.setFocusPolicy( QWidget::NoFocus );
- slider.setBackgroundPixmap( pixBg );
+ slider.setBackgroundPixmap( backgroundPixmap );
// Config cofg("qpe");
// cofg.setGroup("Appearance");
@@ -205,8 +205,8 @@ void AudioWidget::resizeEvent( QResizeEvent * ) {
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() ) {
@@ -404,7 +404,7 @@ void AudioWidget::paintEvent( QPaintEvent * pe ) {
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 );
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
@@ -94,7 +94,6 @@ private:
void setToggleButton( int, bool );
int skipDirection;
QString skin;
- QPixmap pixBg;
QImage imgUp;
QImage imgDn;
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
@@ -98,6 +98,8 @@ protected:
QImage buttonMask;
QPoint upperLeftOfButtonMask;
+
+ QPixmap backgroundPixmap;
};
#endif // MEDIAWIDGET_H
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
@@ -92,7 +92,7 @@ VideoWidget::VideoWidget( PlayListWidget &playList, MediaPlayerState &mediaPlaye
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) ) );
@@ -118,7 +118,7 @@ VideoWidget::VideoWidget( PlayListWidget &playList, MediaPlayerState &mediaPlaye
}
}
- setBackgroundPixmap( pixBg );
+ setBackgroundPixmap( backgroundPixmap );
slider = new QSlider( Qt::Horizontal, this );
slider->setMinValue( 0 );
@@ -163,7 +163,7 @@ void VideoWidget::resizeEvent( QResizeEvent * ) {
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)
@@ -172,8 +172,8 @@ void VideoWidget::resizeEvent( QResizeEvent * ) {
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 ];
@@ -345,7 +345,7 @@ void VideoWidget::makeVisible() {
} else {
showNormal();
showMaximized();
- setBackgroundPixmap( pixBg );
+ setBackgroundPixmap( backgroundPixmap );
QWidget *d = QApplication::desktop();
int w = d->width();
int h = d->height();
@@ -390,7 +390,7 @@ void VideoWidget::paintEvent( QPaintEvent * pe) {
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 ] );
}
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
@@ -97,7 +97,6 @@ protected:
private:
// Ticker songInfo;
- QPixmap pixBg;
QImage imgUp;
QImage imgDn;
QString skin;