00001 #ifndef IMAGECACHE_H_
00002 #define IMAGECACHE_H_
00003
00004 class QPixmap;
00005 class ImageCacheImp;
00006 class ImageCache
00007 {
00008 public:
00009 static ImageCache &getImageCache();
00010
00011 public:
00012 const QPixmap *load(const QString &image_file);
00013 const QPixmap *load(const QString &image_file, int width, int height,
00014 QImage::ScaleMode scale);
00015 const QPixmap *load(const QString &image_file, QPixmap *pre_loaded);
00016 bool hitTest(const QString &image_file) const;
00017 void resize(unsigned int new_size);
00018 unsigned int size();
00019 void clear();
00020
00021 private:
00022 ImageCache();
00023 ~ImageCache();
00024
00025 private:
00026 ImageCacheImp *m_imp;
00027 };
00028
00029 #endif // IMAGECACHE_H_