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
3
namespace
{
4
constexpr
auto
kDebugGroup =
"debug"
;
5
constexpr
auto
kShowAllPathTrailsKey =
"showAllPathTrails"
;
6
constexpr
auto
kPathTrailTimeKey =
"pathTrailTime"
;
7
constexpr
auto
kShowForcesKey =
"showForces"
;
8
constexpr
auto
kShowCollidersKey =
"showColliders"
;
9
constexpr
auto
kShowObjectLabelsKey =
"showObjectLabels"
;
10
}
11
12
void
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
22
void
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
}
DebugSettings.h
DebugSettings::showColliders
bool showColliders
Definition
DebugSettings.h:8
DebugSettings::showAllPathTrails
bool showAllPathTrails
Definition
DebugSettings.h:5
DebugSettings::save
void save(QSettings &settings) const override
Definition
DebugSettings.cpp:22
DebugSettings::showObjectLabels
bool showObjectLabels
Definition
DebugSettings.h:9
DebugSettings::load
void load(QSettings &settings) override
Definition
DebugSettings.cpp:12
DebugSettings::pathTrailTime
float pathTrailTime
Definition
DebugSettings.h:6
DebugSettings::showForces
bool showForces
Definition
DebugSettings.h:7
src
ui
settings
DebugSettings.cpp
Generated by
1.9.8