Commit 1db98986 authored by Don Gagne's avatar Don Gagne Committed by GitHub

Merge pull request #4837 from DonLakeFlyer/Changes

CorePlugin changes
parents 3aa17885 9ef14717
......@@ -89,6 +89,7 @@ QGCView {
coordinate.longitude = coordinate.longitude.toFixed(_decimalPlaces)
coordinate.altitude = coordinate.altitude.toFixed(_decimalPlaces)
var sequenceNumber = missionController.insertComplexMissionItem(complexItemName, coordinate, missionController.visualItems.count)
setCurrentItem(sequenceNumber)
}
property bool _firstMissionLoadComplete: false
......
......@@ -34,7 +34,7 @@ class VehicleComponent : public QObject
Q_PROPERTY(bool requiresSetup READ requiresSetup CONSTANT)
Q_PROPERTY(bool setupComplete READ setupComplete STORED false NOTIFY setupCompleteChanged)
Q_PROPERTY(QString iconResource READ iconResource CONSTANT)
Q_PROPERTY(QUrl setupSource READ setupSource CONSTANT)
Q_PROPERTY(QUrl setupSource READ setupSource NOTIFY setupSourceChanged)
Q_PROPERTY(QUrl summaryQmlSource READ summaryQmlSource CONSTANT)
Q_PROPERTY(bool allowSetupWhileArmed READ allowSetupWhileArmed CONSTANT)
......@@ -65,6 +65,7 @@ public:
signals:
void setupCompleteChanged(bool setupComplete);
void setupSourceChanged(void);
protected slots:
void _triggerUpdated(QVariant value);
......
......@@ -39,6 +39,7 @@ public:
Q_PROPERTY(bool showTouchAreas READ showTouchAreas WRITE setShowTouchAreas NOTIFY showTouchAreasChanged)
Q_PROPERTY(bool showAdvancedUI READ showAdvancedUI WRITE setShowAdvancedUI NOTIFY showAdvancedUIChanged)
Q_PROPERTY(QString showAdvancedUIMessage READ showAdvancedUIMessage CONSTANT)
Q_PROPERTY(QString brandImageIndoor READ brandImageIndoor CONSTANT)
Q_PROPERTY(QString brandImageOutdoor READ brandImageOutdoor CONSTANT)
......@@ -71,6 +72,10 @@ public:
/// Return the resource file which contains the brand image for for Outdoor theme.
virtual QString brandImageOutdoor(void) const { return QString(); }
/// @return The message to show to the user when they a re prompted to confirm turning on advanced ui.
virtual QString showAdvancedUIMessage(void) const { return tr("WARNING: You are about to enter Advanced Mode. This may expose features which may cause your vehicle to malfunction. "
"You should do so only if instructed by customer support. Are you sure you want to enable Advanced Mode?"); }
bool showTouchAreas(void) const { return _showTouchAreas; }
bool showAdvancedUI(void) const { return _showAdvancedUI; }
void setShowTouchAreas(bool show);
......
......@@ -7,10 +7,10 @@
*
****************************************************************************/
import QtQuick 2.3
import QtQuick.Controls 1.2
import QtQuick.Layouts 1.2
import QtQuick.Dialogs 1.2
import QGroundControl 1.0
import QGroundControl.Controls 1.0
......@@ -19,20 +19,19 @@ import QGroundControl.ScreenTools 1.0
import QGroundControl.Palette 1.0
Item {
property var _activeVehicle: QGroundControl.multiVehicleManager.activeVehicle
property bool _communicationLost: _activeVehicle ? _activeVehicle.connectionLost : false
property var _activeVehicle: QGroundControl.multiVehicleManager.activeVehicle
property bool _communicationLost: _activeVehicle ? _activeVehicle.connectionLost : false
QGCPalette { id: qgcPal }
// Easter egg mechanism
MouseArea {
anchors.fill: parent
onClicked: {
console.log("easter egg click", ++_clickCount)
_clickCount++
eggTimer.restart()
if (_clickCount == 5) {
QGroundControl.corePlugin.showAdvancedUI = true
if (_clickCount == 5 && !QGroundControl.corePlugin.showAdvancedUI) {
advancedModeConfirmation.visible = true
} else if (_clickCount == 7) {
QGroundControl.corePlugin.showTouchAreas = true
}
......@@ -45,6 +44,18 @@ Item {
interval: 1000
onTriggered: parent._clickCount = 0
}
MessageDialog {
id: advancedModeConfirmation
title: qsTr("Advanced Mode")
text: QGroundControl.corePlugin.showAdvancedUIMessage
standardButtons: StandardButton.Yes | StandardButton.No
onYes: {
QGroundControl.corePlugin.showAdvancedUI = true
visible = false
}
}
}
QGCLabel {
......
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