summaryrefslogtreecommitdiff
authorsimon <simon>2002-12-11 12:53:29 (UTC)
committer simon <simon>2002-12-11 12:53:29 (UTC)
commit9b8e5d7c225ac2dd399e392d57e3d19348412e1a (patch) (side-by-side diff)
tree463674357359136235c75703edafe109e6515d16
parentdd6a6d5345e191ffa6da3e015c4e024bd8ca67b7 (diff)
downloadopie-9b8e5d7c225ac2dd399e392d57e3d19348412e1a.zip
opie-9b8e5d7c225ac2dd399e392d57e3d19348412e1a.tar.gz
opie-9b8e5d7c225ac2dd399e392d57e3d19348412e1a.tar.bz2
- slight simplification in the API
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/mediawidget.cpp6
-rw-r--r--noncore/multimedia/opieplayer2/mediawidget.h2
-rw-r--r--noncore/multimedia/opieplayer2/skin.cpp11
-rw-r--r--noncore/multimedia/opieplayer2/skin.h4
4 files changed, 11 insertions, 12 deletions
diff --git a/noncore/multimedia/opieplayer2/mediawidget.cpp b/noncore/multimedia/opieplayer2/mediawidget.cpp
index da0706e..6b304ec 100644
--- a/noncore/multimedia/opieplayer2/mediawidget.cpp
+++ b/noncore/multimedia/opieplayer2/mediawidget.cpp
@@ -46,5 +46,5 @@ MediaWidget::~MediaWidget()
void MediaWidget::setupButtons( const SkinButtonInfo *skinInfo, uint buttonCount,
- const Skin &skin, const QSize &buttonAreaSize )
+ const Skin &skin )
{
- buttonMask = skin.buttonMask( skinInfo, buttonCount, buttonAreaSize );
+ buttonMask = skin.buttonMask( skinInfo, buttonCount );
@@ -87,3 +87,3 @@ void MediaWidget::loadSkin( const SkinButtonInfo *skinInfo, uint buttonCount, co
- setupButtons( skinInfo, buttonCount, skin, buttonUpImage.size() );
+ setupButtons( skinInfo, buttonCount, skin );
}
diff --git a/noncore/multimedia/opieplayer2/mediawidget.h b/noncore/multimedia/opieplayer2/mediawidget.h
index 4bd8760..0fe4772 100644
--- a/noncore/multimedia/opieplayer2/mediawidget.h
+++ b/noncore/multimedia/opieplayer2/mediawidget.h
@@ -104,3 +104,3 @@ protected:
void setupButtons( const SkinButtonInfo *skinInfo, uint buttonCount,
- const Skin &skin, const QSize &buttonAreaSize );
+ const Skin &skin );
Button setupButton( const SkinButtonInfo &buttonInfo, const Skin &skin );
diff --git a/noncore/multimedia/opieplayer2/skin.cpp b/noncore/multimedia/opieplayer2/skin.cpp
index ef70957..d3918d1 100644
--- a/noncore/multimedia/opieplayer2/skin.cpp
+++ b/noncore/multimedia/opieplayer2/skin.cpp
@@ -11,3 +11,3 @@ Skin::Skin( const QString &name, const QString &fileNameInfix )
-void Skin::preload( const MediaWidget::SkinButtonInfo *skinButtonInfo, uint buttonCount, const QSize &buttonAreaSize )
+void Skin::preload( const MediaWidget::SkinButtonInfo *skinButtonInfo, uint buttonCount )
{
@@ -16,3 +16,3 @@ void Skin::preload( const MediaWidget::SkinButtonInfo *skinButtonInfo, uint butt
buttonDownImage();
- ( void )buttonMask( skinButtonInfo, buttonCount, buttonAreaSize );
+ ( void )buttonMask( skinButtonInfo, buttonCount );
}
@@ -40,7 +40,4 @@ QImage Skin::buttonDownImage() const
-QImage Skin::buttonMask( const MediaWidget::SkinButtonInfo *skinButtonInfo, uint buttonCount, const QSize &buttonAreaSize ) const
+QImage Skin::buttonMask( const MediaWidget::SkinButtonInfo *skinButtonInfo, uint buttonCount ) const
{
- if ( buttonAreaSize != m_buttonMask.size() )
- m_buttonMask = QImage();
-
if ( !m_buttonMask.isNull() )
@@ -48,2 +45,4 @@ QImage Skin::buttonMask( const MediaWidget::SkinButtonInfo *skinButtonInfo, uint
+ QSize buttonAreaSize = buttonUpImage().size();
+
m_buttonMask = QImage( buttonAreaSize, 8, 255 );
diff --git a/noncore/multimedia/opieplayer2/skin.h b/noncore/multimedia/opieplayer2/skin.h
index 14873e7..ee19f4b 100644
--- a/noncore/multimedia/opieplayer2/skin.h
+++ b/noncore/multimedia/opieplayer2/skin.h
@@ -14,3 +14,3 @@ public:
- void preload( const MediaWidget::SkinButtonInfo *skinButtonInfo, uint buttonCount, const QSize &buttonAreaSize );
+ void preload( const MediaWidget::SkinButtonInfo *skinButtonInfo, uint buttonCount );
@@ -20,3 +20,3 @@ public:
- QImage buttonMask( const MediaWidget::SkinButtonInfo *skinButtonInfo, uint buttonCount, const QSize &buttonAreaSize ) const;
+ QImage buttonMask( const MediaWidget::SkinButtonInfo *skinButtonInfo, uint buttonCount ) const;