Code Monkey home page Code Monkey logo

nconfig's Introduction

配置操作组件库使用说明

作者: daodaoliang
时间: 2016年7月27日
版本: 1.0.5.0
邮箱: [email protected]

[TOC]

1. 如何添加项目

  • 首先拷贝源码到你的工程文件目录;
  • 在你的项目 pro文件中添加:
# import dll
win32: LIBS += -L$$PWD/../bin/ -lNConfig
DEPENDPATH += $$PWD/../bin

# import dll file
include($$PWD/../NConfig/NConfig_inc.pri)

** 具体的路径请按照你的项目情况进行修改**

2. 如何使用项目

  • 初始化配置实例
# 不存在则创建配置库时的初始化
NConfig::instance()->installAndInit("./test.conf", "daodaoliang", false);

# 使用已经存在的配置库的初始化
NConfig::instance()->installAndInit("./test.conf", "daodaoliang");
  • 添加配置项内容
NConfig::instance()->addConfigItem("nami","233333","MissU");
  • 获取配置项内容
QString tempValue;
NConfig::instance()->getConfigItem("nami","233333",tempValue);
  • 清空配置项内容
NConfig::instance()->clearConfig();
  • 导出为ini类型的配置文件
NConfig::instance()->exportConfigToFile();
  • 从ini类型的配置文件导入到配置库
NConfig::instance()->importConfigFromFile("./test.ini");

3. 组件路线图

  • 增加配置库文件的导出为ini文件;
  • 增加从ini文件导入为配置库文件;

4. changelog

  • V 1.0.1.0 集成第三方加密sqlite库进行初始化项目;
  • V 1.0.2.0 增加接口封装,实现初始化实例接口,增加项目配置接口,获取配置项目接口,清空配置接口,并编写测试用例;
  • V 1.0.3.0 增加导出为ini文件的接口;
  • V 1.0.4.0 增加从ini文件导入的接口;
  • V 1.0.5.0 增加应用程序调用配置库的方法;

nconfig's People

Contributors

daodaoliang avatar

Watchers

 avatar  avatar

Forkers

markkun

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.