summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/audiowidget.cpp11
-rw-r--r--noncore/multimedia/opieplayer2/audiowidget.h3
-rw-r--r--noncore/multimedia/opieplayer2/mediawidget.cpp6
-rw-r--r--noncore/multimedia/opieplayer2/mediawidget.h14
-rw-r--r--noncore/multimedia/opieplayer2/videowidget.cpp11
-rw-r--r--noncore/multimedia/opieplayer2/videowidget.h3
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
@@ -108,20 +108,15 @@ AudioWidget::AudioWidget( PlayListWidget &playList, MediaPlayerState &mediaPlaye
AudioWidget::~AudioWidget() {
// mediaPlayerState->setPlaying(false);
}
-const MediaWidget::SkinButtonInfo *AudioWidget::skinInfo()
+MediaWidget::GUIInfo AudioWidget::guiInfo()
{
- return ::skinInfo;
-}
-
-const uint AudioWidget::buttonCount()
-{
- return ::buttonCount;
+ return GUIInfo( QString::null /* infix */, ::skinInfo, ::buttonCount );
}
void AudioWidget::resizeEvent( QResizeEvent *e ) {
int h = height();
int w = width();
@@ -171,13 +166,13 @@ void AudioWidget::setDisplayType( MediaPlayerState::DisplayType mediaType ) {
killTimers();
hide();
}
void AudioWidget::loadSkin()
{
- loadDefaultSkin( ::skinInfo, ::buttonCount );
+ loadDefaultSkin( guiInfo() );
setBackgroundPixmap( backgroundPixmap );
songInfo.setFocusPolicy( QWidget::NoFocus );
// changeTextColor( &songInfo );
// songInfo.setBackgroundColor( QColor( 167, 212, 167 ));
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
@@ -53,14 +53,13 @@ class AudioWidget : public MediaWidget {
Q_OBJECT
public:
AudioWidget( PlayListWidget &playList, MediaPlayerState &mediaPlayerState, QWidget* parent=0, const char* name=0 );
~AudioWidget();
void setTickerText( const QString &text ) { songInfo.setText( text ); }
- static const MediaWidget::SkinButtonInfo *skinInfo();
- static const uint buttonCount();
+ static MediaWidget::GUIInfo guiInfo();
public slots:
void updateSlider( long, long );
void sliderPressed( );
void sliderReleased( );
void setLooping( bool b) { setToggleButton( Loop, b ); }
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
@@ -61,16 +61,16 @@ MediaWidget::Button MediaWidget::setupButton( const SkinButtonInfo &buttonInfo,
button.type = buttonInfo.type;
button.mask = skin.buttonMaskImage( buttonInfo.fileName );
return button;
}
-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 );
}
void MediaWidget::loadSkin( const SkinButtonInfo *skinInfo, uint buttonCount, const Skin &skin )
{
backgroundPixmap = skin.backgroundImage();
buttonUpImage = skin.buttonUpImage();
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
@@ -77,12 +77,24 @@ public:
{
Command command;
const char *fileName;
ButtonType type;
};
+ 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();
public slots:
virtual void setDisplayType( MediaPlayerState::DisplayType displayType ) = 0;
virtual void setLength( long length ) = 0;
@@ -102,13 +114,13 @@ signals:
protected:
void setupButtons( const SkinButtonInfo *skinInfo, uint buttonCount,
const Skin &skin );
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 );
virtual void closeEvent( QCloseEvent * );
virtual void paintEvent( QPaintEvent *pe );
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
@@ -96,20 +96,15 @@ VideoWidget::VideoWidget( PlayListWidget &playList, MediaPlayerState &mediaPlaye
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 );
}
void VideoWidget::resizeEvent( QResizeEvent *e ) {
int h = height();
int w = width();
//int Vh = 160;
@@ -164,13 +159,13 @@ void VideoWidget::setDisplayType( MediaPlayerState::DisplayType displayType )
scaledHeight = 0;
hide();
}
void VideoWidget::loadSkin()
{
- loadDefaultSkin( ::skinInfo, ::buttonCount, "V" );
+ loadDefaultSkin( guiInfo() );
setBackgroundPixmap( backgroundPixmap );
delete slider;
slider = new QSlider( Qt::Horizontal, this );
slider->setMinValue( 0 );
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
@@ -47,14 +47,13 @@ class QSlider;
class VideoWidget : public MediaWidget {
Q_OBJECT
public:
VideoWidget( PlayListWidget &playList, MediaPlayerState &mediaPlayerState, QWidget* parent=0, const char* name=0 );
~VideoWidget();
- static const MediaWidget::SkinButtonInfo *skinInfo();
- static const uint buttonCount();
+ static MediaWidget::GUIInfo guiInfo();
XineVideoWidget* vidWidget();
public slots:
void updateSlider( long, long );
void sliderPressed( );
void sliderReleased( );