-rw-r--r-- | noncore/multimedia/opieplayer2/audiowidget.cpp | 13 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/mediawidget.cpp | 23 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/mediawidget.h | 3 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/videowidget.cpp | 11 |
4 files changed, 28 insertions, 22 deletions
diff --git a/noncore/multimedia/opieplayer2/audiowidget.cpp b/noncore/multimedia/opieplayer2/audiowidget.cpp index 0b7cc45..bb686f1 100644 --- a/noncore/multimedia/opieplayer2/audiowidget.cpp +++ b/noncore/multimedia/opieplayer2/audiowidget.cpp | |||
@@ -194,14 +194,3 @@ void AudioWidget::loadSkin() | |||
194 | { | 194 | { |
195 | Config cfg("OpiePlayer"); | 195 | loadDefaultSkin( skinInfo, buttonCount ); |
196 | cfg.setGroup("Options"); | ||
197 | skin = cfg.readEntry("Skin","default"); | ||
198 | //skin = "scaleTest"; | ||
199 | // color of background, frame, degree of transparency | ||
200 | |||
201 | QString skinPath = "opieplayer2/skins/" + skin; | ||
202 | backgroundPixmap = QPixmap( Resource::loadPixmap( QString("%1/background").arg(skinPath) ) ); | ||
203 | buttonUpImage = QImage( Resource::loadImage( QString("%1/skin_up").arg(skinPath) ) ); | ||
204 | buttonDownImage = QImage( Resource::loadImage( QString("%1/skin_down").arg(skinPath) ) ); | ||
205 | |||
206 | setupButtons( skinInfo, buttonCount, QPEApplication::qpeDir() + "/pics/" + skinPath + "/skin_mask_", buttonUpImage.size() ); | ||
207 | 196 | ||
diff --git a/noncore/multimedia/opieplayer2/mediawidget.cpp b/noncore/multimedia/opieplayer2/mediawidget.cpp index d60dc0d..c9d7db8 100644 --- a/noncore/multimedia/opieplayer2/mediawidget.cpp +++ b/noncore/multimedia/opieplayer2/mediawidget.cpp | |||
@@ -26,2 +26,5 @@ | |||
26 | 26 | ||
27 | #include <qpe/config.h> | ||
28 | #include <qpe/qpeapplication.h> | ||
29 | |||
27 | MediaWidget::MediaWidget( PlayListWidget &_playList, MediaPlayerState &_mediaPlayerState, QWidget *parent, const char *name ) | 30 | MediaWidget::MediaWidget( PlayListWidget &_playList, MediaPlayerState &_mediaPlayerState, QWidget *parent, const char *name ) |
@@ -87,2 +90,22 @@ QBitmap MediaWidget::setupButtonMask( const Command &command, const QString &fil | |||
87 | 90 | ||
91 | void MediaWidget::loadDefaultSkin( const SkinButtonInfo *skinInfo, uint buttonCount, const QString &fileNameInfix ) | ||
92 | { | ||
93 | Config cfg( "OpiePlayer" ); | ||
94 | cfg.setGroup( "Options" ); | ||
95 | QString skin = cfg.readEntry( "Skin","default" ); | ||
96 | |||
97 | loadSkin( skinInfo, buttonCount, skin, fileNameInfix ); | ||
98 | } | ||
99 | |||
100 | void MediaWidget::loadSkin( const SkinButtonInfo *skinInfo, uint buttonCount, const QString &name, const QString &fileNameInfix ) | ||
101 | { | ||
102 | QString skinPath = "opieplayer2/skins/" + name; | ||
103 | backgroundPixmap = QPixmap( Resource::loadPixmap( QString( "%1/background" ).arg( skinPath ) ) ); | ||
104 | buttonUpImage = QImage( Resource::loadImage( QString( "%1/skin%2_up" ).arg( skinPath ).arg( fileNameInfix ) ) ); | ||
105 | buttonDownImage = QImage( Resource::loadImage( QString( "%1/skin%2_down" ).arg( skinPath ).arg( fileNameInfix ) ) ); | ||
106 | |||
107 | setupButtons( skinInfo, buttonCount, | ||
108 | QPEApplication::qpeDir() + "/pics/" + skinPath + QString::fromLatin1( "/skin%1_mask_" ).arg( fileNameInfix ), buttonUpImage.size() ); | ||
109 | } | ||
110 | |||
88 | void MediaWidget::closeEvent( QCloseEvent * ) | 111 | void MediaWidget::closeEvent( QCloseEvent * ) |
diff --git a/noncore/multimedia/opieplayer2/mediawidget.h b/noncore/multimedia/opieplayer2/mediawidget.h index 754228e..52b9fcb 100644 --- a/noncore/multimedia/opieplayer2/mediawidget.h +++ b/noncore/multimedia/opieplayer2/mediawidget.h | |||
@@ -106,2 +106,5 @@ protected: | |||
106 | 106 | ||
107 | void loadDefaultSkin( const SkinButtonInfo *skinInfo, uint buttonCount, const QString &fileNameInfix = QString::null ); | ||
108 | void loadSkin( const SkinButtonInfo *skinInfo, uint buttonCount, const QString &name, const QString &fileNameInfix ); | ||
109 | |||
107 | virtual void closeEvent( QCloseEvent * ); | 110 | virtual void closeEvent( QCloseEvent * ); |
diff --git a/noncore/multimedia/opieplayer2/videowidget.cpp b/noncore/multimedia/opieplayer2/videowidget.cpp index 0047ac0..bc47717 100644 --- a/noncore/multimedia/opieplayer2/videowidget.cpp +++ b/noncore/multimedia/opieplayer2/videowidget.cpp | |||
@@ -187,12 +187,3 @@ void VideoWidget::loadSkin() | |||
187 | { | 187 | { |
188 | Config cfg("OpiePlayer"); | 188 | loadDefaultSkin( skinInfo, buttonCount, "V" ); |
189 | cfg.setGroup("Options"); | ||
190 | QString skin = cfg.readEntry("Skin","default"); | ||
191 | |||
192 | QString skinPath = "opieplayer2/skins/" + skin; | ||
193 | backgroundPixmap = QPixmap( Resource::loadPixmap( QString("%1/background").arg(skinPath) ) ); | ||
194 | buttonUpImage = QImage( Resource::loadImage( QString("%1/skinV_up").arg(skinPath) ) ); | ||
195 | buttonDownImage = QImage( Resource::loadImage( QString("%1/skinV_down").arg(skinPath) ) ); | ||
196 | |||
197 | setupButtons( skinInfo, buttonCount, QPEApplication::qpeDir() + "/pics/" + skinPath + "/skinV_mask_", buttonUpImage.size() ); | ||
198 | 189 | ||