#ifndef READJSONSRC_H #define READJSONSRC_H #include #include class ReadJsonSrc { public: ReadJsonSrc(QString filePath); struct Fields{ QString name; QString id; QString type; QString src; QString defaultVal; Fields(QString fname,QString fid,QString ftype,QString fsrc,QString fval): name(fname),id(fid),type(ftype),src(fsrc),defaultVal(fval){} }; struct Template{ QString name; QString id; QVector fields; Template(QString tempName,QString tempId):name(tempName),id(tempId){} }; QMap> templateMap; //读取json配置文件内容并存数据 void readJsonObj(QJsonObject obj); //读取模板内容 QVector