添加了手动生成csv功能,防止软件崩溃,无法生成记录

This commit is contained in:
hm
2021-02-02 17:33:08 +08:00
parent 77c805a14b
commit c42a531fe2
12 changed files with 285 additions and 175 deletions
+19 -3
View File
@@ -63,7 +63,7 @@ void Config::loadJson(const QString& jsonFilename)
*/
qDebug() << ConfigJson;
//qDebug() << ConfigJson;
}
@@ -228,7 +228,7 @@ void Config::setHeartBeat(QVariant state,QVariant frq)
void Config::getMapType(QVariant *type)
{
QJsonObject obj = getJsonObject("GlobalSetting");
QJsonObject obj = getJsonObject("Map");
*type = obj.value("MapType").toString();
}
@@ -239,5 +239,21 @@ void Config::setMapType(QVariant type)
obj["MapType"] = type.toString();
setJsonObject("GlobalSetting",obj);
setJsonObject("Map",obj);
}
void Config::getBeep(QVariant *value)
{
QJsonObject obj = getJsonObject("Warnning");
*value = obj.value("Beep").toBool();
}
void Config::setBeep(QVariant value)
{
QJsonObject obj;
obj["Beep"] = value.toBool();
setJsonObject("Warnning",obj);
}