summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/mediawidget.cpp5
-rw-r--r--noncore/multimedia/opieplayer2/opieplayer2.pro6
-rw-r--r--noncore/multimedia/opieplayer2/skin.cpp18
-rw-r--r--noncore/multimedia/opieplayer2/skin.h22
4 files changed, 48 insertions, 3 deletions
diff --git a/noncore/multimedia/opieplayer2/mediawidget.cpp b/noncore/multimedia/opieplayer2/mediawidget.cpp
index 70ef8d9..617e0fe 100644
--- a/noncore/multimedia/opieplayer2/mediawidget.cpp
+++ b/noncore/multimedia/opieplayer2/mediawidget.cpp
@@ -25,2 +25,3 @@
25#include "playlistwidget.h" 25#include "playlistwidget.h"
26#include "skin.h"
26 27
@@ -102,4 +103,6 @@ void MediaWidget::loadSkin( const SkinButtonInfo *skinInfo, uint buttonCount, co
102{ 103{
104 Skin skin( name, fileNameInfix );
105
103 QString skinPath = "opieplayer2/skins/" + name; 106 QString skinPath = "opieplayer2/skins/" + name;
104 backgroundPixmap = QPixmap( Resource::loadPixmap( QString( "%1/background" ).arg( skinPath ) ) ); 107 backgroundPixmap = skin.backgroundImage();
105 buttonUpImage = QImage( Resource::loadImage( QString( "%1/skin%2_up" ).arg( skinPath ).arg( fileNameInfix ) ) ); 108 buttonUpImage = QImage( Resource::loadImage( QString( "%1/skin%2_up" ).arg( skinPath ).arg( fileNameInfix ) ) );
diff --git a/noncore/multimedia/opieplayer2/opieplayer2.pro b/noncore/multimedia/opieplayer2/opieplayer2.pro
index 8d549b6..e1bb879 100644
--- a/noncore/multimedia/opieplayer2/opieplayer2.pro
+++ b/noncore/multimedia/opieplayer2/opieplayer2.pro
@@ -7,3 +7,4 @@ HEADERS = playlistselection.h mediaplayerstate.h xinecontrol.h \
7 frame.h lib.h xinevideowidget.h volumecontrol.h playlistwidgetgui.h\ 7 frame.h lib.h xinevideowidget.h volumecontrol.h playlistwidgetgui.h\
8 alphablend.h yuv2rgb.h threadutil.h mediawidget.h playlistview.h playlistfileview.h 8 alphablend.h yuv2rgb.h threadutil.h mediawidget.h playlistview.h playlistfileview.h \
9 skin.h
9SOURCES = main.cpp \ 10SOURCES = main.cpp \
@@ -14,3 +15,4 @@ SOURCES = main.cpp \
14 alphablend.c yuv2rgb.c yuv2rgb_arm.c yuv2rgb_arm4l.S \ 15 alphablend.c yuv2rgb.c yuv2rgb_arm.c yuv2rgb_arm4l.S \
15 threadutil.cpp mediawidget.cpp playlistview.cpp playlistfileview.cpp 16 threadutil.cpp mediawidget.cpp playlistview.cpp playlistfileview.cpp \
17 skin.cpp
16TARGET = opieplayer2 18TARGET = opieplayer2
diff --git a/noncore/multimedia/opieplayer2/skin.cpp b/noncore/multimedia/opieplayer2/skin.cpp
new file mode 100644
index 0000000..097b29a
--- a/dev/null
+++ b/noncore/multimedia/opieplayer2/skin.cpp
@@ -0,0 +1,18 @@
1
2#include "skin.h"
3
4#include <qpe/resource.h>
5
6Skin::Skin( const QString &name, const QString &fileNameInfix )
7 : m_name( name ), m_fileNameInfix( fileNameInfix )
8{
9 m_skinPath = "opieplayer2/skins/" + name;
10}
11
12QImage Skin::backgroundImage() const
13{
14 return QImage( Resource::findPixmap( QString( "%1/background" ).arg( m_skinPath ) ) );
15}
16
17/* vim: et sw=4 ts=4
18 */
diff --git a/noncore/multimedia/opieplayer2/skin.h b/noncore/multimedia/opieplayer2/skin.h
new file mode 100644
index 0000000..3c09e43
--- a/dev/null
+++ b/noncore/multimedia/opieplayer2/skin.h
@@ -0,0 +1,22 @@
1#ifndef SKIN_H
2#define SKIN_H
3
4#include <qstring.h>
5#include <qimage.h>
6
7class Skin
8{
9public:
10 Skin( const QString &name, const QString &fileNameInfix );
11
12 QImage backgroundImage() const;
13
14private:
15 QString m_name;
16 QString m_fileNameInfix;
17 QString m_skinPath;
18};
19
20#endif // SKIN_H
21/* vim: et sw=4 ts=4
22 */