confmgr.h

来自「Linux下的C、C++ IDE」· C头文件 代码 · 共 83 行

H
83
字号
/*   FILE: confmgr.hPROJECT: hide AUTHOR: James MartinCREATED: 9/15/2002*/#ifndef _CONFMGR_H#define _CONFMGR_H#include "portdef.h"#include <qstring.h>#include <cstdlib>class ConfMgr{protected:	virtual bool save()=0;	virtual bool load()=0;	QString m_path;public:	ConfMgr()	{		m_path = (QString) getenv("HOME") + FILE_SEP + 				".hide" + FILE_SEP + "conf" + FILE_SEP;			}	virtual ~ConfMgr() {;} };class EditorConfMgr : public ConfMgr{	QString m_FontSize;public:	EditorConfMgr()	{		m_FontSize = "";		m_path += "editor";	}	virtual ~EditorConfMgr() {;}	virtual bool save();	virtual bool load();	void setFontSize(int fs) { m_FontSize.setNum(fs); }	int getFontSize() { return m_FontSize.toInt(); }};class GlobalConfMgr : public ConfMgr{	QString m_LastProj;	bool m_bOpenLastProj;public:	GlobalConfMgr()	{		m_LastProj 		= "";		m_bOpenLastProj 	= false;		m_path += "global";	}	virtual ~GlobalConfMgr() {;}	virtual bool save();	virtual bool load();	void setLastProj(const char *path) { m_LastProj = path; }	QString getLastProj() { return m_LastProj; }	void setOpenLastProj(bool bOpen) { m_bOpenLastProj = bOpen; }	bool canOpenLastProj() { return m_bOpenLastProj; }};#endif

⌨️ 快捷键说明

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