|
Hydra 0.20
|
#include <ImageCache.h>
Classes | |
| class | ImageLoader |
Public Member Functions | |
| ImageCache (int maxhold=5) | |
| constructor | |
| bool | containsImage (const QString &fullfilename) const |
| desktop::cache_ptr< QImage > | getImage (const QString &fullfilename) |
Static Public Member Functions | |
| static QPixmap | getPixmap (QImage &image, int windoww, int windowh, bool growtofit) |
A image-reading cache, useful for the big image viewers. Also does rescaling of the image as needed. The rescaled versions however are not cached.
| bool desktop::ImageCache::containsImage | ( | const QString & | fullfilename | ) | const [inline] |
Is the given fullfilename in the cache?
| desktop::cache_ptr<QImage> desktop::ImageCache::getImage | ( | const QString & | fullfilename | ) | [inline] |
Loads the given file as an image, from cache if possible. This function never fails and never returns null - on error, an empty image will be returned.
| static QPixmap desktop::ImageCache::getPixmap | ( | QImage & | image, |
| int | windoww, | ||
| int | windowh, | ||
| bool | growtofit | ||
| ) | [static] |
Note that this is a static function, and can take in image. Obviously, the resulting QPixmaps are saved or cached in any way.