iconcache.h

来自「c++的guiQt做的开发」· C头文件 代码 · 共 36 行

H
36
字号
#ifndef __ICONCACHE_H__#define __ICONCACHE_H__#include <QString>class QStringList;class QPixmap;class QIcon;namespace gui {/** Class responsible for loading and caching icons<br> There can be multiple instances of this class at once, but all of them share common cache. Cache is destroyed once last instance of IconCache is deleted \brief Class caching loaded icons*/class IconCache {public: IconCache(const QString &pathSettings=QString("icon"), const QString &styleSettings=QString("icon/theme/current")); ~IconCache(); QPixmap* getIcon(const QString &name); QIcon* getIconSet(const QString &name); void readSettings(); void setPath(const QStringList &iconPaths); void setTheme(const QString &iconTheme); void flush(); void reload();private: QString getIconFile(const QString &name);};} // namespace gui#endif

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?