ImageCacheImp Class Reference

List of all members.


Detailed Description

Definition at line 13 of file imagecache.cpp.


Public Member Functions

 ImageCacheImp (unsigned int cache_max)
const QPixmap * load (const QString &image_file)
const QPixmap * load (const QString &image_file, int width, int height, QImage::ScaleMode scale)
const QPixmap * load (const QString &image_file, QPixmap *pre_loaded)
bool hitTest (const QString &image_file) const
void resize (unsigned int new_size)
unsigned int size ()
void clear ()
void cleanup ()

Private Types

typedef simple_ref_ptr
< cache_entry
cache_entry_ptr
typedef std::list
< cache_entry_ptr
cache_list
typedef std::map< QString,
cache_list::iterator > 
cache_map

Private Member Functions

cache_entry_ptr addImage (const QString &image_file)
cache_entry_ptr addScaleImage (const QString &image_file, int width, int height, QImage::ScaleMode scale)
void unload_first ()
void trim_cache ()
void ensure_cache_min ()

Private Attributes

cache_list m_cache
cache_map m_cache_index
unsigned int m_max_cache_size
SimpleCleanup< ImageCacheImpm_clean_stub

Classes

struct  cache_entry

Member Typedef Documentation

Definition at line 120 of file imagecache.cpp.

typedef std::list<cache_entry_ptr> ImageCacheImp::cache_list [private]

Definition at line 121 of file imagecache.cpp.

typedef std::map<QString, cache_list::iterator> ImageCacheImp::cache_map [private]

Definition at line 122 of file imagecache.cpp.


Constructor & Destructor Documentation

ImageCacheImp::ImageCacheImp ( unsigned int  cache_max  )  [inline]

Definition at line 16 of file imagecache.cpp.


Member Function Documentation

const QPixmap* ImageCacheImp::load ( const QString &  image_file  )  [inline]

Definition at line 22 of file imagecache.cpp.

Referenced by ImageCache::load().

const QPixmap* ImageCacheImp::load ( const QString &  image_file,
int  width,
int  height,
QImage::ScaleMode  scale 
) [inline]

Definition at line 33 of file imagecache.cpp.

const QPixmap* ImageCacheImp::load ( const QString &  image_file,
QPixmap *  pre_loaded 
) [inline]

Definition at line 46 of file imagecache.cpp.

bool ImageCacheImp::hitTest ( const QString &  image_file  )  const [inline]

Definition at line 61 of file imagecache.cpp.

Referenced by ImageCache::hitTest().

void ImageCacheImp::resize ( unsigned int  new_size  )  [inline]

Definition at line 66 of file imagecache.cpp.

Referenced by ImageCache::resize().

unsigned int ImageCacheImp::size (  )  [inline]

Definition at line 77 of file imagecache.cpp.

Referenced by ImageCache::size().

void ImageCacheImp::clear ( void   )  [inline]

Definition at line 82 of file imagecache.cpp.

Referenced by cleanup(), and ImageCache::clear().

void ImageCacheImp::cleanup (  )  [inline]

Definition at line 88 of file imagecache.cpp.

cache_entry_ptr ImageCacheImp::addImage ( const QString &  image_file  )  [inline, private]

Definition at line 125 of file imagecache.cpp.

Referenced by addScaleImage(), and load().

cache_entry_ptr ImageCacheImp::addScaleImage ( const QString &  image_file,
int  width,
int  height,
QImage::ScaleMode  scale 
) [inline, private]

Definition at line 158 of file imagecache.cpp.

Referenced by load().

void ImageCacheImp::unload_first (  )  [inline, private]

Definition at line 189 of file imagecache.cpp.

Referenced by resize(), and trim_cache().

void ImageCacheImp::trim_cache (  )  [inline, private]

Definition at line 203 of file imagecache.cpp.

Referenced by addImage(), and load().

void ImageCacheImp::ensure_cache_min (  )  [inline, private]

Definition at line 211 of file imagecache.cpp.

Referenced by ImageCacheImp(), and resize().


Member Data Documentation

Definition at line 217 of file imagecache.cpp.

Referenced by addImage(), clear(), load(), resize(), size(), trim_cache(), and unload_first().

Definition at line 218 of file imagecache.cpp.

Referenced by addImage(), clear(), hitTest(), load(), and unload_first().

unsigned int ImageCacheImp::m_max_cache_size [private]

Definition at line 219 of file imagecache.cpp.

Referenced by ensure_cache_min(), resize(), and trim_cache().

Definition at line 220 of file imagecache.cpp.


The documentation for this class was generated from the following file:

Generated on Sat Dec 18 05:16:04 2010 for MythTV by  doxygen 1.5.5