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
31
33{
34 if (!_autoConnectPixhawkFact) {
35 _autoConnectPixhawkFact = _createSettingsFact(autoConnectPixhawkName);
36#ifdef Q_OS_IOS
37 _autoConnectPixhawkFact->setUserVisible(false);
38#endif
39 }
40 return _autoConnectPixhawkFact;
41}
42
44{
45 if (!_autoConnectSiKRadioFact) {
46 _autoConnectSiKRadioFact = _createSettingsFact(autoConnectSiKRadioName);
47#ifdef Q_OS_IOS
48 _autoConnectSiKRadioFact->setUserVisible(false);
49#endif
50 }
51 return _autoConnectSiKRadioFact;
52}
53
55{
56 if (!_autoConnectLibrePilotFact) {
57 _autoConnectLibrePilotFact = _createSettingsFact(autoConnectLibrePilotName);
58#ifdef Q_OS_IOS
59 _autoConnectLibrePilotFact->setUserVisible(false);
60#endif
61 }
62 return _autoConnectLibrePilotFact;
63}
#define DECLARE_SETTINGSFACT_NO_FUNC(CLASS, NAME)
#define DECLARE_SETTINGSFACT(CLASS, NAME)
#define DECLARE_SETTINGGROUP(NAME, GROUP)
Auto connect settings.