Diffstat (limited to 'noncore/multimedia/opieplayer2/skin.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/multimedia/opieplayer2/skin.cpp | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/noncore/multimedia/opieplayer2/skin.cpp b/noncore/multimedia/opieplayer2/skin.cpp index d3918d1..8281b20 100644 --- a/noncore/multimedia/opieplayer2/skin.cpp +++ b/noncore/multimedia/opieplayer2/skin.cpp | |||
@@ -3,7 +3,19 @@ | |||
3 | 3 | ||
4 | #include <qpe/resource.h> | 4 | #include <qpe/resource.h> |
5 | #include <qpe/config.h> | ||
5 | 6 | ||
6 | Skin::Skin( const QString &name, const QString &fileNameInfix ) | 7 | Skin::Skin( const QString &name, const QString &fileNameInfix ) |
7 | : m_name( name ), m_fileNameInfix( fileNameInfix ) | 8 | : m_fileNameInfix( fileNameInfix ) |
9 | { | ||
10 | init( name ); | ||
11 | } | ||
12 | |||
13 | Skin::Skin( const QString &fileNameInfix ) | ||
14 | : m_fileNameInfix( fileNameInfix ) | ||
15 | { | ||
16 | init( defaultSkinName() ); | ||
17 | } | ||
18 | |||
19 | void Skin::init( const QString &name ) | ||
8 | { | 20 | { |
9 | m_skinPath = "opieplayer2/skins/" + name; | 21 | m_skinPath = "opieplayer2/skins/" + name; |
@@ -80,4 +92,11 @@ QImage Skin::buttonMaskImage( const QString &fileName ) const | |||
80 | } | 92 | } |
81 | 93 | ||
94 | QString Skin::defaultSkinName() | ||
95 | { | ||
96 | Config cfg( "OpiePlayer" ); | ||
97 | cfg.setGroup( "Options" ); | ||
98 | return cfg.readEntry( "Skin", "default" ); | ||
99 | } | ||
100 | |||
82 | /* vim: et sw=4 ts=4 | 101 | /* vim: et sw=4 ts=4 |
83 | */ | 102 | */ |