QGroundControl
Ground Control Station for MAVLink Drones
Loading...
Searching...
No Matches
GimbalControllerSettings.cc
Go to the documentation of this file.
2
4{
5 // Setting names were changed from PascalCase to camelCase
6 // Migrate old settings to new names
7 QSettings settings;
8 settings.beginGroup(_name);
9 static const QMap<QString, QString> renamedKeys = {
10 { "EnableOnScreenControl", "enableOnScreenControl" },
11 { "ControlType", "clickAndDrag" },
12 { "CameraVFov", "cameraVFov" },
13 { "CameraHFov", "cameraHFov" },
14 { "CameraSlideSpeed", "cameraSlideSpeed" },
15 };
16 for (auto it = renamedKeys.constBegin(); it != renamedKeys.constEnd(); ++it) {
17 if (settings.contains(it.key())) {
18 settings.setValue(it.value(), settings.value(it.key()));
19 settings.remove(it.key());
20 }
21 }
22 settings.endGroup();
23}
24
30DECLARE_SETTINGSFACT(GimbalControllerSettings, showAzimuthIndicatorOnMap)
31DECLARE_SETTINGSFACT(GimbalControllerSettings, toolbarIndicatorShowAzimuth)
32DECLARE_SETTINGSFACT(GimbalControllerSettings, toolbarIndicatorShowAcquireReleaseControl)
#define DECLARE_SETTINGSFACT(CLASS, NAME)
#define DECLARE_SETTINGGROUP(NAME, GROUP)