⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 zconfig.h

📁 motorola E680I的EZK SDK.
💻 H
字号:
/**********************************************************************
 * Unofficial EZX Native Software Development Kit
 * Copyright (C) 2007 SigarRon.China. <sigarron@163.com>
 *
 * Created by sigarron.2007-06-13.
 * Updated by sigarron.2007-07-29. *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License as
 * published by the Free Software Foundation; either version 2.1 of
 * the License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * General Public License for more details.
 *
 * Further, this software is distributed without any warranty that it is
 * free of the rightful claim of any third person regarding infringement
 * or the like.  Any license provided herein, whether implied or
 * otherwise, applies only to this software file.  Patent licenses, if
 * any, provided herein do not apply to combinations of this program with
 * other software, or any other product whatsoever.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software Foundation,
 * Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 *
 **********************************************************************/

#ifndef CONFIG_H
#define CONFIG_H

#include <qmap.h>
#include <qstringlist.h>
class ZConfig
{
public:
	void clearGroup(QString const &groupname);
	void writeEntry(QString const &groupname, QString const &key, bool value);
	void writeEntry(QString const &groupname, QString const &key, double value);
	void writeEntry(QString const &groupname, QString const &key, int value);
	void writeEntry(QString const &groupname, QString const &key, unsigned value);
	void writeEntry(QString const &groupname, QString const &key, char* value);
	void writeEntry(QString const &groupname, QString const &key, const QStringList &lst, const QChar &sep);
	void writeEntry(QString const &groupname, QString const &key, QString const& value);
	
	void removeEntry(QString const &groupname, const QString &key);
	
	int readNumEntry(QString const &groupname, QString const &key, int deflt);
	bool readBoolEntry(QString const &groupname, QString const &key, bool deflt);
	QStringList readListEntry(QString const &groupname, QString const &key , QChar const &deflt);
	unsigned int readUIntEntry(QString const &groupname, QString const &key, unsigned deflt);
	QString readEntryDirect(QString const &groupname, QString const &key, QString const &deflt);
	QString readEntry(QString const &groupname, QString const &key, QString const &deflt);
			
	QString getSettingDirectory();
	void initSettingDirectory();
	//QStringList getGroupEntriesKeyList(QString const&);

	void read();
	void flush();
	void write(QString const &fn = QString::null);
		
	void setGroup(QString const &groupname);
		
	void parseLine(QString const&);
		
	ZConfig(QString const&, bool isFile);
	~ZConfig();
};
#endif

⌨️ 快捷键说明

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