Create your Gitee Account
Explore and code with more than 6 million developers,Free private repositories !:)
Sign up
Clone or download
ejconfig.h 1.21 KB
Copy Edit Web IDE Raw Blame History
unix_chen authored 2018-03-26 07:59 . init
#ifndef EJCONFIG_H
#define EJCONFIG_H
#include <QXmlStreamReader>
#include <QVector>
#include <QList>
#include <QMap>
struct EJAttr
QString name = "";
QString value = "";
EJAttr(const QString &attName, const QString &attValue):name(attName), value(attValue){}
struct EJModule
QString key = "";
QString value = "";
QMap<QString, QString> attr;
QList<EJModule *> child;
class EJConfig
bool open(const QString &name);
QMap<QString, QString>&getAttr(const QStringList &lable);
QStringList getAttr(const QStringList &lable, const QString &subLable, const QString &attrName);
QStringList getValue(const QStringList &lable, const QString &subLable);
bool addAttr(const QStringList &lable, const QString &attrName, const QString &attrValue);
bool setValue(const QStringList &lable, const QStringList &subLable, const QStringList &subValue);
void parse();
void write();
QXmlStreamReader m_xml;
QString m_file;
EJModule m_moudle;
#endif // EJCONFIG_H

Comment ( 0 )

Sign in for post a comment