-rw-r--r-- | noncore/multimedia/opieplayer2/skin.cpp | 16 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/skin.h | 16 |
2 files changed, 16 insertions, 16 deletions
diff --git a/noncore/multimedia/opieplayer2/skin.cpp b/noncore/multimedia/opieplayer2/skin.cpp index 9ad5f3f..06453f9 100644 --- a/noncore/multimedia/opieplayer2/skin.cpp +++ b/noncore/multimedia/opieplayer2/skin.cpp | |||
@@ -22,4 +22,5 @@ | |||
22 | 22 | ||
23 | #include "skin.h" | 23 | #include "skin.h" |
24 | #include "singleton.h" | ||
24 | 25 | ||
25 | #include <qpe/resource.h> | 26 | #include <qpe/resource.h> |
@@ -39,4 +40,19 @@ struct SkinData | |||
39 | }; | 40 | }; |
40 | 41 | ||
42 | class SkinCache : public Singleton<SkinCache> | ||
43 | { | ||
44 | public: | ||
45 | SkinCache(); | ||
46 | |||
47 | QImage loadImage( const QString &name ); | ||
48 | |||
49 | private: | ||
50 | typedef QDict<QImage> ImageCache; | ||
51 | |||
52 | ImageCache m_cache; | ||
53 | |||
54 | ThreadUtil::Mutex m_cacheGuard; | ||
55 | }; | ||
56 | |||
41 | Skin::Skin( const QString &name, const QString &fileNameInfix ) | 57 | Skin::Skin( const QString &name, const QString &fileNameInfix ) |
42 | : m_fileNameInfix( fileNameInfix ) | 58 | : m_fileNameInfix( fileNameInfix ) |
diff --git a/noncore/multimedia/opieplayer2/skin.h b/noncore/multimedia/opieplayer2/skin.h index 5ab6574..060ff73 100644 --- a/noncore/multimedia/opieplayer2/skin.h +++ b/noncore/multimedia/opieplayer2/skin.h | |||
@@ -31,5 +31,4 @@ | |||
31 | #include "mediawidget.h" | 31 | #include "mediawidget.h" |
32 | #include "threadutil.h" | 32 | #include "threadutil.h" |
33 | #include "singleton.h" | ||
34 | 33 | ||
35 | struct SkinData; | 34 | struct SkinData; |
@@ -68,19 +67,4 @@ private: | |||
68 | }; | 67 | }; |
69 | 68 | ||
70 | class SkinCache : public Singleton<SkinCache> | ||
71 | { | ||
72 | public: | ||
73 | SkinCache(); | ||
74 | |||
75 | QImage loadImage( const QString &name ); | ||
76 | |||
77 | private: | ||
78 | typedef QDict<QImage> ImageCache; | ||
79 | |||
80 | ImageCache m_cache; | ||
81 | |||
82 | ThreadUtil::Mutex m_cacheGuard; | ||
83 | }; | ||
84 | |||
85 | class SkinLoader : public ThreadUtil::Thread | 69 | class SkinLoader : public ThreadUtil::Thread |
86 | { | 70 | { |