Back to index

scribus-ng  1.3.4.dfsg+svn20071115
scpixmapcache.h
Go to the documentation of this file.
00001 /*
00002 For general Scribus (>=1.3.2) copyright and licensing information please refer
00003 to the COPYING file provided with the program. Following this notice may exist
00004 a copyright and/or license notice that predates the release of Scribus 1.3.2
00005 for which a new license (GPL+exception) is in place.
00006 */
00007 
00008 #ifndef SCPIXMAPCACHE_H
00009 #define SCPIXMAPCACHE_H
00010 
00011 #include <qmap.h>
00012 #include <qpixmap.h>
00013 
00014 template <typename T>
00015 class ScPixmapCache : public QMap<T, QPixmap*>
00016 {
00017 public:
00018        ScPixmapCache() {};
00019        ~ScPixmapCache();
00020 };
00021 
00022 template <typename T>
00023 ScPixmapCache<T>::~ScPixmapCache()
00024 {
00025        typename QMap<T, QPixmap*>::iterator it;
00026        typename QMap<T, QPixmap*>::iterator itEnd;
00027 
00028        itEnd = this->end();
00029        for (it = this->begin(); it != itEnd; it++)
00030               delete (it.data());
00031 };
00032 
00033 #endif