KDEUI
kiconcache.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef KICONCACHE_H
00022 #define KICONCACHE_H
00023
00024 #include <kdeui_export.h>
00025
00026 #include <QtCore/QList>
00027 #include <QtCore/QSet>
00028 #include <kicontheme.h>
00029 #include <kpixmapcache.h>
00030
00031 class QString;
00032 class QStringList;
00033 class QPixmap;
00034 class QDataStream;
00035
00036
00044 class KDEUI_EXPORT KIconCache : public KPixmapCache
00045 {
00046 public:
00050 explicit KIconCache();
00051 virtual ~KIconCache();
00052
00053
00054 bool find(const QString& key, QPixmap& pix, QString* path);
00055 void insert(const QString& key, const QPixmap& pix, const QString& path);
00056
00057 virtual bool find(const QString& key, QPixmap& pix);
00058 virtual void insert(const QString& key, const QPixmap& pix);
00059
00063 static void deleteCache();
00064
00070 int defaultIconSize(KIconLoader::Group group) const;
00071
00072 void setThemeInfo(const QList<KIconTheme*>& themes);
00073
00074
00075 protected:
00076 virtual bool loadCustomIndexHeader(QDataStream& stream);
00077 virtual void writeCustomIndexHeader(QDataStream& stream);
00078
00079 virtual bool loadCustomData(QDataStream& stream);
00080 virtual bool writeCustomData(QDataStream& stream);
00081
00082 QSet<QString> existingIconThemeDirs(const QStringList& themeNames) const;
00083 unsigned int mostRecentMTime(const QSet<QString>& dirNames) const;
00084
00085 private:
00086 class Private;
00087 friend class Private;
00088 Private * const d;
00089 };
00090
00091 #endif // KICONCACHE_H