author | zecke <zecke> | 2004-03-22 23:32:41 (UTC) |
---|---|---|
committer | zecke <zecke> | 2004-03-22 23:32:41 (UTC) |
commit | 428b687982966dc2efabaf6dbcc55ad0ea30aa10 (patch) (unidiff) | |
tree | 86da20abd2e4b97a59dc32e17996bde5ee74cc91 /noncore/graphics/opie-eye/lib/imagecache.h | |
parent | 7ce623c6351646ce738a81e103632d73c5454ecc (diff) | |
download | opie-428b687982966dc2efabaf6dbcc55ad0ea30aa10.zip opie-428b687982966dc2efabaf6dbcc55ad0ea30aa10.tar.gz opie-428b687982966dc2efabaf6dbcc55ad0ea30aa10.tar.bz2 |
Initial Check in of the Eye Of Zilla. This ImageViewer features
Image Infos, EXIF, Jpeg,Png,Gif support. It supports scaled loading
of Jpegs. an smart image cache....
GUI needs some work and we need to find a bug in QCOP as well.
TODO:
Add Image Service for example Mailer
Add ImageCanvas/Zoomer/Display
Diffstat (limited to 'noncore/graphics/opie-eye/lib/imagecache.h') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/graphics/opie-eye/lib/imagecache.h | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/noncore/graphics/opie-eye/lib/imagecache.h b/noncore/graphics/opie-eye/lib/imagecache.h new file mode 100644 index 0000000..076ecd3 --- a/dev/null +++ b/noncore/graphics/opie-eye/lib/imagecache.h | |||
@@ -0,0 +1,46 @@ | |||
1 | /* | ||
2 | * GPLv2 zecke@handhelds.org | ||
3 | * No WArranty... | ||
4 | */ | ||
5 | |||
6 | #ifndef PHUNK_IMAGE_CACHE_H | ||
7 | #define PHUNK_IMAGE_CACHE_H | ||
8 | |||
9 | #include <qimage.h> | ||
10 | #include <qpixmap.h> | ||
11 | #include <qcache.h> | ||
12 | |||
13 | |||
14 | class PImageCache : public QCache<QImage> { | ||
15 | private: | ||
16 | PImageCache(); | ||
17 | ~PImageCache(); | ||
18 | |||
19 | public: | ||
20 | static PImageCache *self(); | ||
21 | QImage* cachedImage( const QString& path, int orientation = 3, int max = 0); //const; | ||
22 | void insertImage( const QString& path, const QImage &, int orien = 3, int max = 0); | ||
23 | void insertImage( const QString& path, const QImage *, int orien=3, int max = 0 ); | ||
24 | }; | ||
25 | |||
26 | |||
27 | class PPixmapCache : public QCache<QPixmap> { | ||
28 | private: | ||
29 | PPixmapCache(); | ||
30 | ~PPixmapCache(); | ||
31 | public: | ||
32 | static PPixmapCache *self(); | ||
33 | QPixmap* cachedImage( const QString& path, int width, int height ); | ||
34 | void insertImage( const QString& path, const QPixmap &, int width, int height ); | ||
35 | void insertImage( const QString& path, const QPixmap *, int width, int height ); | ||
36 | }; | ||
37 | |||
38 | inline void PPixmapCache::insertImage( const QString& path, const QPixmap& p, int width, int height ) { | ||
39 | insertImage( path, new QPixmap( p ), width, height ); | ||
40 | } | ||
41 | |||
42 | inline void PImageCache::insertImage( const QString& path, const QImage& p, int width, int height ) { | ||
43 | insertImage( path, new QImage( p ), width, height ); | ||
44 | } | ||
45 | |||
46 | #endif | ||