Unverified Commit 8cdaa3c2 authored by Don Gagne's avatar Don Gagne Committed by GitHub

Merge pull request #8976 from DonLakeFlyer/TelemetryValueBar

Fly: Telemetry value bar
parents f62c8640 b0d48d47
...@@ -55,14 +55,6 @@ RESOURCES += \ ...@@ -55,14 +55,6 @@ RESOURCES += \
QML_IMPORT_PATH += \ QML_IMPORT_PATH += \
$$PWD/res $$PWD/res
LinuxBuild {
# Our QT_INSTALL_LIBS
QT_LIB_LIST += \
libQt5VirtualKeyboard.so.5 \
}
# Our own, custom sources # Our own, custom sources
SOURCES += \ SOURCES += \
$$PWD/src/CustomPlugin.cc \ $$PWD/src/CustomPlugin.cc \
......
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
<file alias="gear-black.svg">../resources/gear-black.svg</file> <file alias="gear-black.svg">../resources/gear-black.svg</file>
<file alias="gear-white.svg">../resources/gear-white.svg</file> <file alias="gear-white.svg">../resources/gear-white.svg</file>
<file alias="helicoptericon.svg">../resources/helicoptericon.svg</file> <file alias="helicoptericon.svg">../resources/helicoptericon.svg</file>
<file alias="BingNoTileBytes.dat">../resources/BingNoTileBytes.dat</file>
<file alias="JoystickBezel.png">../resources/JoystickBezel.png</file> <file alias="JoystickBezel.png">../resources/JoystickBezel.png</file>
<file alias="JoystickBezelLight.png">../resources/JoystickBezelLight.png</file> <file alias="JoystickBezelLight.png">../resources/JoystickBezelLight.png</file>
<file alias="land.svg">../resources/land.svg</file> <file alias="land.svg">../resources/land.svg</file>
......
...@@ -9,7 +9,6 @@ ...@@ -9,7 +9,6 @@
<file alias="GPSRTKIndicator.qml">../src/ui/toolbar/GPSRTKIndicator.qml</file> <file alias="GPSRTKIndicator.qml">../src/ui/toolbar/GPSRTKIndicator.qml</file>
<file alias="JoystickIndicator.qml">../src/ui/toolbar/JoystickIndicator.qml</file> <file alias="JoystickIndicator.qml">../src/ui/toolbar/JoystickIndicator.qml</file>
<file alias="LinkIndicator.qml">../src/ui/toolbar/LinkIndicator.qml</file> <file alias="LinkIndicator.qml">../src/ui/toolbar/LinkIndicator.qml</file>
<file alias="MainToolBar.qml">../src/ui/toolbar/MainToolBar.qml</file>
<file alias="MainToolBarIndicators.qml">../src/ui/toolbar/MainToolBarIndicators.qml</file> <file alias="MainToolBarIndicators.qml">../src/ui/toolbar/MainToolBarIndicators.qml</file>
<file alias="MessageIndicator.qml">../src/ui/toolbar/MessageIndicator.qml</file> <file alias="MessageIndicator.qml">../src/ui/toolbar/MessageIndicator.qml</file>
<file alias="ModeIndicator.qml">../src/ui/toolbar/ModeIndicator.qml</file> <file alias="ModeIndicator.qml">../src/ui/toolbar/ModeIndicator.qml</file>
...@@ -50,7 +49,6 @@ ...@@ -50,7 +49,6 @@
<file alias="FWLandingPatternEditor.qml">../src/PlanView/FWLandingPatternEditor.qml</file> <file alias="FWLandingPatternEditor.qml">../src/PlanView/FWLandingPatternEditor.qml</file>
<file alias="GeneralSettings.qml">../src/ui/preferences/GeneralSettings.qml</file> <file alias="GeneralSettings.qml">../src/ui/preferences/GeneralSettings.qml</file>
<file alias="GeoTagPage.qml">../src/AnalyzeView/GeoTagPage.qml</file> <file alias="GeoTagPage.qml">../src/AnalyzeView/GeoTagPage.qml</file>
<file alias="HealthPageWidget.qml">../src/FlightMap/Widgets/HealthPageWidget.qml</file>
<file alias="HelpSettings.qml">../src/ui/preferences/HelpSettings.qml</file> <file alias="HelpSettings.qml">../src/ui/preferences/HelpSettings.qml</file>
<file alias="JoystickConfig.qml">../src/VehicleSetup/JoystickConfig.qml</file> <file alias="JoystickConfig.qml">../src/VehicleSetup/JoystickConfig.qml</file>
<file alias="JoystickConfigAdvanced.qml">../src/VehicleSetup/JoystickConfigAdvanced.qml</file> <file alias="JoystickConfigAdvanced.qml">../src/VehicleSetup/JoystickConfigAdvanced.qml</file>
...@@ -65,6 +63,7 @@ ...@@ -65,6 +63,7 @@
<file alias="MAVLinkInspectorPage.qml">../src/AnalyzeView/MAVLinkInspectorPage.qml</file> <file alias="MAVLinkInspectorPage.qml">../src/AnalyzeView/MAVLinkInspectorPage.qml</file>
<file alias="MavlinkSettings.qml">../src/ui/preferences/MavlinkSettings.qml</file> <file alias="MavlinkSettings.qml">../src/ui/preferences/MavlinkSettings.qml</file>
<file alias="MicrohardSettings.qml">../src/Microhard/MicrohardSettings.qml</file> <file alias="MicrohardSettings.qml">../src/Microhard/MicrohardSettings.qml</file>
<file alias="MissionCommandTreeEditorTestWindow.qml">../src/MissionManager/MissionCommandTreeEditorTestWindow.qml</file>
<file alias="MissionSettingsEditor.qml">../src/PlanView/MissionSettingsEditor.qml</file> <file alias="MissionSettingsEditor.qml">../src/PlanView/MissionSettingsEditor.qml</file>
<file alias="MockLink.qml">../src/ui/preferences/MockLink.qml</file> <file alias="MockLink.qml">../src/ui/preferences/MockLink.qml</file>
<file alias="MockLinkSettings.qml">../src/ui/preferences/MockLinkSettings.qml</file> <file alias="MockLinkSettings.qml">../src/ui/preferences/MockLinkSettings.qml</file>
...@@ -77,7 +76,6 @@ ...@@ -77,7 +76,6 @@
<file alias="PX4FlowSensor.qml">../src/VehicleSetup/PX4FlowSensor.qml</file> <file alias="PX4FlowSensor.qml">../src/VehicleSetup/PX4FlowSensor.qml</file>
<file alias="QGCInstrumentWidget.qml">../src/FlightMap/Widgets/QGCInstrumentWidget.qml</file> <file alias="QGCInstrumentWidget.qml">../src/FlightMap/Widgets/QGCInstrumentWidget.qml</file>
<file alias="QGCInstrumentWidgetAlternate.qml">../src/FlightMap/Widgets/QGCInstrumentWidgetAlternate.qml</file> <file alias="QGCInstrumentWidgetAlternate.qml">../src/FlightMap/Widgets/QGCInstrumentWidgetAlternate.qml</file>
<file alias="QGCViewDialogContainer.qml">../src/QmlControls/QGCViewDialogContainer.qml</file>
<file alias="QGroundControl/Controls/AnalyzePage.qml">../src/AnalyzeView/AnalyzePage.qml</file> <file alias="QGroundControl/Controls/AnalyzePage.qml">../src/AnalyzeView/AnalyzePage.qml</file>
<file alias="QGroundControl/Controls/AppMessages.qml">../src/QmlControls/AppMessages.qml</file> <file alias="QGroundControl/Controls/AppMessages.qml">../src/QmlControls/AppMessages.qml</file>
<file alias="QGroundControl/Controls/AxisMonitor.qml">../src/QmlControls/AxisMonitor.qml</file> <file alias="QGroundControl/Controls/AxisMonitor.qml">../src/QmlControls/AxisMonitor.qml</file>
...@@ -107,6 +105,8 @@ ...@@ -107,6 +105,8 @@
<file alias="QGroundControl/Controls/JoystickThumbPad.qml">../src/QmlControls/JoystickThumbPad.qml</file> <file alias="QGroundControl/Controls/JoystickThumbPad.qml">../src/QmlControls/JoystickThumbPad.qml</file>
<file alias="QGroundControl/Controls/KMLOrSHPFileDialog.qml">../src/QmlControls/KMLOrSHPFileDialog.qml</file> <file alias="QGroundControl/Controls/KMLOrSHPFileDialog.qml">../src/QmlControls/KMLOrSHPFileDialog.qml</file>
<file alias="QGroundControl/Controls/LogReplayStatusBar.qml">../src/QmlControls/LogReplayStatusBar.qml</file> <file alias="QGroundControl/Controls/LogReplayStatusBar.qml">../src/QmlControls/LogReplayStatusBar.qml</file>
<file alias="QGroundControl/Controls/MainStatusIndicator.qml">../src/ui/toolbar/MainStatusIndicator.qml</file>
<file alias="QGroundControl/Controls/MainToolBar.qml">../src/ui/toolbar/MainToolBar.qml</file>
<file alias="QGroundControl/Controls/MainWindowSavedState.qml">../src/QmlControls/MainWindowSavedState.qml</file> <file alias="QGroundControl/Controls/MainWindowSavedState.qml">../src/QmlControls/MainWindowSavedState.qml</file>
<file alias="QGroundControl/Controls/MAVLinkChart.qml">../src/QmlControls/MAVLinkChart.qml</file> <file alias="QGroundControl/Controls/MAVLinkChart.qml">../src/QmlControls/MAVLinkChart.qml</file>
<file alias="QGroundControl/Controls/MAVLinkMessageButton.qml">../src/QmlControls/MAVLinkMessageButton.qml</file> <file alias="QGroundControl/Controls/MAVLinkMessageButton.qml">../src/QmlControls/MAVLinkMessageButton.qml</file>
...@@ -161,6 +161,7 @@ ...@@ -161,6 +161,7 @@
<file alias="QGroundControl/Controls/QGCToolBarButton.qml">../src/QmlControls/QGCToolBarButton.qml</file> <file alias="QGroundControl/Controls/QGCToolBarButton.qml">../src/QmlControls/QGCToolBarButton.qml</file>
<file alias="QGroundControl/Controls/QGCToolInsets.qml">../src/QmlControls/QGCToolInsets.qml</file> <file alias="QGroundControl/Controls/QGCToolInsets.qml">../src/QmlControls/QGCToolInsets.qml</file>
<file alias="QGroundControl/Controls/QGCViewDialog.qml">../src/QmlControls/QGCViewDialog.qml</file> <file alias="QGroundControl/Controls/QGCViewDialog.qml">../src/QmlControls/QGCViewDialog.qml</file>
<file alias="QGroundControl/Controls/QGCViewDialogContainer.qml">../src/QmlControls/QGCViewDialogContainer.qml</file>
<file alias="QGroundControl/Controls/QGCViewMessage.qml">../src/QmlControls/QGCViewMessage.qml</file> <file alias="QGroundControl/Controls/QGCViewMessage.qml">../src/QmlControls/QGCViewMessage.qml</file>
<file alias="QGroundControl/Controls/qmldir">../src/QmlControls/QGroundControl/Controls/qmldir</file> <file alias="QGroundControl/Controls/qmldir">../src/QmlControls/QGroundControl/Controls/qmldir</file>
<file alias="QGroundControl/Controls/RallyPointEditorHeader.qml">../src/PlanView/RallyPointEditorHeader.qml</file> <file alias="QGroundControl/Controls/RallyPointEditorHeader.qml">../src/PlanView/RallyPointEditorHeader.qml</file>
...@@ -179,9 +180,10 @@ ...@@ -179,9 +180,10 @@
<file alias="QGroundControl/Controls/SurveyMapVisual.qml">../src/PlanView/SurveyMapVisual.qml</file> <file alias="QGroundControl/Controls/SurveyMapVisual.qml">../src/PlanView/SurveyMapVisual.qml</file>
<file alias="QGroundControl/Controls/TerrainStatus.qml">../src/PlanView/TerrainStatus.qml</file> <file alias="QGroundControl/Controls/TerrainStatus.qml">../src/PlanView/TerrainStatus.qml</file>
<file alias="QGroundControl/Controls/TakeoffItemMapVisual.qml">../src/PlanView/TakeoffItemMapVisual.qml</file> <file alias="QGroundControl/Controls/TakeoffItemMapVisual.qml">../src/PlanView/TakeoffItemMapVisual.qml</file>
<file alias="QGroundControl/Controls/ToolBarBase.qml">../src/ui/toolbar/ToolBarBase.qml</file>
<file alias="QGroundControl/Controls/ToolStrip.qml">../src/QmlControls/ToolStrip.qml</file> <file alias="QGroundControl/Controls/ToolStrip.qml">../src/QmlControls/ToolStrip.qml</file>
<file alias="QGroundControl/Controls/TransectStyleComplexItemStats.qml">../src/PlanView/TransectStyleComplexItemStats.qml</file> <file alias="QGroundControl/Controls/TransectStyleComplexItemStats.qml">../src/PlanView/TransectStyleComplexItemStats.qml</file>
<file alias="QGroundControl/Controls/TransectStyleComplexItemTabBar.qml">../src/PlanView/TransectStyleComplexItemTabBar.qml</file>
<file alias="QGroundControl/Controls/TransectStyleComplexItemTerrainFollow.qml">../src/PlanView/TransectStyleComplexItemTerrainFollow.qml</file>
<file alias="QGroundControl/Controls/VehicleRotationCal.qml">../src/QmlControls/VehicleRotationCal.qml</file> <file alias="QGroundControl/Controls/VehicleRotationCal.qml">../src/QmlControls/VehicleRotationCal.qml</file>
<file alias="QGroundControl/Controls/VehicleSummaryRow.qml">../src/QmlControls/VehicleSummaryRow.qml</file> <file alias="QGroundControl/Controls/VehicleSummaryRow.qml">../src/QmlControls/VehicleSummaryRow.qml</file>
<file alias="QGroundControl/Controls/VerticalFactValueGrid.qml">../src/QmlControls/VerticalFactValueGrid.qml</file> <file alias="QGroundControl/Controls/VerticalFactValueGrid.qml">../src/QmlControls/VerticalFactValueGrid.qml</file>
...@@ -335,5 +337,8 @@ ...@@ -335,5 +337,8 @@
<qresource prefix="/MockLink"> <qresource prefix="/MockLink">
<file alias="APMArduSubMockLink.params">../src/comm/APMArduSubMockLink.params</file> <file alias="APMArduSubMockLink.params">../src/comm/APMArduSubMockLink.params</file>
<file alias="PX4MockLink.params">../src/comm/PX4MockLink.params</file> <file alias="PX4MockLink.params">../src/comm/PX4MockLink.params</file>
<file alias="Version.MetaData.json">../src/comm/MockLink.Version.MetaData.json</file>
<file alias="Version.MetaData.json.gz">../src/comm/MockLink.Version.MetaData.json.gz</file>
<file alias="Parameter.MetaData.json">../src/comm/MockLink.Parameter.MetaData.json</file>
</qresource> </qresource>
</RCC> </RCC>
...@@ -159,11 +159,11 @@ bool CustomPlugin::adjustSettingMetaData(const QString& settingsGroup, FactMetaD ...@@ -159,11 +159,11 @@ bool CustomPlugin::adjustSettingMetaData(const QString& settingsGroup, FactMetaD
if (settingsGroup == AppSettings::settingsGroup) { if (settingsGroup == AppSettings::settingsGroup) {
// This tells QGC than when you are creating Plans while not connected to a vehicle // This tells QGC than when you are creating Plans while not connected to a vehicle
// the specific firmware/vehicle the plan is for. // the specific firmware/vehicle the plan is for.
if (metaData.name() == AppSettings::offlineEditingFirmwareTypeName) { if (metaData.name() == AppSettings::offlineEditingFirmwareClassName) {
metaData.setRawDefaultValue(MAV_AUTOPILOT_PX4); metaData.setRawDefaultValue(QGCMAVLink::FirmwareClassPX4);
return false; return false;
} else if (metaData.name() == AppSettings::offlineEditingVehicleTypeName) { } else if (metaData.name() == AppSettings::offlineEditingVehicleClassName) {
metaData.setRawDefaultValue(MAV_TYPE_QUADROTOR); metaData.setRawDefaultValue(QGCMAVLink::VehicleClassMultiRotor);
return false; return false;
} }
} }
......
...@@ -22,11 +22,18 @@ CustomFirmwarePluginFactory::CustomFirmwarePluginFactory() ...@@ -22,11 +22,18 @@ CustomFirmwarePluginFactory::CustomFirmwarePluginFactory()
} }
QList<MAV_AUTOPILOT> CustomFirmwarePluginFactory::supportedFirmwareTypes() const QList<QGCMAVLink::FirmwareClass_t> CustomFirmwarePluginFactory::supportedFirmwareClasses() const
{ {
QList<MAV_AUTOPILOT> list; QList<QGCMAVLink::FirmwareClass_t> firmwareClasses;
list.append(MAV_AUTOPILOT_PX4); firmwareClasses.append(QGCMAVLink::FirmwareClassPX4);
return list; return firmwareClasses;
}
QList<QGCMAVLink::VehicleClass_t> CustomFirmwarePluginFactory::supportedVehicleClasses(void) const
{
QList<QGCMAVLink::VehicleClass_t> vehicleClasses;
vehicleClasses.append(QGCMAVLink::VehicleClassMultiRotor);
return vehicleClasses;
} }
FirmwarePlugin* CustomFirmwarePluginFactory::firmwarePluginForAutopilot(MAV_AUTOPILOT autopilotType, MAV_TYPE /*vehicleType*/) FirmwarePlugin* CustomFirmwarePluginFactory::firmwarePluginForAutopilot(MAV_AUTOPILOT autopilotType, MAV_TYPE /*vehicleType*/)
...@@ -39,11 +46,3 @@ FirmwarePlugin* CustomFirmwarePluginFactory::firmwarePluginForAutopilot(MAV_AUTO ...@@ -39,11 +46,3 @@ FirmwarePlugin* CustomFirmwarePluginFactory::firmwarePluginForAutopilot(MAV_AUTO
} }
return nullptr; return nullptr;
} }
QList<MAV_TYPE> CustomFirmwarePluginFactory::supportedVehicleTypes(void) const
{
QList<MAV_TYPE> mavTypes;
mavTypes.append(MAV_TYPE_QUADROTOR);
return mavTypes;
}
...@@ -26,9 +26,9 @@ class CustomFirmwarePluginFactory : public FirmwarePluginFactory ...@@ -26,9 +26,9 @@ class CustomFirmwarePluginFactory : public FirmwarePluginFactory
Q_OBJECT Q_OBJECT
public: public:
CustomFirmwarePluginFactory(); CustomFirmwarePluginFactory();
QList<MAV_AUTOPILOT> supportedFirmwareTypes () const final; QList<QGCMAVLink::FirmwareClass_t> supportedFirmwareClasses(void) const final;
QList<QGCMAVLink::VehicleClass_t> supportedVehicleClasses(void) const final;
FirmwarePlugin* firmwarePluginForAutopilot (MAV_AUTOPILOT autopilotType, MAV_TYPE vehicleType) final; FirmwarePlugin* firmwarePluginForAutopilot (MAV_AUTOPILOT autopilotType, MAV_TYPE vehicleType) final;
QList<MAV_TYPE> supportedVehicleTypes (void) const final;
private: private:
CustomFirmwarePlugin* _pluginInstance; CustomFirmwarePlugin* _pluginInstance;
......
...@@ -232,6 +232,7 @@ ...@@ -232,6 +232,7 @@
<file alias="QGroundControl/FlightDisplay/PreFlightSoundCheck.qml">src/FlightDisplay/PreFlightSoundCheck.qml</file> <file alias="QGroundControl/FlightDisplay/PreFlightSoundCheck.qml">src/FlightDisplay/PreFlightSoundCheck.qml</file>
<file alias="QGroundControl/FlightDisplay/PreFlightCheckListShowAction.qml">src/FlightDisplay/PreFlightCheckListShowAction.qml</file> <file alias="QGroundControl/FlightDisplay/PreFlightCheckListShowAction.qml">src/FlightDisplay/PreFlightCheckListShowAction.qml</file>
<file alias="QGroundControl/FlightDisplay/TerrainProgress.qml">src/FlightDisplay/TerrainProgress.qml</file> <file alias="QGroundControl/FlightDisplay/TerrainProgress.qml">src/FlightDisplay/TerrainProgress.qml</file>
<file alias="QGroundControl/FlightDisplay/TelemetryValuesBar.qml">src/FlightDisplay/TelemetryValuesBar.qml</file>
<file alias="QGroundControl/FlightDisplay/VehicleWarnings.qml">src/FlightDisplay/VehicleWarnings.qml</file> <file alias="QGroundControl/FlightDisplay/VehicleWarnings.qml">src/FlightDisplay/VehicleWarnings.qml</file>
<file alias="QGroundControl/FlightDisplay/qmldir">src/QmlControls/QGroundControl/FlightDisplay/qmldir</file> <file alias="QGroundControl/FlightDisplay/qmldir">src/QmlControls/QGroundControl/FlightDisplay/qmldir</file>
<file alias="QGroundControl/FlightMap/CameraTriggerIndicator.qml">src/FlightMap/MapItems/CameraTriggerIndicator.qml</file> <file alias="QGroundControl/FlightMap/CameraTriggerIndicator.qml">src/FlightMap/MapItems/CameraTriggerIndicator.qml</file>
......
...@@ -52,7 +52,6 @@ Item { ...@@ -52,7 +52,6 @@ Item {
property var _guidedController: guidedActionsController property var _guidedController: guidedActionsController
property var _guidedActionList: guidedActionList property var _guidedActionList: guidedActionList
property var _guidedAltSlider: guidedAltSlider property var _guidedAltSlider: guidedAltSlider
property var _guidedConfirm: guidedActionConfirm
property real _toolsMargin: ScreenTools.defaultFontPixelWidth * 0.75 property real _toolsMargin: ScreenTools.defaultFontPixelWidth * 0.75
property rect _centerViewport: Qt.rect(0, 0, width, height) property rect _centerViewport: Qt.rect(0, 0, width, height)
property real _rightPanelWidth: ScreenTools.defaultFontPixelWidth * 30 property real _rightPanelWidth: ScreenTools.defaultFontPixelWidth * 30
...@@ -77,7 +76,6 @@ Item { ...@@ -77,7 +76,6 @@ Item {
FlyViewWidgetLayer { FlyViewWidgetLayer {
id: widgetLayer id: widgetLayer
anchors.rightMargin: _toolsMargin
anchors.top: parent.top anchors.top: parent.top
anchors.bottom: parent.bottom anchors.bottom: parent.bottom
anchors.left: parent.left anchors.left: parent.left
...@@ -100,12 +98,11 @@ Item { ...@@ -100,12 +98,11 @@ Item {
GuidedActionsController { GuidedActionsController {
id: guidedActionsController id: guidedActionsController
missionController: _missionController missionController: _missionController
confirmDialog: _guidedConfirm
actionList: _guidedActionList actionList: _guidedActionList
altitudeSlider: _guidedAltSlider altitudeSlider: _guidedAltSlider
} }
GuidedActionConfirm { /*GuidedActionConfirm {
id: guidedActionConfirm id: guidedActionConfirm
anchors.margins: _margins anchors.margins: _margins
anchors.bottom: parent.bottom anchors.bottom: parent.bottom
...@@ -113,7 +110,7 @@ Item { ...@@ -113,7 +110,7 @@ Item {
z: QGroundControl.zOrderTopMost z: QGroundControl.zOrderTopMost
guidedController: _guidedController guidedController: _guidedController
altitudeSlider: _guidedAltSlider altitudeSlider: _guidedAltSlider
} }*/
GuidedActionList { GuidedActionList {
id: guidedActionList id: guidedActionList
......
...@@ -18,6 +18,7 @@ import QtQuick.Window 2.2 ...@@ -18,6 +18,7 @@ import QtQuick.Window 2.2
import QtQml.Models 2.1 import QtQml.Models 2.1
import QGroundControl 1.0 import QGroundControl 1.0
import QGroundControl.Controls 1.0
import QGroundControl.Airspace 1.0 import QGroundControl.Airspace 1.0
import QGroundControl.Airmap 1.0 import QGroundControl.Airmap 1.0
import QGroundControl.Controllers 1.0 import QGroundControl.Controllers 1.0
...@@ -50,18 +51,18 @@ Item { ...@@ -50,18 +51,18 @@ Item {
QGCToolInsets { QGCToolInsets {
id: _totalToolInsets id: _totalToolInsets
leftEdgeCenterInset: toolStrip.leftInset
leftEdgeTopInset: toolStrip.leftInset leftEdgeTopInset: toolStrip.leftInset
leftEdgeCenterInset: toolStrip.leftInset
leftEdgeBottomInset: parentToolInsets.leftEdgeBottomInset leftEdgeBottomInset: parentToolInsets.leftEdgeBottomInset
rightEdgeCenterInset: instrumentPanel.rightInset rightEdgeTopInset: parentToolInsets.rightEdgeTopInset
rightEdgeTopInset: instrumentPanel.rightInset rightEdgeCenterInset: parentToolInsets.rightEdgeCenterInset
rightEdgeBottomInset: instrumentPanel.rightInset rightEdgeBottomInset: parentToolInsets.rightEdgeBottomInset
topEdgeCenterInset: parentToolInsets.topEdgeCenterInset
topEdgeLeftInset: parentToolInsets.topEdgeLeftInset topEdgeLeftInset: parentToolInsets.topEdgeLeftInset
topEdgeCenterInset: parentToolInsets.topEdgeCenterInset
topEdgeRightInset: parentToolInsets.topEdgeRightInset topEdgeRightInset: parentToolInsets.topEdgeRightInset
bottomEdgeCenterInset: mapScale.centerInset
bottomEdgeLeftInset: parentToolInsets.bottomEdgeLeftInset bottomEdgeLeftInset: parentToolInsets.bottomEdgeLeftInset
bottomEdgeRightInset: parentToolInsets.bottomEdgeRightInset bottomEdgeCenterInset: mapScale.centerInset
bottomEdgeRightInset: telemetryPanel.bottomInset
} }
FlyViewMissionCompleteDialog { FlyViewMissionCompleteDialog {
...@@ -84,6 +85,30 @@ Item { ...@@ -84,6 +85,30 @@ Item {
property real rightInset: visible ? parent.width - x : 0 property real rightInset: visible ? parent.width - x : 0
} }
TelemetryValuesBar {
id: telemetryPanel
x: recalcXPosition()
anchors.margins: _toolsMargin
anchors.bottom: parent.bottom
function recalcXPosition() {
// First try centered
var halfRootWidth = _root.width / 2
var halfPanelWidth = telemetryPanel.width / 2
var leftX = (halfRootWidth - halfPanelWidth) - _toolsMargin
var rightX = (halfRootWidth + halfPanelWidth) + _toolsMargin
if (leftX >= parentToolInsets.leftEdgeBottomInset || rightX <= parentToolInsets.rightEdgeBottomInset ) {
// It will fit in the horizontalCenter
return halfRootWidth - halfPanelWidth
} else {
// Anchor to left edge
return parentToolInsets.leftEdgeBottomInset + _toolsMargin
}
}
property real bottomInset: height
}
//-- Virtual Joystick //-- Virtual Joystick
Loader { Loader {
id: virtualJoystickMultiTouch id: virtualJoystickMultiTouch
...@@ -105,11 +130,11 @@ Item { ...@@ -105,11 +130,11 @@ Item {
FlyViewToolStrip { FlyViewToolStrip {
id: toolStrip id: toolStrip
anchors.leftMargin: _toolsMargin + parentToolInsets.leftEdgeCenterInset anchors.leftMargin: _toolsMargin + parentToolInsets.leftEdgeCenterInset
anchors.topMargin: _toolsMargin + parentToolInsets.leftEdgeTopInset anchors.topMargin: _toolsMargin + parentToolInsets.topEdgeLeftInset
anchors.left: parent.left anchors.left: parent.left
anchors.top: parent.top anchors.top: parent.top
z: QGroundControl.zOrderWidgets z: QGroundControl.zOrderWidgets
maxHeight: parent.height - y - parentToolInsets.leftEdgeBottomInset - _toolsMargin maxHeight: parent.height - y - parentToolInsets.bottomEdgeLeftInset - _toolsMargin
visible: !QGroundControl.videoManager.fullScreen visible: !QGroundControl.videoManager.fullScreen
onDisplayPreFlightChecklist: preFlightChecklistPopup.open() onDisplayPreFlightChecklist: preFlightChecklistPopup.open()
...@@ -132,12 +157,11 @@ Item { ...@@ -132,12 +157,11 @@ Item {
MapScale { MapScale {
id: mapScale id: mapScale
anchors.leftMargin: parentToolInsets.leftEdgeBottomInset + _toolsMargin anchors.margins: _toolsMargin
anchors.bottomMargin: parentToolInsets.bottomEdgeCenterInset + _toolsMargin anchors.left: toolStrip.right
anchors.left: parent.left anchors.top: parent.top
anchors.bottom: parent.bottom
mapControl: _mapControl mapControl: _mapControl
buttonsOnLeft: true buttonsOnLeft: false
visible: !ScreenTools.isTinyScreen && QGroundControl.corePlugin.options.flyView.showMapScale && mapControl.pipState.state !== mapControl.pipState.pipState visible: !ScreenTools.isTinyScreen && QGroundControl.corePlugin.options.flyView.showMapScale && mapControl.pipState.state !== mapControl.pipState.pipState
property real centerInset: visible ? parent.height - y : 0 property real centerInset: visible ? parent.height - y : 0
......
...@@ -7,28 +7,26 @@ ...@@ -7,28 +7,26 @@
* *
****************************************************************************/ ****************************************************************************/
import QtQuick 2.3 import QtQuick 2.12
import QtQuick.Controls 1.2 import QtQuick.Controls 2.4
import QtQuick.Layouts 1.12
import QGroundControl 1.0 import QGroundControl 1.0
import QGroundControl.ScreenTools 1.0 import QGroundControl.ScreenTools 1.0
import QGroundControl.Controls 1.0 import QGroundControl.Controls 1.0
import QGroundControl.Palette 1.0 import QGroundControl.Palette 1.0
/// Guided actions confirmation dialog
Rectangle { Rectangle {
id: _root id: _root
width: confirmColumn.width + (_margins * 4) Layout.minimumWidth: mainLayout.width + (_margins * 2)
height: confirmColumn.height + (_margins * 4) Layout.preferredHeight: mainLayout.height + (_margins * 2)
radius: ScreenTools.defaultFontPixelHeight / 2 radius: ScreenTools.defaultFontPixelWidth / 2
color: qgcPal.window color: qgcPal.windowShadeLight
border.color: _emergencyAction ? "red" : qgcPal.windowShade
border.width: _emergencyAction ? 4 : 1
visible: false visible: false
property var guidedController property var guidedController
property var altitudeSlider property var altitudeSlider
property alias title: titleText.text property string title // Currently unused
property alias message: messageText.text property alias message: messageText.text
property int action property int action
property var actionData property var actionData
...@@ -37,9 +35,11 @@ Rectangle { ...@@ -37,9 +35,11 @@ Rectangle {
property alias optionText: optionCheckBox.text property alias optionText: optionCheckBox.text
property alias optionChecked: optionCheckBox.checked property alias optionChecked: optionCheckBox.checked
property real _margins: ScreenTools.defaultFontPixelWidth property real _margins: ScreenTools.defaultFontPixelWidth / 2
property bool _emergencyAction: action === guidedController.actionEmergencyStop property bool _emergencyAction: action === guidedController.actionEmergencyStop
Component.onCompleted: guidedController.confirmDialog = this
onHideTriggerChanged: { onHideTriggerChanged: {
if (hideTrigger) { if (hideTrigger) {
confirmCancelled() confirmCancelled()
...@@ -50,7 +50,7 @@ Rectangle { ...@@ -50,7 +50,7 @@ Rectangle {
if (immediate) { if (immediate) {
visible = true visible = true
} else { } else {
// We delay showing the confirmation for a small amount in order to any other state // We delay showing the confirmation for a small amount in order for any other state
// changes to propogate through the system. This way only the final state shows up. // changes to propogate through the system. This way only the final state shows up.
visibleTimer.restart() visibleTimer.restart()
} }
...@@ -76,44 +76,33 @@ Rectangle { ...@@ -76,44 +76,33 @@ Rectangle {
QGCPalette { id: qgcPal } QGCPalette { id: qgcPal }
DeadMouseArea { ColumnLayout {
anchors.fill: parent id: mainLayout
} anchors.horizontalCenter: parent.horizontalCenter
Column {
id: confirmColumn
anchors.margins: _margins
anchors.centerIn: parent
spacing: _margins spacing: _margins
QGCLabel {
id: titleText
anchors.left: slider.left
anchors.right: slider.right
horizontalAlignment: Text.AlignHCenter
font.pointSize: ScreenTools.largeFontPointSize
}
QGCLabel { QGCLabel {
id: messageText id: messageText
anchors.left: slider.left Layout.fillWidth: true
anchors.right: slider.right
horizontalAlignment: Text.AlignHCenter horizontalAlignment: Text.AlignHCenter
wrapMode: Text.WordWrap wrapMode: Text.WordWrap
} }
QGCCheckBox { QGCCheckBox {
id: optionCheckBox id: optionCheckBox
anchors.horizontalCenter: parent.horizontalCenter Layout.alignment: Qt.AlignHCenter
text: "" text: ""
visible: text !== "" visible: text !== ""
} }
// Action confirmation control RowLayout {
Layout.alignment: Qt.AlignHCenter
spacing: ScreenTools.defaultFontPixelWidth
SliderSwitch { SliderSwitch {
id: slider id: slider
confirmText: qsTr("Slide to confirm") confirmText: qsTr("Slide to confirm")
width: Math.max(implicitWidth, ScreenTools.defaultFontPixelWidth * 30) Layout.minimumWidth: Math.max(implicitWidth, ScreenTools.defaultFontPixelWidth * 30)
onAccept: { onAccept: {
_root.visible = false _root.visible = false
...@@ -130,22 +119,27 @@ Rectangle { ...@@ -130,22 +119,27 @@ Rectangle {
} }
} }
} }
}
Rectangle {
height: slider.height * 0.75
width: height
radius: height / 2
color: qgcPal.primaryButton
QGCColoredImage { QGCColoredImage {
anchors.margins: _margins anchors.margins: parent.height / 4
anchors.top: parent.top anchors.fill: parent
anchors.right: parent.right
width: ScreenTools.defaultFontPixelHeight
height: width
sourceSize.height: width
source: "/res/XDelete.svg" source: "/res/XDelete.svg"
fillMode: Image.PreserveAspectFit fillMode: Image.PreserveAspectFit
color: qgcPal.text color: qgcPal.text
}
QGCMouseArea { QGCMouseArea {
fillItem: parent fillItem: parent
onClicked: confirmCancelled() onClicked: confirmCancelled()
} }
} }
}
}
} }
/****************************************************************************
*
* (c) 2009-2016 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org>
*
* QGroundControl is licensed according to the terms in the file
* COPYING.md in the root of the source code directory.
*
****************************************************************************/
import QtQuick 2.12
import QtQuick.Layouts 1.12
import QGroundControl 1.0
import QGroundControl.ScreenTools 1.0
import QGroundControl.Vehicle 1.0
import QGroundControl.Controls 1.0
import QGroundControl.Palette 1.0
Rectangle {
id: telemetryPanel
height: telemetryLayout.height + (_toolsMargin * 2)
width: telemetryLayout.width + (_toolsMargin * 2)
color: Qt.hsla(_baseBGColor.hslHue, _baseBGColor.hslSaturation, _baseBGColor.hslLightness, 0.5)
radius: ScreenTools.defaultFontPixelWidth / 2
property color _baseBGColor: qgcPal.window
DeadMouseArea { anchors.fill: parent }
ColumnLayout {
id: telemetryLayout
anchors.margins: _toolsMargin
anchors.top: parent.top
anchors.left: parent.left
HorizontalFactValueGrid {
id: valueArea
userSettingsGroup: telemetryBarUserSettingsGroup
defaultSettingsGroup: telemetryBarDefaultSettingsGroup
QGCMouseArea {
anchors.fill: parent
visible: !parent.settingsUnlocked
onClicked: parent.settingsUnlocked = true
}
}
GuidedActionConfirm {
Layout.fillWidth: true
guidedController: _guidedController
altitudeSlider: _guidedAltSlider
}
}
}
...@@ -6,5 +6,5 @@ ...@@ -6,5 +6,5 @@
<path fill="#FFFFFF" d="M-55.213,94.612V84.146h-10.386v-4.373h10.385V69.384h4.425v10.389h10.387v4.373h-10.386v10.466 <path fill="#FFFFFF" d="M-55.213,94.612V84.146h-10.386v-4.373h10.385V69.384h4.425v10.389h10.387v4.373h-10.386v10.466
C-50.788,94.612-55.213,94.612-55.213,94.612z"/> C-50.788,94.612-55.213,94.612-55.213,94.612z"/>
</g> </g>
<circle fill="none" stroke="#FFFFFF" stroke-width="2" stroke-miterlimit="10" cx="-53" cy="82" r="22.38"/> <circle fill="none" stroke="#FFFFFF" stroke-width="3" stroke-miterlimit="10" cx="-53" cy="82" r="22.38"/>
</svg> </svg>
...@@ -3,10 +3,10 @@ ...@@ -3,10 +3,10 @@
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="-89 46 72 72" enable-background="new -89 46 72 72" xml:space="preserve"> viewBox="-89 46 72 72" enable-background="new -89 46 72 72" xml:space="preserve">
<g> <g>
<circle fill="none" stroke="#FFFFFF" stroke-width="2" stroke-miterlimit="10" cx="-53" cy="82" r="22.38"/> <circle fill="none" stroke="#FFFFFF" stroke-width="3" stroke-miterlimit="10" cx="-53" cy="82" r="22.38"/>
<line fill="none" stroke="#FFFFFF" stroke-width="2" stroke-miterlimit="10" x1="-75.464" y1="81.975" x2="-64.423" y2="82.025"/> <line fill="none" stroke="#FFFFFF" stroke-width="3" stroke-miterlimit="10" x1="-75.464" y1="81.975" x2="-64.423" y2="82.025"/>
<line fill="none" stroke="#FFFFFF" stroke-width="2" stroke-miterlimit="10" x1="-53.025" y1="104.464" x2="-52.975" y2="93.423"/> <line fill="none" stroke="#FFFFFF" stroke-width="3" stroke-miterlimit="10" x1="-53.025" y1="104.464" x2="-52.975" y2="93.423"/>
<line fill="none" stroke="#FFFFFF" stroke-width="2" stroke-miterlimit="10" x1="-30.536" y1="82.025" x2="-41.577" y2="81.975"/> <line fill="none" stroke="#FFFFFF" stroke-width="3" stroke-miterlimit="10" x1="-30.536" y1="82.025" x2="-41.577" y2="81.975"/>
<line fill="none" stroke="#FFFFFF" stroke-width="2" stroke-miterlimit="10" x1="-52.975" y1="59.536" x2="-53.025" y2="70.577"/> <line fill="none" stroke="#FFFFFF" stroke-width="3" stroke-miterlimit="10" x1="-52.975" y1="59.536" x2="-53.025" y2="70.577"/>
</g> </g>
</svg> </svg>
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="-89 46 72 72" enable-background="new -89 46 72 72" xml:space="preserve"> viewBox="-89 46 72 72" enable-background="new -89 46 72 72" xml:space="preserve">
<g transform="matrix(0.96508576,0,0,0.94661676,-1.3508671,3.6129809)"> <g transform="matrix(0.96508576,0,0,0.94661676,-1.3508671,3.6129809)">
<path fill="none" stroke="#FFFFFF" stroke-width="1.2" stroke-miterlimit="4" d="m -69.288973,77.48289 22.722433,-9.307985 2.098859,4.288973 -23.726235,9.39924 1.186311,4.471483 23.908746,-9.855514 L -41,80.768061 -66.186312,91.079848 -65,95.551331 l 25.460076,-10.403042 -2.372624,7.391635 -13.140684,5.110266"/> <path fill="none" stroke="#FFFFFF" stroke-width="3" stroke-miterlimit="4" d="m -69.288973,77.48289 22.722433,-9.307985 2.098859,4.288973 -23.726235,9.39924 1.186311,4.471483 23.908746,-9.855514 L -41,80.768061 -66.186312,91.079848 -65,95.551331 l 25.460076,-10.403042 -2.372624,7.391635 -13.140684,5.110266"/>
</g> </g>
<path fill="none" stroke="#FFFFFF" stroke-width="2" stroke-miterlimit="10" d="m -44.193916,62.152091 10.76806,20.623574 -9.21673,19.346005 -24.638783,-3.011404 -6.205323,-25.186312 z"/> <path fill="none" stroke="#FFFFFF" stroke-width="3" stroke-miterlimit="10" d="m -44.193916,62.152091 10.76806,20.623574 -9.21673,19.346005 -24.638783,-3.011404 -6.205323,-25.186312 z"/>
</svg> </svg>
...@@ -2,12 +2,12 @@ ...@@ -2,12 +2,12 @@
<!-- Generator: Adobe Illustrator 19.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) --> <!-- Generator: Adobe Illustrator 19.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="-89 46 72 72" enable-background="new -89 46 72 72" xml:space="preserve"> viewBox="-89 46 72 72" enable-background="new -89 46 72 72" xml:space="preserve">
<path fill="none" stroke="#FFFFFF" stroke-width="2" stroke-miterlimit="10" d="M-56.963,64.442 <path fill="none" stroke="#FFFFFF" stroke-width="3" stroke-miterlimit="10" d="M-56.963,64.442
c-4.199,0.947-8.074,3.392-10.749,7.186c-5.728,8.125-3.785,19.355,4.339,25.083c0.007,0.005,0.014,0.009,0.022,0.014"/> c-4.199,0.947-8.074,3.392-10.749,7.186c-5.728,8.125-3.785,19.355,4.339,25.083c0.007,0.005,0.014,0.009,0.022,0.014"/>
<g> <g>
<polygon fill="#FFFFFF" points="-59.303,88.472 -69.431,103.621 -56.794,101.11 "/> <polygon fill="#FFFFFF" points="-59.303,88.472 -69.431,103.621 -56.794,101.11 "/>
</g> </g>
<path fill="none" stroke="#FFFFFF" stroke-width="2" stroke-miterlimit="10" d="M-49.038,99.558 <path fill="none" stroke="#FFFFFF" stroke-width="3" stroke-miterlimit="10" d="M-49.038,99.558
c4.199-0.947,8.074-3.392,10.749-7.186c5.728-8.125,3.785-19.355-4.339-25.083c-0.007-0.005-0.014-0.009-0.022-0.014"/> c4.199-0.947,8.074-3.392,10.749-7.186c5.728-8.125,3.785-19.355-4.339-25.083c-0.007-0.005-0.014-0.009-0.022-0.014"/>
<g> <g>
<polygon fill="#FFFFFF" points="-46.698,75.528 -36.57,60.379 -49.207,62.89 "/> <polygon fill="#FFFFFF" points="-46.698,75.528 -36.57,60.379 -49.207,62.89 "/>
......
...@@ -2,12 +2,12 @@ ...@@ -2,12 +2,12 @@
<!-- Generator: Adobe Illustrator 19.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) --> <!-- Generator: Adobe Illustrator 19.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="-89 46 72 72" enable-background="new -89 46 72 72" xml:space="preserve"> viewBox="-89 46 72 72" enable-background="new -89 46 72 72" xml:space="preserve">
<path fill="none" stroke="#FFFF00" stroke-width="2" stroke-miterlimit="10" d="M-56.963,64.442 <path fill="none" stroke="#FFFF00" stroke-width="3" stroke-miterlimit="10" d="M-56.963,64.442
c-4.199,0.947-8.074,3.392-10.749,7.186c-5.728,8.125-3.785,19.355,4.339,25.083c0.007,0.005,0.014,0.009,0.022,0.014"/> c-4.199,0.947-8.074,3.392-10.749,7.186c-5.728,8.125-3.785,19.355,4.339,25.083c0.007,0.005,0.014,0.009,0.022,0.014"/>
<g> <g>
<polygon fill="#FFFF00" points="-59.303,88.472 -69.431,103.621 -56.794,101.11 "/> <polygon fill="#FFFF00" points="-59.303,88.472 -69.431,103.621 -56.794,101.11 "/>
</g> </g>
<path fill="none" stroke="#FFFF00" stroke-width="2" stroke-miterlimit="10" d="M-49.038,99.558 <path fill="none" stroke="#FFFF00" stroke-width="3" stroke-miterlimit="10" d="M-49.038,99.558
c4.199-0.947,8.074-3.392,10.749-7.186c5.728-8.125,3.785-19.355-4.339-25.083c-0.007-0.005-0.014-0.009-0.022-0.014"/> c4.199-0.947,8.074-3.392,10.749-7.186c5.728-8.125,3.785-19.355-4.339-25.083c-0.007-0.005-0.014-0.009-0.022-0.014"/>
<g> <g>
<polygon fill="#FFFF00" points="-46.698,75.528 -36.57,60.379 -49.207,62.89 "/> <polygon fill="#FFFF00" points="-46.698,75.528 -36.57,60.379 -49.207,62.89 "/>
......
...@@ -91,7 +91,7 @@ Column { ...@@ -91,7 +91,7 @@ Column {
id: camMode id: camMode
width: _hasModes ? ScreenTools.defaultFontPixelWidth * 8 : 0 width: _hasModes ? ScreenTools.defaultFontPixelWidth * 8 : 0
height: _hasModes ? ScreenTools.defaultFontPixelWidth * 4 : 0 height: _hasModes ? ScreenTools.defaultFontPixelWidth * 4 : 0
color: qgcPal.button color: qgcPal.windowShadeLight
radius: height * 0.5 radius: height * 0.5
visible: _hasModes visible: _hasModes
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
...@@ -99,7 +99,7 @@ Column { ...@@ -99,7 +99,7 @@ Column {
Rectangle { Rectangle {
width: parent.height width: parent.height
height: parent.height height: parent.height
color: _cameraVideoMode ? qgcPal.window : qgcPal.button color: _cameraVideoMode ? qgcPal.window : qgcPal.windowShadeLight
radius: height * 0.5 radius: height * 0.5
anchors.left: parent.left anchors.left: parent.left
border.color: qgcPal.text border.color: qgcPal.text
...@@ -126,7 +126,7 @@ Column { ...@@ -126,7 +126,7 @@ Column {
Rectangle { Rectangle {
width: parent.height width: parent.height
height: parent.height height: parent.height
color: _cameraPhotoMode ? qgcPal.window : qgcPal.button color: _cameraPhotoMode ? qgcPal.window : qgcPal.windowShadeLight
radius: height * 0.5 radius: height * 0.5
anchors.right: parent.right anchors.right: parent.right
border.color: qgcPal.text border.color: qgcPal.text
......
...@@ -43,7 +43,7 @@ Item { ...@@ -43,7 +43,7 @@ Item {
Rectangle { Rectangle {
anchors.fill: parent anchors.fill: parent
radius: _radius radius: _radius
color: qgcPal.globalTheme === QGCPalette.Light ? QGroundControl.corePlugin.options.toolbarBackgroundLight : QGroundControl.corePlugin.options.toolbarBackgroundDark color: QGroundControl.globalPalette.toolbarBackground
} }
QGCFlickable { QGCFlickable {
......
...@@ -130,7 +130,7 @@ Rectangle { ...@@ -130,7 +130,7 @@ Rectangle {
anchors.left: parent.left anchors.left: parent.left
anchors.right: parent.right anchors.right: parent.right
height: altColumn.y + altColumn.height + _margin height: altColumn.y + altColumn.height + _margin
color: _globalAltModeIsMixed ? qgcPal.windowShade: qgcPal.window color: _globalAltModeIsMixed ? qgcPal.windowShadeLight : qgcPal.windowShadeDark
visible: _specifiesAltitude visible: _specifiesAltitude
ColumnLayout { ColumnLayout {
......
...@@ -51,6 +51,7 @@ void QGCPalette::_buildMap() ...@@ -51,6 +51,7 @@ void QGCPalette::_buildMap()
// Light Dark // Light Dark
// Disabled Enabled Disabled Enabled // Disabled Enabled Disabled Enabled
DECLARE_QGC_COLOR(window, "#ffffff", "#ffffff", "#222222", "#222222") DECLARE_QGC_COLOR(window, "#ffffff", "#ffffff", "#222222", "#222222")
DECLARE_QGC_COLOR(windowShadeLight, "#909090", "#828282", "#707070", "#626262")
DECLARE_QGC_COLOR(windowShade, "#d9d9d9", "#d9d9d9", "#333333", "#333333") DECLARE_QGC_COLOR(windowShade, "#d9d9d9", "#d9d9d9", "#333333", "#333333")
DECLARE_QGC_COLOR(windowShadeDark, "#bdbdbd", "#bdbdbd", "#282828", "#282828") DECLARE_QGC_COLOR(windowShadeDark, "#bdbdbd", "#bdbdbd", "#282828", "#282828")
DECLARE_QGC_COLOR(text, "#9d9d9d", "#000000", "#707070", "#ffffff") DECLARE_QGC_COLOR(text, "#9d9d9d", "#000000", "#707070", "#ffffff")
...@@ -80,11 +81,13 @@ void QGCPalette::_buildMap() ...@@ -80,11 +81,13 @@ void QGCPalette::_buildMap()
DECLARE_QGC_COLOR(statusFailedText, "#9d9d9d", "#000000", "#707070", "#ffffff") DECLARE_QGC_COLOR(statusFailedText, "#9d9d9d", "#000000", "#707070", "#ffffff")
DECLARE_QGC_COLOR(statusPassedText, "#9d9d9d", "#000000", "#707070", "#ffffff") DECLARE_QGC_COLOR(statusPassedText, "#9d9d9d", "#000000", "#707070", "#ffffff")
DECLARE_QGC_COLOR(statusPendingText, "#9d9d9d", "#000000", "#707070", "#ffffff") DECLARE_QGC_COLOR(statusPendingText, "#9d9d9d", "#000000", "#707070", "#ffffff")
DECLARE_QGC_COLOR(toolbarBackground, "#ffffff", "#ffffff", "#222222", "#222222")
// Colors not affecting by theming // Colors not affecting by theming
// Disabled Enabled // Disabled Enabled
DECLARE_QGC_NONTHEMED_COLOR(brandingPurple, "#4A2C6D", "#4A2C6D") DECLARE_QGC_NONTHEMED_COLOR(brandingPurple, "#4A2C6D", "#4A2C6D")
DECLARE_QGC_NONTHEMED_COLOR(brandingBlue, "#48D6FF", "#6045c5") DECLARE_QGC_NONTHEMED_COLOR(brandingBlue, "#48D6FF", "#6045c5")
DECLARE_QGC_NONTHEMED_COLOR(toolStripFGColor, "#707070", "#ffffff")
// Colors not affecting by theming or enable/disable // Colors not affecting by theming or enable/disable
DECLARE_QGC_SINGLE_COLOR(mapWidgetBorderLight, "#ffffff") DECLARE_QGC_SINGLE_COLOR(mapWidgetBorderLight, "#ffffff")
......
...@@ -113,6 +113,7 @@ public: ...@@ -113,6 +113,7 @@ public:
Q_PROPERTY(QStringList colors READ colors CONSTANT) Q_PROPERTY(QStringList colors READ colors CONSTANT)
DEFINE_QGC_COLOR(window, setWindow) DEFINE_QGC_COLOR(window, setWindow)
DEFINE_QGC_COLOR(windowShadeLight, setWindowShadeLight)
DEFINE_QGC_COLOR(windowShade, setWindowShade) DEFINE_QGC_COLOR(windowShade, setWindowShade)
DEFINE_QGC_COLOR(windowShadeDark, setWindowShadeDark) DEFINE_QGC_COLOR(windowShadeDark, setWindowShadeDark)
DEFINE_QGC_COLOR(text, setText) DEFINE_QGC_COLOR(text, setText)
...@@ -149,6 +150,8 @@ public: ...@@ -149,6 +150,8 @@ public:
DEFINE_QGC_COLOR(statusPendingText, setstatusPendingText) DEFINE_QGC_COLOR(statusPendingText, setstatusPendingText)
DEFINE_QGC_COLOR(surveyPolygonInterior, setSurveyPolygonInterior) DEFINE_QGC_COLOR(surveyPolygonInterior, setSurveyPolygonInterior)
DEFINE_QGC_COLOR(surveyPolygonTerrainCollision, setSurveyPolygonTerrainCollision) DEFINE_QGC_COLOR(surveyPolygonTerrainCollision, setSurveyPolygonTerrainCollision)
DEFINE_QGC_COLOR(toolbarBackground, setToolbarBackground)
DEFINE_QGC_COLOR(toolStripFGColor, setToolStripFGColor)
QGCPalette(QObject* parent = nullptr); QGCPalette(QObject* parent = nullptr);
~QGCPalette(); ~QGCPalette();
......
...@@ -51,7 +51,7 @@ FactValueGrid::FactValueGrid(QQuickItem* parent) ...@@ -51,7 +51,7 @@ FactValueGrid::FactValueGrid(QQuickItem* parent)
_iconNames = iconDir.entryList(); _iconNames = iconDir.entryList();
} }
_connectSignals(); _init();
} }
FactValueGrid::FactValueGrid(const QString& defaultSettingsGroup) FactValueGrid::FactValueGrid(const QString& defaultSettingsGroup)
...@@ -59,12 +59,28 @@ FactValueGrid::FactValueGrid(const QString& defaultSettingsGroup) ...@@ -59,12 +59,28 @@ FactValueGrid::FactValueGrid(const QString& defaultSettingsGroup)
, _defaultSettingsGroup (defaultSettingsGroup) , _defaultSettingsGroup (defaultSettingsGroup)
, _rows (new QmlObjectListModel(this)) , _rows (new QmlObjectListModel(this))
{ {
_connectSignals(); _init();
} }
void FactValueGrid::_connectSignals(void) void FactValueGrid::_init(void)
{ {
Vehicle* offlineVehicle = qgcApp()->toolbox()->multiVehicleManager()->offlineEditingVehicle();
connect(offlineVehicle, &Vehicle::vehicleTypeChanged, this, &FactValueGrid::_offlineVehicleTypeChanged);
connect(this, &FactValueGrid::fontSizeChanged, this, &FactValueGrid::_saveSettings); connect(this, &FactValueGrid::fontSizeChanged, this, &FactValueGrid::_saveSettings);
_vehicleClass = QGCMAVLink::vehicleClass(offlineVehicle->vehicleType());
}
void FactValueGrid::_offlineVehicleTypeChanged(void)
{
Vehicle* offlineVehicle = qgcApp()->toolbox()->multiVehicleManager()->offlineEditingVehicle();
QGCMAVLink::VehicleClass_t newVehicleClass = QGCMAVLink::vehicleClass(offlineVehicle->vehicleType());
if (newVehicleClass != _vehicleClass) {
_vehicleClass = newVehicleClass;
_loadSettings();
}
} }
void FactValueGrid::componentComplete(void) void FactValueGrid::componentComplete(void)
...@@ -244,13 +260,14 @@ void FactValueGrid::_saveSettings(void) ...@@ -244,13 +260,14 @@ void FactValueGrid::_saveSettings(void)
} }
QSettings settings; QSettings settings;
QString groupNameFormat("%1-%2");
if (_userSettingsGroup.isEmpty()) { if (_userSettingsGroup.isEmpty()) {
// This means we are setting up default settings // This means we are setting up default settings
settings.beginGroup(_defaultSettingsGroup); settings.beginGroup(groupNameFormat.arg(_defaultSettingsGroup).arg(_vehicleClass));
} else { } else {
// This means we are saving user modifications // This means we are saving user modifications
settings.remove(_defaultSettingsGroup); settings.remove(groupNameFormat.arg(_defaultSettingsGroup).arg(_vehicleClass));
settings.beginGroup(_userSettingsGroup); settings.beginGroup(groupNameFormat.arg(_userSettingsGroup).arg(_vehicleClass));
} }
settings.remove(""); // Remove any previous settings settings.remove(""); // Remove any previous settings
...@@ -280,21 +297,25 @@ void FactValueGrid::_saveSettings(void) ...@@ -280,21 +297,25 @@ void FactValueGrid::_saveSettings(void)
void FactValueGrid::_loadSettings(void) void FactValueGrid::_loadSettings(void)
{ {
_preventSaveSettings = true;
_rows->deleteLater(); _rows->deleteLater();
_rows = new QmlObjectListModel(this); _rows = new QmlObjectListModel(this);
emit rowsChanged(_rows); _columnCount = 0;
QSettings settings; QSettings settings;
if (!settings.childGroups().contains(_userSettingsGroup)) { QString groupNameFormat("%1-%2");
if (!settings.childGroups().contains(groupNameFormat.arg(_userSettingsGroup).arg(_vehicleClass))) {
qgcApp()->toolbox()->corePlugin()->factValueGridCreateDefaultSettings(_defaultSettingsGroup); qgcApp()->toolbox()->corePlugin()->factValueGridCreateDefaultSettings(_defaultSettingsGroup);
} }
_preventSaveSettings = true;
if (settings.childGroups().contains(_defaultSettingsGroup)) { if (settings.childGroups().contains(groupNameFormat.arg(_defaultSettingsGroup).arg(_vehicleClass))) {
settings.beginGroup(_defaultSettingsGroup); settings.beginGroup(groupNameFormat.arg(_defaultSettingsGroup).arg(_vehicleClass));
} else { } else {
settings.beginGroup(_userSettingsGroup); settings.beginGroup(groupNameFormat.arg(_userSettingsGroup).arg(_vehicleClass));
} }
int version = settings.value(_versionKey, 0).toInt(); int version = settings.value(_versionKey, 0).toInt();
...@@ -333,11 +354,7 @@ void FactValueGrid::_loadSettings(void) ...@@ -333,11 +354,7 @@ void FactValueGrid::_loadSettings(void)
} }
settings.endArray(); settings.endArray();
_preventSaveSettings = false;
// Use defaults if nothing there
if (_rows->count() == 0) {
_rows->deleteLater();
emit rowsChanged(_rows); emit rowsChanged(_rows);
}
_preventSaveSettings = false;
} }
...@@ -65,8 +65,10 @@ public: ...@@ -65,8 +65,10 @@ public:
Q_INVOKABLE void appendColumn (void); Q_INVOKABLE void appendColumn (void);
Q_INVOKABLE void deleteLastColumn (void); Q_INVOKABLE void deleteLastColumn (void);
QmlObjectListModel* rows (void) const { return _rows; }
FontSize fontSize (void) const { return _fontSize; } FontSize fontSize (void) const { return _fontSize; }
QStringList iconNames (void) const { return _iconNames; } QStringList iconNames (void) const { return _iconNames; }
QGCMAVLink::VehicleClass_t vehicleClass(void) const { return _vehicleClass; }
void setFontSize(FontSize fontSize); void setFontSize(FontSize fontSize);
...@@ -81,9 +83,9 @@ signals: ...@@ -81,9 +83,9 @@ signals:
void columnCountChanged (int columnCount); void columnCountChanged (int columnCount);
protected: protected:
Q_DISABLE_COPY(FactValueGrid) Q_DISABLE_COPY(FactValueGrid)
QGCMAVLink::VehicleClass_t _vehicleClass = QGCMAVLink::VehicleClassGeneric;
QString _defaultSettingsGroup; // Settings group to read from if the user has not modified from the default settings QString _defaultSettingsGroup; // Settings group to read from if the user has not modified from the default settings
QString _userSettingsGroup; // Settings group to read from for user modified settings QString _userSettingsGroup; // Settings group to read from for user modified settings
Orientation _orientation = VerticalOrientation; Orientation _orientation = VerticalOrientation;
...@@ -92,11 +94,14 @@ protected: ...@@ -92,11 +94,14 @@ protected:
QmlObjectListModel* _rows = nullptr; QmlObjectListModel* _rows = nullptr;
int _columnCount = 0; int _columnCount = 0;
private slots:
void _offlineVehicleTypeChanged(void);
private: private:
InstrumentValueData* _createNewInstrumentValueWorker (QObject* parent); InstrumentValueData* _createNewInstrumentValueWorker (QObject* parent);
void _saveSettings (void); void _saveSettings (void);
void _loadSettings (void); void _loadSettings (void);
void _connectSignals (void); void _init (void);
void _connectSaveSignals (InstrumentValueData* value); void _connectSaveSignals (InstrumentValueData* value);
QString _pascalCase (const QString& text); QString _pascalCase (const QString& text);
void _saveValueData (QSettings& settings, InstrumentValueData* value); void _saveValueData (QSettings& settings, InstrumentValueData* value);
......
...@@ -14,8 +14,8 @@ ...@@ -14,8 +14,8 @@
#include <QSettings> #include <QSettings>
const QString HorizontalFactValueGrid::_toolbarUserSettingsGroup ("ToolbarUserSettings2"); const QString HorizontalFactValueGrid::_toolbarUserSettingsGroup ("TelemetryBarUserSettingsWIP0");
const QString HorizontalFactValueGrid::toolbarDefaultSettingsGroup ("ToolbarDefaultSettings2"); const QString HorizontalFactValueGrid::telemetryBarDefaultSettingsGroup ("TelemetryBarDefaultSettingsWIP0");
HorizontalFactValueGrid::HorizontalFactValueGrid(QQuickItem* parent) HorizontalFactValueGrid::HorizontalFactValueGrid(QQuickItem* parent)
: FactValueGrid(parent) : FactValueGrid(parent)
......
...@@ -24,10 +24,10 @@ public: ...@@ -24,10 +24,10 @@ public:
HorizontalFactValueGrid(QQuickItem *parent = nullptr); HorizontalFactValueGrid(QQuickItem *parent = nullptr);
HorizontalFactValueGrid(const QString& defaultSettingsGroup); HorizontalFactValueGrid(const QString& defaultSettingsGroup);
Q_PROPERTY(QString toolbarDefaultSettingsGroup MEMBER toolbarDefaultSettingsGroup CONSTANT) Q_PROPERTY(QString telemetryBarDefaultSettingsGroup MEMBER telemetryBarDefaultSettingsGroup CONSTANT)
Q_PROPERTY(QString toolbarUserSettingsGroup MEMBER _toolbarUserSettingsGroup CONSTANT) Q_PROPERTY(QString telemetryBarUserSettingsGroup MEMBER _toolbarUserSettingsGroup CONSTANT)
static const QString toolbarDefaultSettingsGroup; static const QString telemetryBarDefaultSettingsGroup;
private: private:
Q_DISABLE_COPY(HorizontalFactValueGrid) Q_DISABLE_COPY(HorizontalFactValueGrid)
......
...@@ -26,7 +26,8 @@ import QGroundControl 1.0 ...@@ -26,7 +26,8 @@ import QGroundControl 1.0
T.HorizontalFactValueGrid { T.HorizontalFactValueGrid {
id: _root id: _root
width: topLevelRowLayout.width Layout.preferredWidth: topLevelRowLayout.width
Layout.preferredHeight: topLevelRowLayout.height
property bool settingsUnlocked: false property bool settingsUnlocked: false
...@@ -40,12 +41,11 @@ T.HorizontalFactValueGrid { ...@@ -40,12 +41,11 @@ T.HorizontalFactValueGrid {
RowLayout { RowLayout {
id: topLevelRowLayout id: topLevelRowLayout
height: parent.height
Item { Item {
id: lockItem id: lockItem
Layout.fillHeight: true Layout.fillHeight: true
width: ScreenTools.minTouchPixels Layout.preferredWidth: ScreenTools.minTouchPixels
visible: settingsUnlocked visible: settingsUnlocked
enabled: settingsUnlocked enabled: settingsUnlocked
...@@ -71,7 +71,6 @@ T.HorizontalFactValueGrid { ...@@ -71,7 +71,6 @@ T.HorizontalFactValueGrid {
GridLayout { GridLayout {
id: valueGrid id: valueGrid
Layout.preferredHeight: _root.height
rows: _root.rows.count rows: _root.rows.count
rowSpacing: 0 rowSpacing: 0
...@@ -86,7 +85,7 @@ T.HorizontalFactValueGrid { ...@@ -86,7 +85,7 @@ T.HorizontalFactValueGrid {
InstrumentValueLabel { InstrumentValueLabel {
Layout.row: labelRepeater._index Layout.row: labelRepeater._index
Layout.column: index * 2 Layout.column: index * 3
Layout.fillHeight: true Layout.fillHeight: true
Layout.alignment: Qt.AlignRight Layout.alignment: Qt.AlignRight
instrumentValueData: object instrumentValueData: object
...@@ -105,18 +104,36 @@ T.HorizontalFactValueGrid { ...@@ -105,18 +104,36 @@ T.HorizontalFactValueGrid {
InstrumentValueValue { InstrumentValueValue {
Layout.row: valueRepeater._index Layout.row: valueRepeater._index
Layout.column: index * 2 + 1 Layout.column: (index * 3) + 1
Layout.fillHeight: true Layout.fillHeight: true
Layout.alignment: Qt.AlignLeft Layout.alignment: Qt.AlignLeft
instrumentValueData: object instrumentValueData: object
} }
} }
} }
Repeater {
model: _root.rows
Repeater {
id: spacerRepeater
model: object.count > 1 ? object : 0
property real _index: index
Item {
Layout.row: spacerRepeater._index
Layout.column: (index * 3) + 2
Layout.preferredWidth: ScreenTools.defaultFontPixelWidth
Layout.preferredHeight: 1
}
}
}
} }
RowLayout { RowLayout {
id: rowButtons id: rowButtons
height: ScreenTools.minTouchPixels / 2 Layout.preferredHeight: ScreenTools.minTouchPixels / 2
Layout.fillWidth: true Layout.fillWidth: true
spacing: 1 spacing: 1
visible: settingsUnlocked visible: settingsUnlocked
......
...@@ -30,4 +30,5 @@ PreFlightRCCheck 1.0 PreFlightRCCheck.qml ...@@ -30,4 +30,5 @@ PreFlightRCCheck 1.0 PreFlightRCCheck.qml
PreFlightSensorsHealthCheck 1.0 PreFlightSensorsHealthCheck.qml PreFlightSensorsHealthCheck 1.0 PreFlightSensorsHealthCheck.qml
PreFlightSoundCheck 1.0 PreFlightSoundCheck.qml PreFlightSoundCheck 1.0 PreFlightSoundCheck.qml
TerrainProgress 1.0 TerrainProgress.qml TerrainProgress 1.0 TerrainProgress.qml
TelemetryValuesBar 1.0 TelemetryValuesBar.qml
VehicleWarnings 1.0 VehicleWarnings.qml VehicleWarnings 1.0 VehicleWarnings.qml
...@@ -17,7 +17,7 @@ import QGroundControl.Controls 1.0 ...@@ -17,7 +17,7 @@ import QGroundControl.Controls 1.0
Rectangle { Rectangle {
id: _root id: _root
color: qgcPal.globalTheme === QGCPalette.Light ? QGroundControl.corePlugin.options.toolbarBackgroundLight : QGroundControl.corePlugin.options.toolbarBackgroundDark color: qgcPal.toolbarBackground
width: _idealWidth < repeater.contentWidth ? repeater.contentWidth : _idealWidth width: _idealWidth < repeater.contentWidth ? repeater.contentWidth : _idealWidth
height: Math.min(maxHeight, toolStripColumn.height + (flickable.anchors.margins * 2)) height: Math.min(maxHeight, toolStripColumn.height + (flickable.anchors.margins * 2))
radius: ScreenTools.defaultFontPixelWidth / 2 radius: ScreenTools.defaultFontPixelWidth / 2
......
...@@ -97,7 +97,6 @@ public: ...@@ -97,7 +97,6 @@ public:
QmlComponentInfo* pQmlTest = nullptr; QmlComponentInfo* pQmlTest = nullptr;
#endif #endif
QmlComponentInfo* valuesPageWidgetInfo = nullptr;
QmlComponentInfo* cameraPageWidgetInfo = nullptr; QmlComponentInfo* cameraPageWidgetInfo = nullptr;
QmlComponentInfo* videoPageWidgetInfo = nullptr; QmlComponentInfo* videoPageWidgetInfo = nullptr;
QmlComponentInfo* vibrationPageWidgetInfo = nullptr; QmlComponentInfo* vibrationPageWidgetInfo = nullptr;
...@@ -191,10 +190,6 @@ void QGCCorePlugin::_autoStreamChanged() ...@@ -191,10 +190,6 @@ void QGCCorePlugin::_autoStreamChanged()
void QGCCorePlugin::_resetInstrumentPages() void QGCCorePlugin::_resetInstrumentPages()
{ {
if (_p->valuesPageWidgetInfo) {
_p->valuesPageWidgetInfo->deleteLater();
_p->valuesPageWidgetInfo = nullptr;
}
if(_p->cameraPageWidgetInfo) { if(_p->cameraPageWidgetInfo) {
_p->cameraPageWidgetInfo->deleteLater(); _p->cameraPageWidgetInfo->deleteLater();
_p->cameraPageWidgetInfo = nullptr; _p->cameraPageWidgetInfo = nullptr;
...@@ -273,8 +268,7 @@ QVariantList &QGCCorePlugin::settingsPages() ...@@ -273,8 +268,7 @@ QVariantList &QGCCorePlugin::settingsPages()
QVariantList& QGCCorePlugin::instrumentPages() QVariantList& QGCCorePlugin::instrumentPages()
{ {
if (!_p->valuesPageWidgetInfo) { if (!_p->cameraPageWidgetInfo) {
_p->valuesPageWidgetInfo = new QmlComponentInfo(tr("Values"), QUrl::fromUserInput("qrc:/qml/ValuePageWidget.qml"));
_p->cameraPageWidgetInfo = new QmlComponentInfo(tr("Camera"), QUrl::fromUserInput("qrc:/qml/CameraPageWidget.qml")); _p->cameraPageWidgetInfo = new QmlComponentInfo(tr("Camera"), QUrl::fromUserInput("qrc:/qml/CameraPageWidget.qml"));
#if defined(QGC_GST_STREAMING) #if defined(QGC_GST_STREAMING)
if(!_currentCamera || !_currentCamera->autoStream()) { if(!_currentCamera || !_currentCamera->autoStream()) {
...@@ -284,7 +278,6 @@ QVariantList& QGCCorePlugin::instrumentPages() ...@@ -284,7 +278,6 @@ QVariantList& QGCCorePlugin::instrumentPages()
#endif #endif
_p->vibrationPageWidgetInfo = new QmlComponentInfo(tr("Vibration"), QUrl::fromUserInput("qrc:/qml/VibrationPageWidget.qml")); _p->vibrationPageWidgetInfo = new QmlComponentInfo(tr("Vibration"), QUrl::fromUserInput("qrc:/qml/VibrationPageWidget.qml"));
_p->instrumentPageWidgetList.append(QVariant::fromValue(_p->valuesPageWidgetInfo));
_p->instrumentPageWidgetList.append(QVariant::fromValue(_p->cameraPageWidgetInfo)); _p->instrumentPageWidgetList.append(QVariant::fromValue(_p->cameraPageWidgetInfo));
#if defined(QGC_GST_STREAMING) #if defined(QGC_GST_STREAMING)
_p->instrumentPageWidgetList.append(QVariant::fromValue(_p->videoPageWidgetInfo)); _p->instrumentPageWidgetList.append(QVariant::fromValue(_p->videoPageWidgetInfo));
...@@ -397,46 +390,75 @@ QString QGCCorePlugin::showAdvancedUIMessage() const ...@@ -397,46 +390,75 @@ QString QGCCorePlugin::showAdvancedUIMessage() const
void QGCCorePlugin::factValueGridCreateDefaultSettings(const QString& defaultSettingsGroup) void QGCCorePlugin::factValueGridCreateDefaultSettings(const QString& defaultSettingsGroup)
{ {
if (defaultSettingsGroup == VerticalFactValueGrid::valuePageDefaultSettingsGroup) { HorizontalFactValueGrid factValueGrid(defaultSettingsGroup);
VerticalFactValueGrid factValueGrid(defaultSettingsGroup);
bool includeFWValues = factValueGrid.vehicleClass() == QGCMAVLink::VehicleClassFixedWing || factValueGrid.vehicleClass() == QGCMAVLink::VehicleClassVTOL;
factValueGrid.setFontSize(FactValueGrid::LargeFontSize); factValueGrid.setFontSize(FactValueGrid::LargeFontSize);
QmlObjectListModel* row = factValueGrid.appendRow(); factValueGrid.appendRow();
InstrumentValueData* value = row->value<InstrumentValueData*>(0); factValueGrid.appendRow();
value->setFact("Vehicle", "DistanceToHome"); factValueGrid.appendColumn();
factValueGrid.appendColumn();
if (includeFWValues) {
factValueGrid.appendColumn();
}
int colIndex = 0;
QmlObjectListModel* row = factValueGrid.rows()->value<QmlObjectListModel*>(0);
InstrumentValueData* value = row->value<InstrumentValueData*>(colIndex++);
value->setFact("Vehicle", "AltitudeRelative");
value->setIcon("arrow-thick-up.svg");
value->setText(value->fact()->shortDescription()); value->setText(value->fact()->shortDescription());
value->setShowUnits(true); value->setShowUnits(true);
row = factValueGrid.appendRow(); value = row->value<InstrumentValueData*>(colIndex++);
value = row->value<InstrumentValueData*>(0); value->setFact("Vehicle", "ClimbRate");
value->setFact("Vehicle", "FlightDistance"); value->setIcon("arrow-simple-up.svg");
value->setText(value->fact()->shortDescription()); value->setText(value->fact()->shortDescription());
value->setShowUnits(true); value->setShowUnits(true);
row = factValueGrid.appendRow(); if (includeFWValues) {
value = row->value<InstrumentValueData*>(0); value = row->value<InstrumentValueData*>(colIndex++);
value->setFact("Vehicle", "AirSpeed");
value->setText("AirSpd");
value->setShowUnits(true);
}
value = row->value<InstrumentValueData*>(colIndex++);
value->setFact("Vehicle", "FlightTime"); value->setFact("Vehicle", "FlightTime");
value->setIcon("timer.svg");
value->setText(value->fact()->shortDescription()); value->setText(value->fact()->shortDescription());
value->setShowUnits(false); value->setShowUnits(false);
} else if (defaultSettingsGroup == HorizontalFactValueGrid::toolbarDefaultSettingsGroup) {
HorizontalFactValueGrid factValueGrid(defaultSettingsGroup);
factValueGrid.setFontSize(FactValueGrid::LargeFontSize); colIndex = 0;
row = factValueGrid.rows()->value<QmlObjectListModel*>(1);
QmlObjectListModel* row = factValueGrid.appendRow(); value = row->value<InstrumentValueData*>(colIndex++);
InstrumentValueData* value = row->value<InstrumentValueData*>(0); value->setFact("Vehicle", "DistanceToHome");
value->setFact("Vehicle", "AltitudeRelative"); value->setIcon("bookmark copy 3.svg");
value->setIcon("arrow-thick-up.svg");
value->setText(value->fact()->shortDescription()); value->setText(value->fact()->shortDescription());
value->setShowUnits(true); value->setShowUnits(true);
row = factValueGrid.appendRow(); value = row->value<InstrumentValueData*>(colIndex++);
value = row->value<InstrumentValueData*>(0);
value->setFact("Vehicle", "GroundSpeed"); value->setFact("Vehicle", "GroundSpeed");
value->setIcon("arrow-thick-right.svg"); value->setIcon("arrow-simple-right.svg");
value->setText(value->fact()->shortDescription());
value->setShowUnits(true);
if (includeFWValues) {
value = row->value<InstrumentValueData*>(colIndex++);
value->setFact("Vehicle", "ThrottlePct");
value->setText("Thr");
value->setShowUnits(true); value->setShowUnits(true);
} }
value = row->value<InstrumentValueData*>(colIndex++);
value->setFact("Vehicle", "FlightDistance");
value->setIcon("travel-walk.svg");
value->setText(value->fact()->shortDescription());
value->setShowUnits(true);
} }
QQmlApplicationEngine* QGCCorePlugin::createQmlApplicationEngine(QObject* parent) QQmlApplicationEngine* QGCCorePlugin::createQmlApplicationEngine(QObject* parent)
......
...@@ -55,8 +55,6 @@ public: ...@@ -55,8 +55,6 @@ public:
Q_PROPERTY(double toolbarHeightMultiplier READ toolbarHeightMultiplier CONSTANT) Q_PROPERTY(double toolbarHeightMultiplier READ toolbarHeightMultiplier CONSTANT)
Q_PROPERTY(bool enablePlanViewSelector READ enablePlanViewSelector CONSTANT) Q_PROPERTY(bool enablePlanViewSelector READ enablePlanViewSelector CONSTANT)
Q_PROPERTY(QUrl preFlightChecklistUrl READ preFlightChecklistUrl CONSTANT) Q_PROPERTY(QUrl preFlightChecklistUrl READ preFlightChecklistUrl CONSTANT)
Q_PROPERTY(QColor toolbarBackgroundLight READ toolbarBackgroundLight CONSTANT)
Q_PROPERTY(QColor toolbarBackgroundDark READ toolbarBackgroundDark CONSTANT)
Q_PROPERTY(bool showSensorCalibrationCompass READ showSensorCalibrationCompass NOTIFY showSensorCalibrationCompassChanged) Q_PROPERTY(bool showSensorCalibrationCompass READ showSensorCalibrationCompass NOTIFY showSensorCalibrationCompassChanged)
Q_PROPERTY(bool showSensorCalibrationGyro READ showSensorCalibrationGyro NOTIFY showSensorCalibrationGyroChanged) Q_PROPERTY(bool showSensorCalibrationGyro READ showSensorCalibrationGyro NOTIFY showSensorCalibrationGyroChanged)
Q_PROPERTY(bool showSensorCalibrationAccel READ showSensorCalibrationAccel NOTIFY showSensorCalibrationAccelChanged) Q_PROPERTY(bool showSensorCalibrationAccel READ showSensorCalibrationAccel NOTIFY showSensorCalibrationAccelChanged)
......
...@@ -375,7 +375,7 @@ ApplicationWindow { ...@@ -375,7 +375,7 @@ ApplicationWindow {
id: planButton id: planButton
height: viewSelectDrawer._toolButtonHeight height: viewSelectDrawer._toolButtonHeight
Layout.fillWidth: true Layout.fillWidth: true
text: qsTr("Plan View") text: qsTr("Plan Mission")
imageResource: "/qmlimages/Plan.svg" imageResource: "/qmlimages/Plan.svg"
imageColor: qgcPal.text imageColor: qgcPal.text
onClicked: { onClicked: {
......
...@@ -21,7 +21,7 @@ import QGroundControl.Controllers 1.0 ...@@ -21,7 +21,7 @@ import QGroundControl.Controllers 1.0
Rectangle { Rectangle {
id: _root id: _root
color: qgcPal.globalTheme === QGCPalette.Light ? QGroundControl.corePlugin.options.toolbarBackgroundLight : QGroundControl.corePlugin.options.toolbarBackgroundDark color: qgcPal.toolbarBackground
property int currentToolbar: flyViewToolbar property int currentToolbar: flyViewToolbar
...@@ -115,39 +115,11 @@ Rectangle { ...@@ -115,39 +115,11 @@ Rectangle {
anchors.right: parent.right anchors.right: parent.right
contentWidth: indicatorLoader.x + indicatorLoader.width contentWidth: indicatorLoader.x + indicatorLoader.width
flickableDirection: Flickable.HorizontalFlick flickableDirection: Flickable.HorizontalFlick
clip: !valueArea.settingsUnlocked
HorizontalFactValueGrid {
id: valueArea
anchors.top: parent.top
anchors.bottom: parent.bottom
userSettingsGroup: toolbarUserSettingsGroup
defaultSettingsGroup: toolbarDefaultSettingsGroup
visible: currentToolbar !== planViewToolbar
QGCMouseArea {
anchors.fill: parent
visible: !parent.settingsUnlocked
onClicked: parent.settingsUnlocked = true
}
}
Rectangle {
id: separator2
anchors.margins: ScreenTools.defaultFontPixelHeight / 2
anchors.bottomMargin: ScreenTools.defaultFontPixelHeight / 2 - 1
anchors.top: parent.top
anchors.bottom: parent.bottom
anchors.left: valueArea.right
width: 1
color: qgcPal.text
visible: currentToolbar == flyViewToolbar
}
Loader { Loader {
id: indicatorLoader id: indicatorLoader
anchors.leftMargin: currentToolbar !== planViewToolbar ? ScreenTools.defaultFontPixelHeight / 2 : 0 anchors.leftMargin: currentToolbar !== planViewToolbar ? ScreenTools.defaultFontPixelHeight / 2 : 0
anchors.left: currentToolbar !== planViewToolbar ? separator2.right : parent.left anchors.left: parent.left//currentToolbar !== planViewToolbar ? valueArea.right : parent.left
anchors.top: parent.top anchors.top: parent.top
anchors.bottom: parent.bottom anchors.bottom: parent.bottom
source: currentToolbar === flyViewToolbar ? source: currentToolbar === flyViewToolbar ?
......
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