afiletypes.h

来自「爱可视605看PDF程式源代码, 基于APDF」· C头文件 代码 · 共 50 行

H
50
字号
/* A QDict providing filetype information associated with suffixes. */ #ifndef AFILETYPES_H#define AFILETYPES_H#include <qdict.h>class QPixmap;struct AFileType {	QString	editor;	QString	iconname;};class AFileTypes : protected QDict<AFileType> { public:	inline static AFileTypes* get();                  // returns the singleton	inline static void        release();		QString    findApp(const QString &name);	QPixmap*   findIcon(const QString &name);	QString    createFilterFor(const QString &app);   // produces a list of suffixes supported by app private:	static AFileTypes *instance;	QDict<QPixmap> icons;	AFileTypes();	bool       load(const char *path);	void       loadIcons();	QPixmap*   getIcon(const QString &name);	AFileType* find(const QString &name);};AFileTypes* AFileTypes::get() {	if(instance == NULL)		instance= new AFileTypes;	return instance;}void AFileTypes::release() {	delete instance;	instance= NULL;}#endif // AFILETYPES_H

⌨️ 快捷键说明

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