- bool changed = false;
- s.beginGroup(graphId+graphSettingsGroupSuffix);
-
- if (!s.contains(goalWeightEnabledKey)) {
- s.setValue(goalWeightEnabledKey, false);
- changed = true;
- }
- ret.goalWeightEnabled = s.value(goalWeightEnabledKey).toBool();
-
- if (!s.contains(weightIntervalModeKey)) {
- s.setValue(weightIntervalModeKey, (int)GraphSettings::AutomaticWithoutGoalWeight);
- changed = true;
- }
- ret.weightIntervalMode =
- (GraphSettings::WeightIntervalMode)s.value(weightIntervalModeKey).toInt();
-
- if (!s.contains(weightIntervalMinKey)) {
- s.setValue(weightIntervalMinKey, 0.0);
- changed = true;
- }
- ret.weightIntervalMin = s.value(weightIntervalMinKey).toDouble();
-
- if (!s.contains(weightIntervalMaxKey)) {
- s.setValue(weightIntervalMaxKey, 0.0);
- changed = true;
- }
- ret.weightIntervalMax = s.value(weightIntervalMaxKey).toDouble();
-
- if (!s.contains(defaultTimeIntervalKey)) {
- s.setValue(defaultTimeIntervalKey, 0);
- changed = true;
- }
- ret.defaultTimeInterval = s.value(defaultTimeIntervalKey).toInt();