Browse Source

feat: give credit to elevation provider

QGC4.4
leonardosimovic 2 years ago committed by Don Gagne
parent
commit
f658b74836
  1. 13
      src/PlanView/PlanView.qml
  2. 1
      src/PlanView/TerrainStatus.qml
  3. 3
      src/QmlControls/QGroundControlQmlGlobal.h
  4. 1
      src/QtLocationPlugin/QGCMapUrlEngine.cpp
  5. 1
      src/QtLocationPlugin/QGCMapUrlEngine.h

13
src/PlanView/PlanView.qml

@ -730,6 +730,19 @@ Item { @@ -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

1
src/PlanView/TerrainStatus.qml

@ -50,7 +50,6 @@ Rectangle { @@ -50,7 +50,6 @@ Rectangle {
QGCFlickable {
id: terrainProfileFlickable
//anchors.margins: _margins
anchors.top: parent.top
anchors.bottom: parent.bottom
anchors.leftMargin: titleLabel.contentHeight

3
src/QmlControls/QGroundControlQmlGlobal.h

@ -109,6 +109,8 @@ public: @@ -109,6 +109,8 @@ public:
//-------------------------------------------------------------------------
// 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 @@ public: @@ -208,6 +210,7 @@ public:
#endif
QString elevationProviderName () { return UrlFactory::kCopernicusElevationProviderKey; }
QString elevationProviderNotice () { return UrlFactory::kCopernicusElevationProviderNotice; }
bool singleFirmwareSupport ();
bool singleVehicleSupport ();

1
src/QtLocationPlugin/QGCMapUrlEngine.cpp

@ -33,6 +33,7 @@ QGC_LOGGING_CATEGORY(QGCMapUrlEngineLog, "QGCMapUrlEngineLog") @@ -33,6 +33,7 @@ QGC_LOGGING_CATEGORY(QGCMapUrlEngineLog, "QGCMapUrlEngineLog")
#include <QTimer>
const char* UrlFactory::kCopernicusElevationProviderKey = "Copernicus Elevation";
const char* UrlFactory::kCopernicusElevationProviderNotice = "© Airbus Defence and Space GmbH";
//-----------------------------------------------------------------------------
UrlFactory::UrlFactory() : _timeout(5 * 1000) {

1
src/QtLocationPlugin/QGCMapUrlEngine.h

@ -30,6 +30,7 @@ class UrlFactory : public QObject { @@ -30,6 +30,7 @@ class UrlFactory : public QObject {
Q_OBJECT
public:
static const char* kCopernicusElevationProviderKey;
static const char* kCopernicusElevationProviderNotice;
UrlFactory ();
~UrlFactory ();

Loading…
Cancel
Save