| 39 | } |
| 40 | |
| 41 | bool SettingMetaInt::Load(const QJsonObject& json_setting) { |
| 42 | this->default_value = ReadIntValue(json_setting, "default"); |
| 43 | if (json_setting.value("range") != QJsonValue::Undefined) { |
| 44 | const QJsonObject& json_setting_range = ReadObject(json_setting, "range"); |
| 45 | if (json_setting_range.value("min") != QJsonValue::Undefined) { |
| 46 | this->min_value = ReadIntValue(json_setting_range, "min"); |
| 47 | } |
| 48 | if (json_setting_range.value("max") != QJsonValue::Undefined) { |
| 49 | this->max_value = ReadIntValue(json_setting_range, "max"); |
| 50 | } |
| 51 | } |
| 52 | if (json_setting.value("unit") != QJsonValue::Undefined) { |
| 53 | this->unit = ReadStringValue(json_setting, "unit"); |
| 54 | } |
| 55 | |
| 56 | return true; |
| 57 | } |
| 58 | |
| 59 | std::string SettingMetaInt::Export(ExportMode export_mode) const { |
| 60 | (void)export_mode; |
nothing calls this directly
no test coverage detected