diff --git a/src/MissionEditor/MissionEditor.qml b/src/MissionEditor/MissionEditor.qml index b05d49231c54567d186b7579b9aaf50496d12e1d..e71b2302627e5eb0f4880f0db8987737bfe13b56 100644 --- a/src/MissionEditor/MissionEditor.qml +++ b/src/MissionEditor/MissionEditor.qml @@ -37,7 +37,7 @@ QGCView { readonly property real _margin: ScreenTools.defaultFontPixelHeight * 0.5 readonly property var _activeVehicle: QGroundControl.multiVehicleManager.activeVehicle readonly property real _rightPanelWidth: Math.min(parent.width / 3, ScreenTools.defaultFontPixelWidth * 30) - readonly property real _rightPanelOpacity: 0.8 + readonly property real _rightPanelOpacity: 1 readonly property int _toolButtonCount: 6 readonly property real _toolButtonTopMargin: parent.height - ScreenTools.availableHeight + (ScreenTools.defaultFontPixelHeight / 2) readonly property var _defaultVehicleCoordinate: QtPositioning.coordinate(37.803784, -122.462276) diff --git a/src/MissionEditor/MissionItemEditor.qml b/src/MissionEditor/MissionItemEditor.qml index c59674d8fd48ed172e98cdc9d316e5bed84d7e54..e9f4797ff0e58228be5fe57a42f43c7f187b13e1 100644 --- a/src/MissionEditor/MissionItemEditor.qml +++ b/src/MissionEditor/MissionItemEditor.qml @@ -55,7 +55,7 @@ Rectangle { color: _outerTextColor } - Image { + QGCColoredImage { id: hamburger anchors.rightMargin: ScreenTools.defaultFontPixelWidth anchors.right: parent.right @@ -65,6 +65,7 @@ Rectangle { sourceSize.height: _hamburgerSize source: "qrc:/qmlimages/Hamburger.svg" visible: missionItem.isCurrentItem && missionItem.sequenceNumber != 0 + color: qgcPal.windowShade MouseArea { anchors.fill: parent diff --git a/src/MissionEditor/MissionSettingsEditor.qml b/src/MissionEditor/MissionSettingsEditor.qml index b6a0629249cb5ad86fd42215a5c944decb677f91..65311e3ad1a7985d54cc3052bb77bb28c2a61d7b 100644 --- a/src/MissionEditor/MissionSettingsEditor.qml +++ b/src/MissionEditor/MissionSettingsEditor.qml @@ -37,6 +37,7 @@ Rectangle { property bool _showOfflineEditingCombos: _offlineEditing && _noMissionItemsAdded property bool _showCruiseSpeed: !_missionVehicle.multiRotor property bool _showHoverSpeed: _missionVehicle.multiRotor || missionController.vehicle.vtol + property bool _multipleFirmware: QGroundControl.supportedFirmwareCount > 2 readonly property string _firmwareLabel: qsTr("Firmware:") readonly property string _vehicleLabel: qsTr("Vehicle:") @@ -50,7 +51,9 @@ Rectangle { anchors.top: parent.top spacing: _margin - QGCLabel { text: qsTr("Planned Home Position:") } + QGCLabel { + text: qsTr("Planned Home Position") + } Rectangle { anchors.left: parent.left @@ -90,27 +93,25 @@ Rectangle { } } - QGCButton { - text: qsTr("Move Home to map center") - visible: missionItem.homePosition - onClicked: editorRoot.moveHomeToMapCenter() - anchors.horizontalCenter: parent.horizontalCenter - } - QGCLabel { width: parent.width wrapMode: Text.WordWrap font.pointSize: ScreenTools.smallFontPointSize - text: qsTr("Note: Planned home position for mission display only. Actual home position set by vehicle at flight time.") + text: qsTr("Actual position set by vehicle at flight time.") + horizontalAlignment: Text.AlignHCenter } - QGCLabel { text: qsTr("Vehicle Info:") } + QGCLabel { + text: qsTr("Vehicle Info:") + visible: _multipleFirmware + } Rectangle { anchors.left: parent.left anchors.right: parent.right height: 1 color: qgcPal.text + visible: _multipleFirmware } GridLayout { @@ -119,6 +120,7 @@ Rectangle { columnSpacing: ScreenTools.defaultFontPixelWidth rowSpacing: columnSpacing columns: 2 + visible: _multipleFirmware QGCLabel { text: _firmwareLabel @@ -187,8 +189,23 @@ Rectangle { width: parent.width wrapMode: Text.WordWrap font.pointSize: ScreenTools.smallFontPointSize - text: qsTr("Note: Speeds are planned speeds only for time calculations. Actual vehicle will not be affected.") + visible: _multipleFirmware + text: qsTr("Speeds are only for time calculations. Actual vehicle will not be affected.") + } + + Rectangle { + anchors.left: parent.left + anchors.right: parent.right + height: 1 + color: qgcPal.text } + + QGCButton { + text: qsTr("Set Home To Map Center") + onClicked: editorRoot.moveHomeToMapCenter() + anchors.horizontalCenter: parent.horizontalCenter + } + } // Column } // Item } // Component diff --git a/src/QGCPalette.cc b/src/QGCPalette.cc index 6e6ea60953cf1b08bb20b3a2cc2423be48e2cf82..6416801bc3098f7b995d54f43c3f69c0d40c055d 100644 --- a/src/QGCPalette.cc +++ b/src/QGCPalette.cc @@ -42,7 +42,7 @@ QColor QGCPalette::_text[QGCPalette::_cThemes][QGCPalette::_cColorGroups] = { QColor QGCPalette::_warningText[QGCPalette::_cThemes][QGCPalette::_cColorGroups] = { { QColor("#cc0808"), QColor("#cc0808") }, - { QColor("#e4e428"), QColor("#e4e428") } + { QColor("0xed, 0xd4, 0x69"), QColor("0xed, 0xd4, 0x69") } }; QColor QGCPalette::_button[QGCPalette::_cThemes][QGCPalette::_cColorGroups] = { @@ -57,7 +57,7 @@ QColor QGCPalette::_buttonText[QGCPalette::_cThemes][QGCPalette::_cColorGroups] QColor QGCPalette::_buttonHighlight[QGCPalette::_cThemes][QGCPalette::_cColorGroups] = { { QColor("#e4e4e4"), QColor("#33b5e5") }, - { QColor(0x58, 0x58, 0x58), QColor(237, 235, 51) }, + { QColor(0x58, 0x58, 0x58), QColor(0xed, 0xd4, 0x69) }, }; QColor QGCPalette::_buttonHighlightText[QGCPalette::_cThemes][QGCPalette::_cColorGroups] = { diff --git a/src/QmlControls/QGCButton.qml b/src/QmlControls/QGCButton.qml index 1417af567db569d9f34772ca36977a71a614ac3e..5cff7f1dff90a48c96e5e2620d8de4a3a6bd68d9 100644 --- a/src/QmlControls/QGCButton.qml +++ b/src/QmlControls/QGCButton.qml @@ -50,10 +50,10 @@ Button { style: ButtonStyle { /*! The padding between the background and the label components. */ padding { - top: __padding + top: __padding * 0.5 left: __padding right: control.menu !== null ? Math.round(ScreenTools.defaultFontPixelHeight) : __padding - bottom: __padding + bottom: __padding * 0.5 } /*! This defines the background of the button. */ @@ -66,6 +66,7 @@ Button { anchors.fill: parent border.width: _showBorder ? 1: 0 border.color: _qgcPal.buttonText + radius: 3 color: _showHighlight ? control._qgcPal.buttonHighlight : (primary ? control._qgcPal.primaryButton : control._qgcPal.button) diff --git a/src/QmlControls/QGCComboBox.qml b/src/QmlControls/QGCComboBox.qml index c8f24b13bc9b5a7cee98a83157d5a6a41c03ae35..4e2150add8811ef064c356f13548ac7aa851c969 100644 --- a/src/QmlControls/QGCComboBox.qml +++ b/src/QmlControls/QGCComboBox.qml @@ -24,6 +24,7 @@ ComboBox { Rectangle { anchors.fill: parent color: _showHighlight ? control._qgcPal.buttonHighlight : control._qgcPal.button + radius: 3 border.width: _showBorder ? 1: 0 border.color: control._qgcPal.buttonText } diff --git a/src/QmlControls/QGroundControlQmlGlobal.cc b/src/QmlControls/QGroundControlQmlGlobal.cc index 759d6c8534c47cb04cc7b7b222324225c03c0474..19f0c8ced8cb92de2492bc4524564ceb82d58f89 100644 --- a/src/QmlControls/QGroundControlQmlGlobal.cc +++ b/src/QmlControls/QGroundControlQmlGlobal.cc @@ -46,6 +46,7 @@ QGroundControlQmlGlobal::QGroundControlQmlGlobal(QGCApplication* app) , _videoManager(NULL) , _mavlinkLogManager(NULL) , _corePlugin(NULL) + , _firmwarePluginManager(NULL) , _virtualTabletJoystick(false) , _baseFontPointSize(0.0) { @@ -74,6 +75,7 @@ void QGroundControlQmlGlobal::setToolbox(QGCToolbox* toolbox) _videoManager = toolbox->videoManager(); _mavlinkLogManager = toolbox->mavlinkLogManager(); _corePlugin = toolbox->corePlugin(); + _firmwarePluginManager = toolbox->firmwarePluginManager(); } void QGroundControlQmlGlobal::saveGlobalSetting (const QString& key, const QString& value) @@ -337,6 +339,12 @@ Fact* QGroundControlQmlGlobal::batteryPercentRemainingAnnounce(void) return _batteryPercentRemainingAnnounceFact; } +int QGroundControlQmlGlobal::supportedFirmwareCount() +{ + return _firmwarePluginManager->knownFirmwareTypes().count(); +} + + bool QGroundControlQmlGlobal::linesIntersect(QPointF line1A, QPointF line1B, QPointF line2A, QPointF line2B) { QPointF intersectPoint; diff --git a/src/QmlControls/QGroundControlQmlGlobal.h b/src/QmlControls/QGroundControlQmlGlobal.h index 757573e812c06da00a0e01c7b15aad0019e3f93f..47a46e647e4f5f445d0d5d1743b8b9ede42f7268 100644 --- a/src/QmlControls/QGroundControlQmlGlobal.h +++ b/src/QmlControls/QGroundControlQmlGlobal.h @@ -99,6 +99,7 @@ public: Q_PROPERTY(Fact* areaUnits READ areaUnits CONSTANT) Q_PROPERTY(Fact* speedUnits READ speedUnits CONSTANT) Q_PROPERTY(Fact* batteryPercentRemainingAnnounce READ batteryPercentRemainingAnnounce CONSTANT) + Q_PROPERTY(int supportedFirmwareCount READ supportedFirmwareCount CONSTANT) Q_PROPERTY(QGeoCoordinate lastKnownHomePosition READ lastKnownHomePosition CONSTANT) Q_PROPERTY(QGeoCoordinate flightMapPosition MEMBER _flightMapPosition NOTIFY flightMapPositionChanged) @@ -196,6 +197,8 @@ public: static Fact* speedUnits (void); static Fact* batteryPercentRemainingAnnounce(void); + int supportedFirmwareCount (); + void setIsDarkStyle (bool dark); void setIsAudioMuted (bool muted); void setIsSaveLogPrompt (bool prompt); @@ -245,6 +248,7 @@ private: VideoManager* _videoManager; MAVLinkLogManager* _mavlinkLogManager; QGCCorePlugin* _corePlugin; + FirmwarePluginManager* _firmwarePluginManager; bool _virtualTabletJoystick; qreal _baseFontPointSize; diff --git a/src/VideoStreaming/VideoStreaming.cc b/src/VideoStreaming/VideoStreaming.cc index f70ddd60bdeee01e9f7347b8c3468f2d7081e509..48c0527d997d8a4e09c57f21c0f771af7d1c6b53 100644 --- a/src/VideoStreaming/VideoStreaming.cc +++ b/src/VideoStreaming/VideoStreaming.cc @@ -131,7 +131,7 @@ void initializeVideoStreaming(int &argc, char* argv[]) // Our own plugin GST_PLUGIN_STATIC_REGISTER(QGC_VIDEOSINK_PLUGIN); // The static plugins we use - #if defined(__mobile__) + #if defined(__mobile__) && !defined(__macos__) GST_PLUGIN_STATIC_REGISTER(coreelements); GST_PLUGIN_STATIC_REGISTER(libav); GST_PLUGIN_STATIC_REGISTER(rtp); diff --git a/src/VideoStreaming/gstqtvideosink/utils/glutils.h b/src/VideoStreaming/gstqtvideosink/utils/glutils.h index 002b1aa54ad0d2b8112bf961b7e778b0778138b6..f7de1882b3ca8e604ecb536e2cf9a1b4869679fc 100644 --- a/src/VideoStreaming/gstqtvideosink/utils/glutils.h +++ b/src/VideoStreaming/gstqtvideosink/utils/glutils.h @@ -17,7 +17,7 @@ #ifndef GLUTILS_H #define GLUTILS_H -#ifdef __mobile__ +#if defined(__mobile__) && !defined(__macos__) #include #define getQOpenGLFunctions() QOpenGLContext::currentContext()->functions() #define QOpenGLFunctionsDef QOpenGLFunctions