diff --git a/custom-example/src/CustomPlugin.cc b/custom-example/src/CustomPlugin.cc index 5136de975dd02621979bd2a89655cb3cc875a1ec..9008f93c5292184f0d669f95c9621ac74223ce84 100644 --- a/custom-example/src/CustomPlugin.cc +++ b/custom-example/src/CustomPlugin.cc @@ -136,9 +136,6 @@ CustomPlugin::settingsPages() if(_customSettingsList.isEmpty()) { addSettingsEntry(tr("General"), "qrc:/qml/GeneralSettings.qml", "qrc:/res/gear-white.svg"); addSettingsEntry(tr("Comm Links"), "qrc:/qml/LinkSettings.qml", "qrc:/res/waves.svg"); -#if defined(QGC_ENABLE_PAIRING) - addSettingsEntry(tr("Pairing"), "qrc:/qml/PairingSettings.qml", "qrc:/res/waves.svg"); -#endif addSettingsEntry(tr("Offline Maps"),"qrc:/qml/OfflineMap.qml", "qrc:/res/waves.svg"); #if defined(QGC_GST_MICROHARD_ENABLED) addSettingsEntry(tr("Microhard"), "qrc:/qml/MicrohardSettings.qml"); diff --git a/qgroundcontrol.qrc b/qgroundcontrol.qrc index 92a5aeaa4fbc9d65786e58ebb50c34c670c5f4b8..b1bc3f5855dc8cb7a61cd35d948cbfd8561461bf 100644 --- a/qgroundcontrol.qrc +++ b/qgroundcontrol.qrc @@ -6,7 +6,6 @@ src/ui/toolbar/ArmedIndicator.qml src/ui/toolbar/BatteryIndicator.qml src/ui/toolbar/GPSIndicator.qml - src/ui/toolbar/PairingIndicator.qml src/ui/toolbar/GPSRTKIndicator.qml src/ui/toolbar/JoystickIndicator.qml src/ui/toolbar/LinkIndicator.qml @@ -15,6 +14,7 @@ src/ui/toolbar/MessageIndicator.qml src/ui/toolbar/ModeIndicator.qml src/ui/toolbar/MultiVehicleSelector.qml + src/ui/toolbar/PairingIndicator.qml src/ui/toolbar/RCRSSIIndicator.qml src/ui/toolbar/TelemetryRSSIIndicator.qml src/ui/toolbar/VTOLModeIndicator.qml @@ -56,7 +56,6 @@ src/ui/preferences/MockLinkSettings.qml src/AutoPilotPlugins/Common/MotorComponent.qml src/QtLocationPlugin/QMLControl/OfflineMap.qml - src/PairingManager/PairingSettings.qml src/PlanView/PlanToolBar.qml src/PlanView/PlanToolBarIndicators.qml src/PlanView/PlanView.qml diff --git a/src/PairingManager/PairingSettings.qml b/src/PairingManager/PairingSettings.qml deleted file mode 100644 index b6dd12fab1ce09c09a730f6ebddecb9c567adc29..0000000000000000000000000000000000000000 --- a/src/PairingManager/PairingSettings.qml +++ /dev/null @@ -1,121 +0,0 @@ -/**************************************************************************** - * - * (c) 2019 QGROUNDCONTROL PROJECT - * - * QGroundControl is licensed according to the terms in the file - * COPYING.md in the root of the source code directory. - * - ****************************************************************************/ - - -import QtGraphicalEffects 1.0 -import QtMultimedia 5.5 -import QtQuick 2.3 -import QtQuick.Controls 1.2 -import QtQuick.Controls.Styles 1.4 -import QtQuick.Dialogs 1.2 -import QtQuick.Layouts 1.2 -import QtLocation 5.3 -import QtPositioning 5.3 - -import QGroundControl 1.0 -import QGroundControl.Controllers 1.0 -import QGroundControl.Controls 1.0 -import QGroundControl.FactControls 1.0 -import QGroundControl.FactSystem 1.0 -import QGroundControl.Palette 1.0 -import QGroundControl.ScreenTools 1.0 -import QGroundControl.SettingsManager 1.0 - -Rectangle { - id: _root - color: qgcPal.window - anchors.fill: parent - anchors.margins: ScreenTools.defaultFontPixelWidth - - property real _labelWidth: ScreenTools.defaultFontPixelWidth * 26 - property real _valueWidth: ScreenTools.defaultFontPixelWidth * 20 - property real _panelWidth: _root.width * _internalWidthRatio - - readonly property real _internalWidthRatio: 0.8 - - ExclusiveGroup { id: pairingLinkGroup } - - QGCFlickable { - clip: true - anchors.fill: parent - contentHeight: settingsColumn.height - contentWidth: settingsColumn.width - Column { - id: settingsColumn - width: _root.width - spacing: ScreenTools.defaultFontPixelHeight * 0.5 - anchors.margins: ScreenTools.defaultFontPixelWidth - Item { - width: _panelWidth - height: generalLabel.height - anchors.margins: ScreenTools.defaultFontPixelWidth - anchors.horizontalCenter: parent.horizontalCenter - QGCLabel { - id: pairingMethodsLabel - text: qsTr("Pairing methods:") - font.family: ScreenTools.demiboldFontFamily - } - } - Repeater { - id: repeater - model: QGroundControl.pairingManager.pairingLinkTypeStrings - anchors.horizontalCenter: parent.horizontalCenter - delegate: QGCButton { - width: _root.width * 0.2 - text: modelData - exclusiveGroup: pairingLinkGroup - anchors.horizontalCenter: settingsColumn.horizontalCenter - onClicked: { - checked = true - if (index === QGroundControl.pairingManager.nfcIndex) { - QGroundControl.pairingManager.startNFCScan(); - } else if (index === QGroundControl.pairingManager.microhardIndex) { - QGroundControl.pairingManager.startMicrohardPairing(); - } - } - } - } - Item { - width: _panelWidth - height: generalLabel.height - anchors.margins: ScreenTools.defaultFontPixelWidth - anchors.horizontalCenter: settingsColumn.horizontalCenter - QGCLabel { - id: generalLabel - text: QGroundControl.pairingManager.pairingStatusStr - font.family: ScreenTools.demiboldFontFamily - } - } - Item { - width: _panelWidth - height: generalLabel.height - anchors.margins: ScreenTools.defaultFontPixelWidth - anchors.horizontalCenter: settingsColumn.horizontalCenter - QGCLabel { - id: pairingsLabel - text: qsTr("Paired UAVs:") - font.family: ScreenTools.demiboldFontFamily - } - } - Repeater { - model: QGroundControl.pairingManager.pairedDeviceNameList - delegate: QGCButton { - text: modelData - width: _root.width * 0.3 - anchors.horizontalCenter: parent.horizontalCenter - exclusiveGroup: pairingLinkGroup - onClicked: { - checked = true - QGroundControl.pairingManager.connectToPairedDevice(text) - } - } - } - } - } -} diff --git a/src/api/QGCCorePlugin.cc b/src/api/QGCCorePlugin.cc index d97504dadf9998d525b12cd652801c3106882393..9da47e2d2a4a40839f4eced67950ac2ae6cd4555 100644 --- a/src/api/QGCCorePlugin.cc +++ b/src/api/QGCCorePlugin.cc @@ -42,10 +42,6 @@ public: delete pCommLinks; if(pOfflineMaps) delete pOfflineMaps; -#if defined(QGC_ENABLE_PAIRING) - if(pPairing) - delete pPairing; -#endif #if defined(QGC_GST_TAISYNC_ENABLED) if(pTaisync) delete pTaisync; @@ -76,9 +72,6 @@ public: QmlComponentInfo* pGeneral = nullptr; QmlComponentInfo* pCommLinks = nullptr; -#if defined(QGC_ENABLE_PAIRING) - QmlComponentInfo* pPairing = nullptr; -#endif QmlComponentInfo* pOfflineMaps = nullptr; #if defined(QGC_GST_TAISYNC_ENABLED) QmlComponentInfo* pTaisync = nullptr; @@ -225,12 +218,6 @@ QVariantList &QGCCorePlugin::settingsPages() QUrl::fromUserInput("qrc:/qml/LinkSettings.qml"), QUrl::fromUserInput("qrc:/res/waves.svg")); _p->settingsList.append(QVariant::fromValue(reinterpret_cast(_p->pCommLinks))); -#if defined(QGC_ENABLE_PAIRING) - _p->pPairing = new QmlComponentInfo(tr("Pairing"), - QUrl::fromUserInput("qrc:/qml/PairingSettings.qml"), - QUrl::fromUserInput("")); - _p->settingsList.append(QVariant::fromValue(reinterpret_cast(_p->pPairing))); -#endif _p->pOfflineMaps = new QmlComponentInfo(tr("Offline Maps"), QUrl::fromUserInput("qrc:/qml/OfflineMap.qml"), QUrl::fromUserInput("qrc:/res/waves.svg"));