![]() |
Mixxx
|
00001 /*************************************************************************** 00002 wpixmapstore.h - description 00003 ------------------- 00004 begin : Mon Jun 28 2003 00005 copyright : (C) 2003 by Tue & Ken Haste Andersen 00006 email : haste@diku.dk 00007 ***************************************************************************/ 00008 00009 /*************************************************************************** 00010 * * 00011 * This program is free software; you can redistribute it and/or modify * 00012 * it under the terms of the GNU General Public License as published by * 00013 * the Free Software Foundation; either version 2 of the License, or * 00014 * (at your option) any later version. * 00015 * * 00016 ***************************************************************************/ 00017 00018 #ifndef WPIXMAPSTORE_H 00019 #define WPIXMAPSTORE_H 00020 00021 #include <QHash> 00022 #include <QSharedPointer> 00023 #include <qpixmap.h> 00024 00025 #include "skin/imgsource.h" 00026 00032 typedef struct 00033 { 00034 QPixmap *pixmap; 00035 int instCount; 00036 } PixmapInfoType; 00037 00038 class WPixmapStore { 00039 public: 00040 static QPixmap *getPixmap(const QString &fileName); 00041 static QPixmap *getPixmapNoCache(const QString &fileName); 00042 static void deletePixmap(QPixmap *p); 00043 static void setLoader(QSharedPointer<ImgSource> ld); 00044 static void emptyStore(); 00045 private: 00047 static QHash<QString, PixmapInfoType*> dictionary; 00048 static QSharedPointer<ImgSource> loader; 00049 }; 00050 00051 #endif