QGroundControl
Ground Control Station for MAVLink Drones
Loading...
Searching...
No Matches
AutoConnectSettings.cc
Go to the documentation of this file.
2#include "LinkManager.h"
3
4DECLARE_SETTINGGROUP(AutoConnect, "AutoConnect")
5{
6 // Settings group name was changed from "LinkManager" to "AutoConnect" in v5.0.0
7 // Copy over an old settings to the new name
8 QSettings settings;
9 static const char* deprecatedGroupName = "LinkManager";
10 if (settings.childGroups().contains(deprecatedGroupName)) {
11 settings.beginGroup(deprecatedGroupName);
12 QList<QPair<QString, QVariant>> values;
13 for (const QString& key: settings.childKeys()) {
14 values.append(QPair<QString, QVariant>(key, settings.value(key)));
15 }
16 settings.endGroup();
17 settings.remove(deprecatedGroupName);
18
19 settings.beginGroup(_name);
20 for (const QPair<QString, QVariant>& pair: values) {
21 settings.setValue(pair.first, pair.second);
22 }
23 settings.endGroup();
24 }
25}
26
32
34{
35 if (!_autoConnectPixhawkFact) {
36 _autoConnectPixhawkFact = _createSettingsFact(autoConnectPixhawkName);
37#ifdef Q_OS_IOS
38 _autoConnectPixhawkFact->setVisible(false);
39#endif
40 }
41 return _autoConnectPixhawkFact;
42}
43
45{
46 if (!_autoConnectSiKRadioFact) {
47 _autoConnectSiKRadioFact = _createSettingsFact(autoConnectSiKRadioName);
48#ifdef Q_OS_IOS
49 _autoConnectSiKRadioFact->setVisible(false);
50#endif
51 }
52 return _autoConnectSiKRadioFact;
53}
54
56{
57 if (!_autoConnectRTKGPSFact) {
58 _autoConnectRTKGPSFact = _createSettingsFact(autoConnectRTKGPSName);
59#ifdef Q_OS_IOS
60 _autoConnectRTKGPSFact->setVisible(false);
61#endif
62 }
63 return _autoConnectRTKGPSFact;
64}
65
67{
68 if (!_autoConnectLibrePilotFact) {
69 _autoConnectLibrePilotFact = _createSettingsFact(autoConnectLibrePilotName);
70#ifdef Q_OS_IOS
71 _autoConnectLibrePilotFact->setVisible(false);
72#endif
73 }
74 return _autoConnectLibrePilotFact;
75}
76
78{
79 if (!_autoConnectNmeaPortFact) {
80 _autoConnectNmeaPortFact = _createSettingsFact(autoConnectNmeaPortName);
81#ifdef Q_OS_IOS
82 _autoConnectNmeaPortFact->setVisible(false);
83#endif
84 }
85 return _autoConnectNmeaPortFact;
86}
87
89{
90 if (!_autoConnectNmeaBaudFact) {
91 _autoConnectNmeaBaudFact = _createSettingsFact(autoConnectNmeaBaudName);
92#ifdef Q_OS_IOS
93 _autoConnectNmeaBaudFact->setVisible(false);
94#endif
95 }
96 return _autoConnectNmeaBaudFact;
97}
98
100{
101 if (!_autoConnectZeroConfFact) {
102 _autoConnectZeroConfFact = _createSettingsFact(autoConnectZeroConfName);
103#ifdef Q_OS_IOS
104 _autoConnectZeroConfFact->setVisible(false);
105#endif
106 }
107 return _autoConnectZeroConfFact;
108}
#define DECLARE_SETTINGSFACT_NO_FUNC(CLASS, NAME)
#define DECLARE_SETTINGSFACT(CLASS, NAME)
#define DECLARE_SETTINGGROUP(NAME, GROUP)