author | simon <simon> | 2002-12-11 17:34:19 (UTC) |
---|---|---|
committer | simon <simon> | 2002-12-11 17:34:19 (UTC) |
commit | aaac5c934e7053fa4323b03f7ea31c32c6388883 (patch) (side-by-side diff) | |
tree | ad9eb3da0efebbb862cbd8063978186c5b9d8190 | |
parent | 75f0ed4978579eb4b27cdece64c597741ed24b79 (diff) | |
download | opie-aaac5c934e7053fa4323b03f7ea31c32c6388883.zip opie-aaac5c934e7053fa4323b03f7ea31c32c6388883.tar.gz opie-aaac5c934e7053fa4323b03f7ea31c32c6388883.tar.bz2 |
- collect arguments passed to the skin loading into a structure
-rw-r--r-- | noncore/multimedia/opieplayer2/audiowidget.cpp | 11 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/audiowidget.h | 3 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/mediawidget.cpp | 6 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/mediawidget.h | 14 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/videowidget.cpp | 11 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/videowidget.h | 3 |
6 files changed, 24 insertions, 24 deletions
diff --git a/noncore/multimedia/opieplayer2/audiowidget.cpp b/noncore/multimedia/opieplayer2/audiowidget.cpp index 4db444a..cd5bea4 100644 --- a/noncore/multimedia/opieplayer2/audiowidget.cpp +++ b/noncore/multimedia/opieplayer2/audiowidget.cpp @@ -112,12 +112,7 @@ AudioWidget::~AudioWidget() { } -const MediaWidget::SkinButtonInfo *AudioWidget::skinInfo() +MediaWidget::GUIInfo AudioWidget::guiInfo() { - return ::skinInfo; -} - -const uint AudioWidget::buttonCount() -{ - return ::buttonCount; + return GUIInfo( QString::null /* infix */, ::skinInfo, ::buttonCount ); } @@ -175,5 +170,5 @@ void AudioWidget::setDisplayType( MediaPlayerState::DisplayType mediaType ) { void AudioWidget::loadSkin() { - loadDefaultSkin( ::skinInfo, ::buttonCount ); + loadDefaultSkin( guiInfo() ); setBackgroundPixmap( backgroundPixmap ); diff --git a/noncore/multimedia/opieplayer2/audiowidget.h b/noncore/multimedia/opieplayer2/audiowidget.h index 75d4857..53dbb88 100644 --- a/noncore/multimedia/opieplayer2/audiowidget.h +++ b/noncore/multimedia/opieplayer2/audiowidget.h @@ -57,6 +57,5 @@ public: void setTickerText( const QString &text ) { songInfo.setText( text ); } - static const MediaWidget::SkinButtonInfo *skinInfo(); - static const uint buttonCount(); + static MediaWidget::GUIInfo guiInfo(); public slots: diff --git a/noncore/multimedia/opieplayer2/mediawidget.cpp b/noncore/multimedia/opieplayer2/mediawidget.cpp index ab2ec50..c0106d4 100644 --- a/noncore/multimedia/opieplayer2/mediawidget.cpp +++ b/noncore/multimedia/opieplayer2/mediawidget.cpp @@ -65,8 +65,8 @@ MediaWidget::Button MediaWidget::setupButton( const SkinButtonInfo &buttonInfo, } -void MediaWidget::loadDefaultSkin( const SkinButtonInfo *skinInfo, uint buttonCount, const QString &fileNameInfix ) +void MediaWidget::loadDefaultSkin( const GUIInfo &guiInfo ) { - Skin skin( fileNameInfix ); - loadSkin( skinInfo, buttonCount, skin ); + Skin skin( guiInfo.fileNameInfix ); + loadSkin( guiInfo.buttonInfo, guiInfo.buttonCount, skin ); } diff --git a/noncore/multimedia/opieplayer2/mediawidget.h b/noncore/multimedia/opieplayer2/mediawidget.h index 4599637..64483d8 100644 --- a/noncore/multimedia/opieplayer2/mediawidget.h +++ b/noncore/multimedia/opieplayer2/mediawidget.h @@ -81,4 +81,16 @@ public: }; + struct GUIInfo + { + GUIInfo() : buttonInfo( 0 ), buttonCount( 0 ) {} + GUIInfo( const QString &_fileNameInfix, const SkinButtonInfo *_buttonInfo, const uint _buttonCount ) + : fileNameInfix( _fileNameInfix ), buttonInfo( _buttonInfo ), buttonCount( _buttonCount ) + {} + + QString fileNameInfix; + const SkinButtonInfo *buttonInfo; + const uint buttonCount; + }; + MediaWidget( PlayListWidget &_playList, MediaPlayerState &_mediaPlayerState, QWidget *parent = 0, const char *name = 0 ); virtual ~MediaWidget(); @@ -106,5 +118,5 @@ protected: Button setupButton( const SkinButtonInfo &buttonInfo, const Skin &skin ); - void loadDefaultSkin( const SkinButtonInfo *skinInfo, uint buttonCount, const QString &fileNameInfix = QString::null ); + void loadDefaultSkin( const GUIInfo &guiInfo ); void loadSkin( const SkinButtonInfo *skinInfo, uint buttonCount, const Skin &skin ); diff --git a/noncore/multimedia/opieplayer2/videowidget.cpp b/noncore/multimedia/opieplayer2/videowidget.cpp index 058730f..2a345e3 100644 --- a/noncore/multimedia/opieplayer2/videowidget.cpp +++ b/noncore/multimedia/opieplayer2/videowidget.cpp @@ -100,12 +100,7 @@ VideoWidget::~VideoWidget() } -const MediaWidget::SkinButtonInfo *VideoWidget::skinInfo() +MediaWidget::GUIInfo VideoWidget::guiInfo() { - return ::skinInfo; -} - -const uint VideoWidget::buttonCount() -{ - return ::buttonCount; + return GUIInfo( "V" /* infix */, ::skinInfo, ::buttonCount ); } @@ -168,5 +163,5 @@ void VideoWidget::setDisplayType( MediaPlayerState::DisplayType displayType ) void VideoWidget::loadSkin() { - loadDefaultSkin( ::skinInfo, ::buttonCount, "V" ); + loadDefaultSkin( guiInfo() ); setBackgroundPixmap( backgroundPixmap ); diff --git a/noncore/multimedia/opieplayer2/videowidget.h b/noncore/multimedia/opieplayer2/videowidget.h index 80e9356..84bc964 100644 --- a/noncore/multimedia/opieplayer2/videowidget.h +++ b/noncore/multimedia/opieplayer2/videowidget.h @@ -51,6 +51,5 @@ public: ~VideoWidget(); - static const MediaWidget::SkinButtonInfo *skinInfo(); - static const uint buttonCount(); + static MediaWidget::GUIInfo guiInfo(); XineVideoWidget* vidWidget(); |