summaryrefslogtreecommitdiff
Unidiff
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
@@ -111,14 +111,9 @@ AudioWidget::~AudioWidget() {
111// mediaPlayerState->setPlaying(false); 111// mediaPlayerState->setPlaying(false);
112} 112}
113 113
114const MediaWidget::SkinButtonInfo *AudioWidget::skinInfo() 114MediaWidget::GUIInfo AudioWidget::guiInfo()
115{ 115{
116 return ::skinInfo; 116 return GUIInfo( QString::null /* infix */, ::skinInfo, ::buttonCount );
117}
118
119const uint AudioWidget::buttonCount()
120{
121 return ::buttonCount;
122} 117}
123 118
124void AudioWidget::resizeEvent( QResizeEvent *e ) { 119void AudioWidget::resizeEvent( QResizeEvent *e ) {
@@ -174,7 +169,7 @@ void AudioWidget::setDisplayType( MediaPlayerState::DisplayType mediaType ) {
174 169
175void AudioWidget::loadSkin() 170void AudioWidget::loadSkin()
176{ 171{
177 loadDefaultSkin( ::skinInfo, ::buttonCount ); 172 loadDefaultSkin( guiInfo() );
178 173
179 setBackgroundPixmap( backgroundPixmap ); 174 setBackgroundPixmap( backgroundPixmap );
180 175
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
@@ -56,8 +56,7 @@ public:
56 ~AudioWidget(); 56 ~AudioWidget();
57 void setTickerText( const QString &text ) { songInfo.setText( text ); } 57 void setTickerText( const QString &text ) { songInfo.setText( text ); }
58 58
59 static const MediaWidget::SkinButtonInfo *skinInfo(); 59 static MediaWidget::GUIInfo guiInfo();
60 static const uint buttonCount();
61 60
62public slots: 61public slots:
63 void updateSlider( long, long ); 62 void updateSlider( long, long );
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
@@ -64,10 +64,10 @@ MediaWidget::Button MediaWidget::setupButton( const SkinButtonInfo &buttonInfo,
64 return button; 64 return button;
65} 65}
66 66
67void MediaWidget::loadDefaultSkin( const SkinButtonInfo *skinInfo, uint buttonCount, const QString &fileNameInfix ) 67void MediaWidget::loadDefaultSkin( const GUIInfo &guiInfo )
68{ 68{
69 Skin skin( fileNameInfix ); 69 Skin skin( guiInfo.fileNameInfix );
70 loadSkin( skinInfo, buttonCount, skin ); 70 loadSkin( guiInfo.buttonInfo, guiInfo.buttonCount, skin );
71} 71}
72 72
73void MediaWidget::loadSkin( const SkinButtonInfo *skinInfo, uint buttonCount, const Skin &skin ) 73void MediaWidget::loadSkin( const SkinButtonInfo *skinInfo, uint buttonCount, const Skin &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
@@ -80,6 +80,18 @@ public:
80 ButtonType type; 80 ButtonType type;
81 }; 81 };
82 82
83 struct GUIInfo
84 {
85 GUIInfo() : buttonInfo( 0 ), buttonCount( 0 ) {}
86 GUIInfo( const QString &_fileNameInfix, const SkinButtonInfo *_buttonInfo, const uint _buttonCount )
87 : fileNameInfix( _fileNameInfix ), buttonInfo( _buttonInfo ), buttonCount( _buttonCount )
88 {}
89
90 QString fileNameInfix;
91 const SkinButtonInfo *buttonInfo;
92 const uint buttonCount;
93 };
94
83 MediaWidget( PlayListWidget &_playList, MediaPlayerState &_mediaPlayerState, QWidget *parent = 0, const char *name = 0 ); 95 MediaWidget( PlayListWidget &_playList, MediaPlayerState &_mediaPlayerState, QWidget *parent = 0, const char *name = 0 );
84 virtual ~MediaWidget(); 96 virtual ~MediaWidget();
85 97
@@ -105,7 +117,7 @@ protected:
105 const Skin &skin ); 117 const Skin &skin );
106 Button setupButton( const SkinButtonInfo &buttonInfo, const Skin &skin ); 118 Button setupButton( const SkinButtonInfo &buttonInfo, const Skin &skin );
107 119
108 void loadDefaultSkin( const SkinButtonInfo *skinInfo, uint buttonCount, const QString &fileNameInfix = QString::null ); 120 void loadDefaultSkin( const GUIInfo &guiInfo );
109 void loadSkin( const SkinButtonInfo *skinInfo, uint buttonCount, const Skin &skin ); 121 void loadSkin( const SkinButtonInfo *skinInfo, uint buttonCount, const Skin &skin );
110 122
111 virtual void closeEvent( QCloseEvent * ); 123 virtual void closeEvent( QCloseEvent * );
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
@@ -99,14 +99,9 @@ VideoWidget::~VideoWidget()
99{ 99{
100} 100}
101 101
102const MediaWidget::SkinButtonInfo *VideoWidget::skinInfo() 102MediaWidget::GUIInfo VideoWidget::guiInfo()
103{ 103{
104 return ::skinInfo; 104 return GUIInfo( "V" /* infix */, ::skinInfo, ::buttonCount );
105}
106
107const uint VideoWidget::buttonCount()
108{
109 return ::buttonCount;
110} 105}
111 106
112void VideoWidget::resizeEvent( QResizeEvent *e ) { 107void VideoWidget::resizeEvent( QResizeEvent *e ) {
@@ -167,7 +162,7 @@ void VideoWidget::setDisplayType( MediaPlayerState::DisplayType displayType )
167 162
168void VideoWidget::loadSkin() 163void VideoWidget::loadSkin()
169{ 164{
170 loadDefaultSkin( ::skinInfo, ::buttonCount, "V" ); 165 loadDefaultSkin( guiInfo() );
171 166
172 setBackgroundPixmap( backgroundPixmap ); 167 setBackgroundPixmap( backgroundPixmap );
173 168
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
@@ -50,8 +50,7 @@ public:
50 VideoWidget( PlayListWidget &playList, MediaPlayerState &mediaPlayerState, QWidget* parent=0, const char* name=0 ); 50 VideoWidget( PlayListWidget &playList, MediaPlayerState &mediaPlayerState, QWidget* parent=0, const char* name=0 );
51 ~VideoWidget(); 51 ~VideoWidget();
52 52
53 static const MediaWidget::SkinButtonInfo *skinInfo(); 53 static MediaWidget::GUIInfo guiInfo();
54 static const uint buttonCount();
55 54
56 XineVideoWidget* vidWidget(); 55 XineVideoWidget* vidWidget();
57public slots: 56public slots: