author | simon <simon> | 2002-12-11 18:34:16 (UTC) |
---|---|---|
committer | simon <simon> | 2002-12-11 18:34:16 (UTC) |
commit | b8db7cfea977d20f2d491b0a208a237efb15019a (patch) (unidiff) | |
tree | fe9d4a5613af7fc3bb202b679af6021c3b95db08 /noncore/multimedia/opieplayer2/skin.cpp | |
parent | f3d21af83a2846d1c20fc845cf88329ff1f2b1a9 (diff) | |
download | opie-b8db7cfea977d20f2d491b0a208a237efb15019a.zip opie-b8db7cfea977d20f2d491b0a208a237efb15019a.tar.gz opie-b8db7cfea977d20f2d491b0a208a237efb15019a.tar.bz2 |
- moved the skin cache into the .cpp file
Diffstat (limited to 'noncore/multimedia/opieplayer2/skin.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/multimedia/opieplayer2/skin.cpp | 16 |
1 files changed, 16 insertions, 0 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 | |||
@@ -21,6 +21,7 @@ | |||
21 | */ | 21 | */ |
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> |
26 | #include <qpe/config.h> | 27 | #include <qpe/config.h> |
@@ -38,6 +39,21 @@ struct SkinData | |||
38 | ButtonMaskImageMap buttonMasks; | 39 | ButtonMaskImageMap buttonMasks; |
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 ) |
43 | { | 59 | { |