Scribus
Open source desktop publishing at your fingertips
scpixmapcache.h
1 /*
2 For general Scribus (>=1.3.2) copyright and licensing information please refer
3 to the COPYING file provided with the program. Following this notice may exist
4 a copyright and/or license notice that predates the release of Scribus 1.3.2
5 for which a new license (GPL+exception) is in place.
6 */
7 
8 #ifndef SCPIXMAPCACHE_H
9 #define SCPIXMAPCACHE_H
10 
11 #include <QMap>
12 #include <QPixmap>
13 
14 template <typename T>
15 class ScPixmapCache : public QMap<T, QPixmap*>
16 {
17 public:
18  ScPixmapCache() {};
19  ~ScPixmapCache();
20 };
21 
22 template <typename T>
24 {
25  typename QMap<T, QPixmap*>::iterator it;
26  typename QMap<T, QPixmap*>::iterator itEnd;
27 
28  itEnd = this->end();
29  for (it = this->begin(); it != itEnd; it++)
30  delete (it.value());
31 };
32 
33 #endif
Definition: scpixmapcache.h:15