Commit 21b110ce authored by DonLakeFlyer's avatar DonLakeFlyer

Add showTouchAreas and showAdvancedUI

parent bad4335c
...@@ -32,6 +32,8 @@ QGroundControlQmlGlobal::QGroundControlQmlGlobal(QGCApplication* app) ...@@ -32,6 +32,8 @@ QGroundControlQmlGlobal::QGroundControlQmlGlobal(QGCApplication* app)
, _corePlugin(NULL) , _corePlugin(NULL)
, _firmwarePluginManager(NULL) , _firmwarePluginManager(NULL)
, _settingsManager(NULL) , _settingsManager(NULL)
, _showTouchAreas(false)
, _showAdvancedUI(false)
{ {
// We clear the parent on this object since we run into shutdown problems caused by hybrid qml app. Instead we let it leak on shutdown. // We clear the parent on this object since we run into shutdown problems caused by hybrid qml app. Instead we let it leak on shutdown.
setParent(NULL); setParent(NULL);
......
...@@ -73,6 +73,9 @@ public: ...@@ -73,6 +73,9 @@ public:
Q_PROPERTY(QString qgcVersion READ qgcVersion CONSTANT) Q_PROPERTY(QString qgcVersion READ qgcVersion CONSTANT)
Q_PROPERTY(bool showTouchAreas MEMBER _showTouchAreas NOTIFY showTouchAreasChanged)
Q_PROPERTY(bool showAdvancedUI MEMBER _showAdvancedUI NOTIFY showAdvancedUIChanged)
Q_INVOKABLE void saveGlobalSetting (const QString& key, const QString& value); Q_INVOKABLE void saveGlobalSetting (const QString& key, const QString& value);
Q_INVOKABLE QString loadGlobalSetting (const QString& key, const QString& defaultValue); Q_INVOKABLE QString loadGlobalSetting (const QString& key, const QString& defaultValue);
Q_INVOKABLE void saveBoolGlobalSetting (const QString& key, bool value); Q_INVOKABLE void saveBoolGlobalSetting (const QString& key, bool value);
...@@ -153,6 +156,9 @@ public: ...@@ -153,6 +156,9 @@ public:
QString qgcVersion(void) const { return qgcApp()->applicationVersion(); } QString qgcVersion(void) const { return qgcApp()->applicationVersion(); }
bool showTouchAreas(void) const { return _showTouchAreas; } ///< Show visible extents of touch areas
bool showAdvancedUI(void) const { return _showAdvancedUI; } ///< Show hidden advanced UI
// Overrides from QGCTool // Overrides from QGCTool
virtual void setToolbox(QGCToolbox* toolbox); virtual void setToolbox(QGCToolbox* toolbox);
...@@ -162,6 +168,8 @@ signals: ...@@ -162,6 +168,8 @@ signals:
void mavlinkSystemIDChanged (int id); void mavlinkSystemIDChanged (int id);
void flightMapPositionChanged (QGeoCoordinate flightMapPosition); void flightMapPositionChanged (QGeoCoordinate flightMapPosition);
void flightMapZoomChanged (double flightMapZoom); void flightMapZoomChanged (double flightMapZoom);
void showTouchAreasChanged (bool showTouchAreas);
void showAdvancedUIChanged (bool showAdvancedUI);
private: private:
FlightMapSettings* _flightMapSettings; FlightMapSettings* _flightMapSettings;
...@@ -178,6 +186,9 @@ private: ...@@ -178,6 +186,9 @@ private:
QGeoCoordinate _flightMapPosition; QGeoCoordinate _flightMapPosition;
double _flightMapZoom; double _flightMapZoom;
bool _showTouchAreas;
bool _showAdvancedUI;
}; };
#endif #endif
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment