Diffstat (limited to 'noncore/multimedia/opieplayer2/skin.h') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/multimedia/opieplayer2/skin.h | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/noncore/multimedia/opieplayer2/skin.h b/noncore/multimedia/opieplayer2/skin.h index 9f7326e..5ab6574 100644 --- a/noncore/multimedia/opieplayer2/skin.h +++ b/noncore/multimedia/opieplayer2/skin.h | |||
@@ -23,57 +23,54 @@ | |||
23 | #ifndef SKIN_H | 23 | #ifndef SKIN_H |
24 | #define SKIN_H | 24 | #define SKIN_H |
25 | 25 | ||
26 | #include <qstring.h> | 26 | #include <qstring.h> |
27 | #include <qimage.h> | 27 | #include <qimage.h> |
28 | #include <qmap.h> | 28 | #include <qmap.h> |
29 | #include <qdict.h> | 29 | #include <qdict.h> |
30 | 30 | ||
31 | #include "mediawidget.h" | 31 | #include "mediawidget.h" |
32 | #include "threadutil.h" | 32 | #include "threadutil.h" |
33 | #include "singleton.h" | 33 | #include "singleton.h" |
34 | 34 | ||
35 | struct SkinData; | ||
36 | |||
35 | class Skin | 37 | class Skin |
36 | { | 38 | { |
37 | public: | 39 | public: |
38 | Skin( const QString &name, const QString &fileNameInfix ); | 40 | Skin( const QString &name, const QString &fileNameInfix ); |
39 | Skin( const QString &fileNameInfix ); | 41 | Skin( const QString &fileNameInfix ); |
42 | ~Skin(); | ||
40 | 43 | ||
41 | void preload( const MediaWidget::SkinButtonInfo *skinButtonInfo, uint buttonCount ); | 44 | void preload( const MediaWidget::SkinButtonInfo *skinButtonInfo, uint buttonCount ); |
42 | 45 | ||
43 | QImage backgroundImage() const; | 46 | QImage backgroundImage() const; |
44 | QImage buttonUpImage() const; | 47 | QImage buttonUpImage() const; |
45 | QImage buttonDownImage() const; | 48 | QImage buttonDownImage() const; |
46 | 49 | ||
47 | QImage buttonMask( const MediaWidget::SkinButtonInfo *skinButtonInfo, uint buttonCount ) const; | 50 | QImage buttonMask( const MediaWidget::SkinButtonInfo *skinButtonInfo, uint buttonCount ) const; |
48 | 51 | ||
49 | QImage buttonMaskImage( const QString &fileName ) const; | 52 | QImage buttonMaskImage( const QString &fileName ) const; |
50 | 53 | ||
51 | static QString defaultSkinName(); | 54 | static QString defaultSkinName(); |
52 | 55 | ||
53 | private: | 56 | private: |
54 | void init( const QString &name ); | 57 | void init( const QString &name ); |
55 | 58 | ||
56 | void addButtonToMask( int tag, const QImage &maskImage ) const; | 59 | void addButtonToMask( int tag, const QImage &maskImage ) const; |
57 | 60 | ||
58 | QString m_fileNameInfix; | 61 | QString m_fileNameInfix; |
59 | QString m_skinPath; | 62 | QString m_skinPath; |
60 | 63 | ||
61 | typedef QMap<QString, QImage> ButtonMaskImageMap; | 64 | SkinData *d; |
62 | |||
63 | mutable QImage m_backgroundImage; | ||
64 | mutable QImage m_buttonUpImage; | ||
65 | mutable QImage m_buttonDownImage; | ||
66 | mutable QImage m_buttonMask; | ||
67 | mutable ButtonMaskImageMap m_buttonMasks; | ||
68 | 65 | ||
69 | Skin( const Skin & ); | 66 | Skin( const Skin & ); |
70 | Skin &operator=( const Skin & ); | 67 | Skin &operator=( const Skin & ); |
71 | }; | 68 | }; |
72 | 69 | ||
73 | class SkinCache : public Singleton<SkinCache> | 70 | class SkinCache : public Singleton<SkinCache> |
74 | { | 71 | { |
75 | public: | 72 | public: |
76 | SkinCache(); | 73 | SkinCache(); |
77 | 74 | ||
78 | QImage loadImage( const QString &name ); | 75 | QImage loadImage( const QString &name ); |
79 | 76 | ||