Diffstat (limited to 'noncore/graphics/opie-eye/lib/imagecache.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/graphics/opie-eye/lib/imagecache.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/noncore/graphics/opie-eye/lib/imagecache.cpp b/noncore/graphics/opie-eye/lib/imagecache.cpp index 3b74a83..f1042a4 100644 --- a/noncore/graphics/opie-eye/lib/imagecache.cpp +++ b/noncore/graphics/opie-eye/lib/imagecache.cpp @@ -53,24 +53,30 @@ void PImageCache::insertImage( const QString& _path, const QImage* img, int or PPixmapCache::PPixmapCache() { /* * 20 64x64 16 bit images */ setMaxCost( 64*64*QPixmap::defaultDepth()/8*20 ); } PPixmapCache::~PPixmapCache() { } +void PPixmapCache::setMaxImages(unsigned int aMax) +{ + m_MaxImages = aMax; + setMaxCost( 64*64*QPixmap::defaultDepth()/8*m_MaxImages); +} + PPixmapCache* PPixmapCache::self() { if ( !_pxmCache ) _pxmCache = new PPixmapCache; return _pxmCache; } QPixmap* PPixmapCache::cachedImage( const QString& _path, int width, int height ) { QString path = QString( "%1_%2:" ).arg( width ).arg( height ); path += _path; QPixmap* pxm = find( path ); |