Physics Simulation & Visualization Tool 0.1
A C++ physics simulation engine with real-time 3D visualization
Loading...
Searching...
No Matches
DebugSettings.cpp
Go to the documentation of this file.
1#include "DebugSettings.h"
2
3namespace {
4constexpr auto kDebugGroup = "debug";
5constexpr auto kShowAllPathTrailsKey = "showAllPathTrails";
6constexpr auto kPathTrailTimeKey = "pathTrailTime";
7constexpr auto kShowForcesKey = "showForces";
8constexpr auto kShowCollidersKey = "showColliders";
9constexpr auto kShowObjectLabelsKey = "showObjectLabels";
10}
11
12void DebugSettings::load(QSettings& settings) {
13 settings.beginGroup(kDebugGroup);
14 showAllPathTrails = settings.value(kShowAllPathTrailsKey, showAllPathTrails).toBool();
15 pathTrailTime = settings.value(kPathTrailTimeKey, pathTrailTime).toFloat();
16 showForces = settings.value(kShowForcesKey, showForces).toBool();
17 showColliders = settings.value(kShowCollidersKey, showColliders).toBool();
18 showObjectLabels = settings.value(kShowObjectLabelsKey, showObjectLabels).toBool();
19 settings.endGroup();
20}
21
22void DebugSettings::save(QSettings& settings) const {
23 settings.beginGroup(kDebugGroup);
24 settings.setValue(kShowAllPathTrailsKey, showAllPathTrails);
25 settings.setValue(kPathTrailTimeKey, pathTrailTime);
26 settings.setValue(kShowForcesKey, showForces);
27 settings.setValue(kShowCollidersKey, showColliders);
28 settings.setValue(kShowObjectLabelsKey, showObjectLabels);
29 settings.endGroup();
30}
bool showAllPathTrails
void save(QSettings &settings) const override
bool showObjectLabels
void load(QSettings &settings) override
float pathTrailTime