1 Star 0 Fork 10

return0 / qtbase

forked from TKG / QtBase 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
app_config_setting.h 871 Bytes
一键复制 编辑 原始数据 按行查看 历史
golei 提交于 2018-08-08 21:06 . #
#ifndef APP_CONFIG_SETTING_H
#define APP_CONFIG_SETTING_H
#include <QSettings>
#include <QApplication>
class AppConfigSetting
{
private:
QSettings *settings;
public:
static AppConfigSetting &instance()
{
static AppConfigSetting instance;
return instance;
}
void set(const QString &key, const QVariant &value);
QVariant get(const QString &key, const QVariant &defaultValue= QVariant()) const ;
void remove(const QString &key);
bool contains(const QString &key);
AppConfigSetting(AppConfigSetting const &) = delete;
AppConfigSetting(AppConfigSetting &&) = delete;
AppConfigSetting &operator=(AppConfigSetting const &) = delete;
AppConfigSetting &operator=(AppConfigSetting &&) = delete;
virtual ~AppConfigSetting();
protected:
explicit AppConfigSetting();
};
#endif // APP_CONFIG_SETTING_H
C++
1
https://gitee.com/zengfanbin/base.git
git@gitee.com:zengfanbin/base.git
zengfanbin
base
qtbase
master

搜索帮助

53164aa7 5694891 3bd8fe86 5694891