author | simon <simon> | 2002-12-11 00:51:29 (UTC) |
---|---|---|
committer | simon <simon> | 2002-12-11 00:51:29 (UTC) |
commit | ccef9ec4aff9822b0f2468e590d05c9484bc027e (patch) (side-by-side diff) | |
tree | f6a0b4ee201c24f2200ab79851d41fb640550962 | |
parent | 8605e11e5965521291e70f47159487ea9f1e5b49 (diff) | |
download | opie-ccef9ec4aff9822b0f2468e590d05c9484bc027e.zip opie-ccef9ec4aff9822b0f2468e590d05c9484bc027e.tar.gz opie-ccef9ec4aff9822b0f2468e590d05c9484bc027e.tar.bz2 |
- moved the shared button up/down image variables into the base class
- removed some unused variables
-rw-r--r-- | noncore/multimedia/opieplayer2/audiowidget.cpp | 14 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/audiowidget.h | 2 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/mediawidget.h | 2 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/videowidget.cpp | 14 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/videowidget.h | 6 |
5 files changed, 16 insertions, 22 deletions
diff --git a/noncore/multimedia/opieplayer2/audiowidget.cpp b/noncore/multimedia/opieplayer2/audiowidget.cpp index 0516089..0b7cc45 100644 --- a/noncore/multimedia/opieplayer2/audiowidget.cpp +++ b/noncore/multimedia/opieplayer2/audiowidget.cpp @@ -142,8 +142,8 @@ void AudioWidget::resizeEvent( QResizeEvent * ) { - upperLeftOfButtonMask.rx() = ( w - imgUp.width() ) / 2; - upperLeftOfButtonMask.ry() = (( h - imgUp.height() ) / 2) - 10; + upperLeftOfButtonMask.rx() = ( w - buttonUpImage.width() ) / 2; + upperLeftOfButtonMask.ry() = (( h - buttonUpImage.height() ) / 2) - 10; QPoint p = upperLeftOfButtonMask; - QPixmap pixUp = combineImageWithBackground( imgUp, backgroundPixmap, p ); - QPixmap pixDn = combineImageWithBackground( imgDn, backgroundPixmap, p ); + QPixmap pixUp = combineImageWithBackground( buttonUpImage, backgroundPixmap, p ); + QPixmap pixDn = combineImageWithBackground( buttonDownImage, backgroundPixmap, p ); @@ -202,6 +202,6 @@ void AudioWidget::loadSkin() 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) ) ); + buttonUpImage = QImage( Resource::loadImage( QString("%1/skin_up").arg(skinPath) ) ); + buttonDownImage = QImage( Resource::loadImage( QString("%1/skin_down").arg(skinPath) ) ); - setupButtons( skinInfo, buttonCount, QPEApplication::qpeDir() + "/pics/" + skinPath + "/skin_mask_", imgUp.size() ); + setupButtons( skinInfo, buttonCount, QPEApplication::qpeDir() + "/pics/" + skinPath + "/skin_mask_", buttonUpImage.size() ); diff --git a/noncore/multimedia/opieplayer2/audiowidget.h b/noncore/multimedia/opieplayer2/audiowidget.h index 61556c6..670fb45 100644 --- a/noncore/multimedia/opieplayer2/audiowidget.h +++ b/noncore/multimedia/opieplayer2/audiowidget.h @@ -88,4 +88,2 @@ private: QString skin; - QImage imgUp; - QImage imgDn; diff --git a/noncore/multimedia/opieplayer2/mediawidget.h b/noncore/multimedia/opieplayer2/mediawidget.h index a9dddf8..754228e 100644 --- a/noncore/multimedia/opieplayer2/mediawidget.h +++ b/noncore/multimedia/opieplayer2/mediawidget.h @@ -139,2 +139,4 @@ protected: QPixmap backgroundPixmap; + QImage buttonUpImage; + QImage buttonDownImage; }; diff --git a/noncore/multimedia/opieplayer2/videowidget.cpp b/noncore/multimedia/opieplayer2/videowidget.cpp index a03d43e..0047ac0 100644 --- a/noncore/multimedia/opieplayer2/videowidget.cpp +++ b/noncore/multimedia/opieplayer2/videowidget.cpp @@ -134,4 +134,4 @@ void VideoWidget::resizeEvent( QResizeEvent * ) { - QPixmap *pixUp = combineVImageWithBackground( imgUp, backgroundPixmap, p ); - QPixmap *pixDn = combineVImageWithBackground( imgDn, backgroundPixmap, p ); + QPixmap *pixUp = combineVImageWithBackground( buttonUpImage, backgroundPixmap, p ); + QPixmap *pixDn = combineVImageWithBackground( buttonDownImage, backgroundPixmap, p ); @@ -189,3 +189,3 @@ void VideoWidget::loadSkin() cfg.setGroup("Options"); - skin = cfg.readEntry("Skin","default"); + QString skin = cfg.readEntry("Skin","default"); @@ -193,6 +193,6 @@ void VideoWidget::loadSkin() 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) ) ); + buttonUpImage = QImage( Resource::loadImage( QString("%1/skinV_up").arg(skinPath) ) ); + buttonDownImage = QImage( Resource::loadImage( QString("%1/skinV_down").arg(skinPath) ) ); - setupButtons( skinInfo, buttonCount, QPEApplication::qpeDir() + "/pics/" + skinPath + "/skinV_mask_", imgUp.size() ); + setupButtons( skinInfo, buttonCount, QPEApplication::qpeDir() + "/pics/" + skinPath + "/skinV_mask_", buttonUpImage.size() ); @@ -204,3 +204,3 @@ void VideoWidget::loadSkin() slider->setMaxValue( 1 ); - slider->setBackgroundPixmap( Resource::loadPixmap( backgroundPix ) ); + slider->setBackgroundPixmap( backgroundPixmap ); //slider->setFocusPolicy( QWidget::NoFocus ); diff --git a/noncore/multimedia/opieplayer2/videowidget.h b/noncore/multimedia/opieplayer2/videowidget.h index 87be371..f434945 100644 --- a/noncore/multimedia/opieplayer2/videowidget.h +++ b/noncore/multimedia/opieplayer2/videowidget.h @@ -84,9 +84,3 @@ private: // Ticker songInfo; - QImage imgUp; - QImage imgDn; - QString skin; - - - QString backgroundPix; QSlider *slider; |