diff --git a/src/PlanView/PlanView.qml b/src/PlanView/PlanView.qml index a96928cb675..98ad6ff497a 100644 --- a/src/PlanView/PlanView.qml +++ b/src/PlanView/PlanView.qml @@ -730,6 +730,19 @@ Item { } } + QGCLabel { + // Elevation provider notice on top of terrain plot + readonly property string _licenseString: QGroundControl.elevationProviderNotice + + id: licenseLabel + visible: terrainStatus.visible && _licenseString !== "" + anchors.bottom: terrainStatus.top + anchors.horizontalCenter: terrainStatus.horizontalCenter + anchors.bottomMargin: ScreenTools.defaultFontPixelWidth * 0.5 + font.pointSize: ScreenTools.smallFontPointSize + text: qsTr("Powered by %1").arg(_licenseString) + } + TerrainStatus { id: terrainStatus anchors.margins: _toolsMargin diff --git a/src/PlanView/TerrainStatus.qml b/src/PlanView/TerrainStatus.qml index 51f11099816..fe3418de085 100644 --- a/src/PlanView/TerrainStatus.qml +++ b/src/PlanView/TerrainStatus.qml @@ -50,7 +50,6 @@ Rectangle { QGCFlickable { id: terrainProfileFlickable - //anchors.margins: _margins anchors.top: parent.top anchors.bottom: parent.bottom anchors.leftMargin: titleLabel.contentHeight diff --git a/src/QmlControls/QGroundControlQmlGlobal.h b/src/QmlControls/QGroundControlQmlGlobal.h index ff17e4452d0..1a54275ad93 100644 --- a/src/QmlControls/QGroundControlQmlGlobal.h +++ b/src/QmlControls/QGroundControlQmlGlobal.h @@ -109,6 +109,8 @@ class QGroundControlQmlGlobal : public QGCTool //------------------------------------------------------------------------- // Elevation Provider Q_PROPERTY(QString elevationProviderName READ elevationProviderName CONSTANT) + Q_PROPERTY(QString elevationProviderNotice READ elevationProviderNotice CONSTANT) + #if defined(QGC_ENABLE_PAIRING) Q_PROPERTY(PairingManager* pairingManager READ pairingManager CONSTANT) @@ -208,6 +210,7 @@ class QGroundControlQmlGlobal : public QGCTool #endif QString elevationProviderName () { return UrlFactory::kCopernicusElevationProviderKey; } + QString elevationProviderNotice () { return UrlFactory::kCopernicusElevationProviderNotice; } bool singleFirmwareSupport (); bool singleVehicleSupport (); diff --git a/src/QtLocationPlugin/QGCMapUrlEngine.cpp b/src/QtLocationPlugin/QGCMapUrlEngine.cpp index 4ee56bdf87a..7f4cbfd02b5 100644 --- a/src/QtLocationPlugin/QGCMapUrlEngine.cpp +++ b/src/QtLocationPlugin/QGCMapUrlEngine.cpp @@ -33,6 +33,7 @@ QGC_LOGGING_CATEGORY(QGCMapUrlEngineLog, "QGCMapUrlEngineLog") #include const char* UrlFactory::kCopernicusElevationProviderKey = "Copernicus Elevation"; +const char* UrlFactory::kCopernicusElevationProviderNotice = "© Airbus Defence and Space GmbH"; //----------------------------------------------------------------------------- UrlFactory::UrlFactory() : _timeout(5 * 1000) { @@ -73,7 +74,7 @@ UrlFactory::UrlFactory() : _timeout(5 * 1000) { //_providersTable["MapQuest Map"] = new MapQuestMapMapProvider(this); //_providersTable["MapQuest Sat"] = new MapQuestSatMapProvider(this); - + _providersTable["VWorld Street Map"] = new VWorldStreetMapProvider(this); _providersTable["VWorld Satellite Map"] = new VWorldSatMapProvider(this); @@ -84,9 +85,9 @@ UrlFactory::UrlFactory() : _timeout(5 * 1000) { _providersTable["Japan-GSI Anaglyph"] = new JapanAnaglyphMapProvider(this); _providersTable["Japan-GSI Slope"] = new JapanSlopeMapProvider(this); _providersTable["Japan-GSI Relief"] = new JapanReliefMapProvider(this); - + _providersTable["LINZ Basemap"] = new LINZBasemapMapProvider(this); - + _providersTable["CustomURL Custom"] = new CustomURLMapProvider(this); } @@ -142,7 +143,7 @@ QNetworkRequest UrlFactory::getTileURL(const QString& type, int x, int y, int zo quint32 UrlFactory::averageSizeForType(const QString& type) { if (_providersTable.find(type) != _providersTable.end()) { return _providersTable[type]->getAverageSize(); - } + } qCDebug(QGCMapUrlEngineLog) << "UrlFactory::averageSizeForType " << type << " Not registered"; diff --git a/src/QtLocationPlugin/QGCMapUrlEngine.h b/src/QtLocationPlugin/QGCMapUrlEngine.h index b43301b0dc4..8d3535c84ac 100644 --- a/src/QtLocationPlugin/QGCMapUrlEngine.h +++ b/src/QtLocationPlugin/QGCMapUrlEngine.h @@ -30,6 +30,7 @@ class UrlFactory : public QObject { Q_OBJECT public: static const char* kCopernicusElevationProviderKey; + static const char* kCopernicusElevationProviderNotice; UrlFactory (); ~UrlFactory ();