summaryrefslogtreecommitdiff
path: root/noncore/graphics/opie-eye/lib/imagecache.h
authoralwin <alwin>2004-04-19 09:16:15 (UTC)
committer alwin <alwin>2004-04-19 09:16:15 (UTC)
commite3ca538f7ce2e7b7df2f29f263778acc342d51db (patch) (side-by-side diff)
treecb3e3c769ae12542d24eff7d17168635ddef65af /noncore/graphics/opie-eye/lib/imagecache.h
parent0b59a16b5a5a179c46ddb3f8c585dbca59b2826e (diff)
downloadopie-e3ca538f7ce2e7b7df2f29f263778acc342d51db.zip
opie-e3ca538f7ce2e7b7df2f29f263778acc342d51db.tar.gz
opie-e3ca538f7ce2e7b7df2f29f263778acc342d51db.tar.bz2
re-enabled the cache as designed.
for that, pixcache has now a method setting the size of cache (parameter count of pix) and it will switched between the different views. setPixmap is overloaded that way, that we don't store the pix inside the item but calling calcRect which is accessing the cached pixmap. voila. Zecke: Should we make a configure item where users can setup how much pix-previews should cache? Should we setup a thumbnail cache like .xvpics?
Diffstat (limited to 'noncore/graphics/opie-eye/lib/imagecache.h') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/graphics/opie-eye/lib/imagecache.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/noncore/graphics/opie-eye/lib/imagecache.h b/noncore/graphics/opie-eye/lib/imagecache.h
index 076ecd3..939247a 100644
--- a/noncore/graphics/opie-eye/lib/imagecache.h
+++ b/noncore/graphics/opie-eye/lib/imagecache.h
@@ -28,11 +28,16 @@ class PPixmapCache : public QCache<QPixmap> {
private:
PPixmapCache();
~PPixmapCache();
+
+ unsigned int m_MaxImages;
+
public:
static PPixmapCache *self();
QPixmap* cachedImage( const QString& path, int width, int height );
void insertImage( const QString& path, const QPixmap &, int width, int height );
void insertImage( const QString& path, const QPixmap *, int width, int height );
+ void setMaxImages(unsigned int aMax);
+ unsigned int maxImages()const{return m_MaxImages;}
};
inline void PPixmapCache::insertImage( const QString& path, const QPixmap& p, int width, int height ) {