Commit ac08dd5a authored by DoinLakeFlyer's avatar DoinLakeFlyer

parent f48f8c8c
...@@ -177,6 +177,7 @@ ...@@ -177,6 +177,7 @@
<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/VehicleRotationCal.qml">src/QmlControls/VehicleRotationCal.qml</file> <file alias="QGroundControl/Controls/VehicleRotationCal.qml">src/QmlControls/VehicleRotationCal.qml</file>
......
...@@ -217,20 +217,31 @@ bool ArduSubFirmwarePlugin::supportsMotorInterference(void) ...@@ -217,20 +217,31 @@ bool ArduSubFirmwarePlugin::supportsMotorInterference(void)
return false; return false;
} }
const QVariantList& ArduSubFirmwarePlugin::toolBarIndicators(const Vehicle* vehicle) const QVariantList& ArduSubFirmwarePlugin::toolIndicators(const Vehicle* vehicle)
{ {
Q_UNUSED(vehicle); Q_UNUSED(vehicle);
//-- Sub specific list of indicators (Enter your modified list here) //-- Sub specific list of indicators (Enter your modified list here)
if(_toolBarIndicators.size() == 0) { if(_toolIndicators.size() == 0) {
_toolBarIndicators = QVariantList({ _toolIndicators = QVariantList({
QVariant::fromValue(QUrl::fromUserInput("qrc:/toolbar/MessageIndicator.qml")), QVariant::fromValue(QUrl::fromUserInput("qrc:/toolbar/MessageIndicator.qml")),
QVariant::fromValue(QUrl::fromUserInput("qrc:/toolbar/BatteryIndicator.qml")), QVariant::fromValue(QUrl::fromUserInput("qrc:/toolbar/BatteryIndicator.qml")),
QVariant::fromValue(QUrl::fromUserInput("qrc:/toolbar/JoystickIndicator.qml")), QVariant::fromValue(QUrl::fromUserInput("qrc:/toolbar/JoystickIndicator.qml")),
});
}
return _toolIndicators;
}
const QVariantList& ArduSubFirmwarePlugin::modeIndicators(const Vehicle* vehicle)
{
Q_UNUSED(vehicle);
//-- Sub specific list of indicators (Enter your modified list here)
if(_modeIndicators.size() == 0) {
_modeIndicators = QVariantList({
QVariant::fromValue(QUrl::fromUserInput("qrc:/toolbar/ModeIndicator.qml")), QVariant::fromValue(QUrl::fromUserInput("qrc:/toolbar/ModeIndicator.qml")),
QVariant::fromValue(QUrl::fromUserInput("qrc:/toolbar/ArmedIndicator.qml")), QVariant::fromValue(QUrl::fromUserInput("qrc:/toolbar/ArmedIndicator.qml")),
}); });
} }
return _toolBarIndicators; return _modeIndicators;
} }
void ArduSubFirmwarePlugin::_handleNamedValueFloat(mavlink_message_t* message) void ArduSubFirmwarePlugin::_handleNamedValueFloat(mavlink_message_t* message)
......
...@@ -136,14 +136,16 @@ public: ...@@ -136,14 +136,16 @@ public:
QString brandImageOutdoor(const Vehicle* vehicle) const final { Q_UNUSED(vehicle); return QStringLiteral("/qmlimages/APM/BrandImageSub"); } QString brandImageOutdoor(const Vehicle* vehicle) const final { Q_UNUSED(vehicle); return QStringLiteral("/qmlimages/APM/BrandImageSub"); }
const FirmwarePlugin::remapParamNameMajorVersionMap_t& paramNameRemapMajorVersionMap(void) const final { return _remapParamName; } const FirmwarePlugin::remapParamNameMajorVersionMap_t& paramNameRemapMajorVersionMap(void) const final { return _remapParamName; }
int remapParamNameHigestMinorVersionNumber(int majorVersionNumber) const final; int remapParamNameHigestMinorVersionNumber(int majorVersionNumber) const final;
const QVariantList& toolBarIndicators(const Vehicle* vehicle) final; const QVariantList& toolIndicators(const Vehicle* vehicle) final;
const QVariantList& modeIndicators(const Vehicle* vehicle) final;
bool adjustIncomingMavlinkMessage(Vehicle* vehicle, mavlink_message_t* message) final; bool adjustIncomingMavlinkMessage(Vehicle* vehicle, mavlink_message_t* message) final;
virtual QMap<QString, FactGroup*>* factGroups(void) final; virtual QMap<QString, FactGroup*>* factGroups(void) final;
void adjustMetaData(MAV_TYPE vehicleType, FactMetaData* metaData) override final; void adjustMetaData(MAV_TYPE vehicleType, FactMetaData* metaData) override final;
private: private:
QVariantList _toolBarIndicators; QVariantList _toolIndicators;
QVariantList _modeIndicators;
static bool _remapParamNameIntialized; static bool _remapParamNameIntialized;
QMap<QString, QString> _factRenameMap; QMap<QString, QString> _factRenameMap;
static FirmwarePlugin::remapParamNameMajorVersionMap_t _remapParamName; static FirmwarePlugin::remapParamNameMajorVersionMap_t _remapParamName;
......
...@@ -304,17 +304,26 @@ QString FirmwarePlugin::vehicleImageCompass(const Vehicle*) const ...@@ -304,17 +304,26 @@ QString FirmwarePlugin::vehicleImageCompass(const Vehicle*) const
return QStringLiteral("/qmlimages/compassInstrumentArrow.svg"); return QStringLiteral("/qmlimages/compassInstrumentArrow.svg");
} }
const QVariantList &FirmwarePlugin::toolBarIndicators(const Vehicle*) const QVariantList& FirmwarePlugin::toolIndicators(const Vehicle*)
{ {
//-- Default list of indicators for all vehicles. //-- Default list of indicators for all vehicles.
if(_toolBarIndicatorList.size() == 0) { if(_toolIndicatorList.size() == 0) {
_toolBarIndicatorList = QVariantList({ _toolIndicatorList = QVariantList({
QVariant::fromValue(QUrl::fromUserInput("qrc:/toolbar/MessageIndicator.qml")), QVariant::fromValue(QUrl::fromUserInput("qrc:/toolbar/MessageIndicator.qml")),
QVariant::fromValue(QUrl::fromUserInput("qrc:/toolbar/GPSIndicator.qml")), QVariant::fromValue(QUrl::fromUserInput("qrc:/toolbar/GPSIndicator.qml")),
QVariant::fromValue(QUrl::fromUserInput("qrc:/toolbar/TelemetryRSSIIndicator.qml")), QVariant::fromValue(QUrl::fromUserInput("qrc:/toolbar/TelemetryRSSIIndicator.qml")),
QVariant::fromValue(QUrl::fromUserInput("qrc:/toolbar/RCRSSIIndicator.qml")), QVariant::fromValue(QUrl::fromUserInput("qrc:/toolbar/RCRSSIIndicator.qml")),
QVariant::fromValue(QUrl::fromUserInput("qrc:/toolbar/BatteryIndicator.qml")), QVariant::fromValue(QUrl::fromUserInput("qrc:/toolbar/BatteryIndicator.qml")),
QVariant::fromValue(QUrl::fromUserInput("qrc:/toolbar/GPSRTKIndicator.qml")), });
}
return _toolIndicatorList;
}
const QVariantList& FirmwarePlugin::modeIndicators(const Vehicle*)
{
//-- Default list of indicators for all vehicles.
if(_modeIndicatorList.size() == 0) {
_modeIndicatorList = QVariantList({
QVariant::fromValue(QUrl::fromUserInput("qrc:/toolbar/ROIIndicator.qml")), QVariant::fromValue(QUrl::fromUserInput("qrc:/toolbar/ROIIndicator.qml")),
QVariant::fromValue(QUrl::fromUserInput("qrc:/toolbar/ArmedIndicator.qml")), QVariant::fromValue(QUrl::fromUserInput("qrc:/toolbar/ArmedIndicator.qml")),
QVariant::fromValue(QUrl::fromUserInput("qrc:/toolbar/ModeIndicator.qml")), QVariant::fromValue(QUrl::fromUserInput("qrc:/toolbar/ModeIndicator.qml")),
...@@ -323,7 +332,7 @@ const QVariantList &FirmwarePlugin::toolBarIndicators(const Vehicle*) ...@@ -323,7 +332,7 @@ const QVariantList &FirmwarePlugin::toolBarIndicators(const Vehicle*)
QVariant::fromValue(QUrl::fromUserInput("qrc:/toolbar/LinkIndicator.qml")), QVariant::fromValue(QUrl::fromUserInput("qrc:/toolbar/LinkIndicator.qml")),
}); });
} }
return _toolBarIndicatorList; return _modeIndicatorList;
} }
const QVariantList& FirmwarePlugin::cameraList(const Vehicle*) const QVariantList& FirmwarePlugin::cameraList(const Vehicle*)
......
...@@ -267,10 +267,15 @@ public: ...@@ -267,10 +267,15 @@ public:
/// Return the resource file which contains the vehicle icon used in the compass /// Return the resource file which contains the vehicle icon used in the compass
virtual QString vehicleImageCompass(const Vehicle* vehicle) const; virtual QString vehicleImageCompass(const Vehicle* vehicle) const;
/// Allows the core plugin to override the toolbar indicators /// Returns the list of toolbar tool indicators associated with a vehicle
/// signals toolbarIndicatorsChanged /// signals toolIndicatorsChanged
/// @return A list of QUrl with the indicators (see MainToolBarIndicators.qml) /// @return A list of QUrl with the indicators
virtual const QVariantList& toolBarIndicators(const Vehicle* vehicle); virtual const QVariantList& toolIndicators(const Vehicle* vehicle);
/// Returns the list of toolbar mode indicators associated with a vehicle
/// signals modeIndicatorsChanged
/// @return A list of QUrl with the indicators
virtual const QVariantList& modeIndicators(const Vehicle* vehicle);
/// Returns a list of CameraMetaData objects for available cameras on the vehicle. /// Returns a list of CameraMetaData objects for available cameras on the vehicle.
/// TODO: This should go into QGCCameraManager /// TODO: This should go into QGCCameraManager
...@@ -330,7 +335,8 @@ public: ...@@ -330,7 +335,8 @@ public:
static const QString px4FollowMeFlightMode; static const QString px4FollowMeFlightMode;
signals: signals:
void toolbarIndicatorsChanged(void); void toolIndicatorsChanged(void);
void modeIndicatorsChanged(void);
protected: protected:
// Arms the vehicle with validation and retries // Arms the vehicle with validation and retries
...@@ -351,7 +357,9 @@ protected: ...@@ -351,7 +357,9 @@ protected:
virtual QString _versionRegex() { return QString(); } virtual QString _versionRegex() { return QString(); }
private: private:
QVariantList _toolBarIndicatorList; QVariantList _toolIndicatorList;
QVariantList _modeIndicatorList;
static QVariantList _cameraList; ///< Standard QGC camera list static QVariantList _cameraList; ///< Standard QGC camera list
}; };
......
...@@ -34,8 +34,8 @@ import QGroundControl.Vehicle 1.0 ...@@ -34,8 +34,8 @@ import QGroundControl.Vehicle 1.0
Item { Item {
id: _root id: _root
property var parentToolInsets // These insets tell you what screen real estate is available for positioning the controls in your overlay property var parentToolInsets // These insets tell you what screen real estate is available for positioning the controls in your overlay
property var toolInsets: _toolInsets // These are the insets for your custom overlay additions property var totalToolInsets: _toolInsets // These are the insets for your custom overlay additions
property var mapControl property var mapControl
QGCToolInsets { QGCToolInsets {
......
...@@ -41,8 +41,8 @@ FlightMap { ...@@ -41,8 +41,8 @@ FlightMap {
property var guidedActionsController property var guidedActionsController
property var rightPanelWidth property var rightPanelWidth
property var planMasterController property var planMasterController
property bool pipMode: false // true: map is shown in a small pip mode property bool pipMode: false // true: map is shown in a small pip mode
property var toolInsets // Insets for the center viewport area property var toolInsets // Insets for the center viewport area
property var _planMasterController: planMasterController property var _planMasterController: planMasterController
property var _geoFenceController: planMasterController.geoFenceController property var _geoFenceController: planMasterController.geoFenceController
......
...@@ -33,9 +33,9 @@ import QGroundControl.Vehicle 1.0 ...@@ -33,9 +33,9 @@ import QGroundControl.Vehicle 1.0
Item { Item {
id: _root id: _root
property var parentToolInsets property var parentToolInsets
property var totalToolInsets: _totalToolInsets property var totalToolInsets: _totalToolInsets
property var mapControl property var mapControl
property var _activeVehicle: QGroundControl.multiVehicleManager.activeVehicle property var _activeVehicle: QGroundControl.multiVehicleManager.activeVehicle
property var _planMasterController: mainWindow.planMasterControllerPlanView property var _planMasterController: mainWindow.planMasterControllerPlanView
......
...@@ -32,7 +32,6 @@ Rectangle { ...@@ -32,7 +32,6 @@ Rectangle {
id: settingsButton id: settingsButton
Layout.fillHeight: true Layout.fillHeight: true
icon.source: "/qmlimages/PaperPlane.svg" icon.source: "/qmlimages/PaperPlane.svg"
logo: true
checked: false checked: false
onClicked: { onClicked: {
checked = false checked = false
......
...@@ -11,7 +11,7 @@ import QGroundControl.Palette 1.0 ...@@ -11,7 +11,7 @@ import QGroundControl.Palette 1.0
// Toolbar for Plan View // Toolbar for Plan View
Item { Item {
anchors.fill: parent width: missionStats.width + _margins
property var _planMasterController: mainWindow.planMasterControllerPlanView property var _planMasterController: mainWindow.planMasterControllerPlanView
property var _currentMissionItem: mainWindow.currentPlanMissionItem ///< Mission item to display status for property var _currentMissionItem: mainWindow.currentPlanMissionItem ///< Mission item to display status for
...@@ -109,11 +109,9 @@ Item { ...@@ -109,11 +109,9 @@ Item {
anchors.top: parent.top anchors.top: parent.top
anchors.bottom: parent.bottom anchors.bottom: parent.bottom
anchors.leftMargin: _margins anchors.leftMargin: _margins
anchors.rightMargin: _margins
anchors.left: parent.left anchors.left: parent.left
anchors.right: uploadButton.visible ? uploadButton.left : parent.right
columnSpacing: 0 columnSpacing: 0
columns: 3 columns: 4
GridLayout { GridLayout {
columns: 8 columns: 8
...@@ -226,37 +224,25 @@ Item { ...@@ -226,37 +224,25 @@ Item {
} }
Item { width: 1; height: 1 } Item { width: 1; height: 1 }
/*
FIXME: Swap point display is currently hidden since the code which calcs it doesn't work correctly
QGCLabel { text: qsTr("Swap waypoint:"); font.pointSize: _dataFontSize; }
QGCLabel {
text: _batteryChangePointText
font.pointSize: _dataFontSize
Layout.minimumWidth: _mediumValueWidth
}
*/
} }
}
QGCButton { QGCButton {
id: uploadButton id: uploadButton
anchors.rightMargin: _margins text: _controllerDirty ? qsTr("Upload Required") : qsTr("Upload")
anchors.right: parent.right enabled: !_controllerSyncInProgress
anchors.verticalCenter: parent.verticalCenter visible: !_controllerOffline && !_controllerSyncInProgress && !uploadCompleteText.visible
text: _controllerDirty ? qsTr("Upload Required") : qsTr("Upload") primary: _controllerDirty
enabled: !_controllerSyncInProgress onClicked: _planMasterController.upload()
visible: !_controllerOffline && !_controllerSyncInProgress && !uploadCompleteText.visible
primary: _controllerDirty PropertyAnimation on opacity {
onClicked: _planMasterController.upload() easing.type: Easing.OutQuart
from: 0.5
PropertyAnimation on opacity { to: 1
easing.type: Easing.OutQuart loops: Animation.Infinite
from: 0.5 running: _controllerDirty && !_controllerSyncInProgress
to: 1 alwaysRunToEnd: true
loops: Animation.Infinite duration: 2000
running: _controllerDirty && !_controllerSyncInProgress }
alwaysRunToEnd: true
duration: 2000
} }
} }
...@@ -277,16 +263,6 @@ Item { ...@@ -277,16 +263,6 @@ Item {
} }
} }
/*
Rectangle {
anchors.bottom: parent.bottom
height: toolBar.height * 0.05
width: activeVehicle ? activeVehicle.parameterManager.loadProgress * parent.width : 0
color: qgcPal.colorGreen
visible: !largeProgressBar.visible
}
*/
// Large mission download progress bar // Large mission download progress bar
Rectangle { Rectangle {
id: largeProgressBar id: largeProgressBar
......
...@@ -32,7 +32,7 @@ Button { ...@@ -32,7 +32,7 @@ Button {
background: Rectangle { background: Rectangle {
anchors.fill: parent anchors.fill: parent
color: logo ? qgcPal.brandingPurple : (button.checked ? qgcPal.buttonHighlight : Qt.rgba(0,0,0,0)) color: button.checked ? qgcPal.buttonHighlight : Qt.rgba(0,0,0,0)
} }
contentItem: Row { contentItem: Row {
...@@ -44,7 +44,7 @@ Button { ...@@ -44,7 +44,7 @@ Button {
width: height width: height
sourceSize.height: parent.height sourceSize.height: parent.height
fillMode: Image.PreserveAspectFit fillMode: Image.PreserveAspectFit
color: logo ? "white" : (button.checked ? qgcPal.buttonHighlightText : qgcPal.buttonText) color: logo ? "transparent" : (button.checked ? qgcPal.buttonHighlightText : qgcPal.buttonText)
source: button.icon.source source: button.icon.source
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
} }
......
...@@ -99,6 +99,7 @@ SurveyMapVisuals 1.0 SurveyMapVisuals.qml ...@@ -99,6 +99,7 @@ SurveyMapVisuals 1.0 SurveyMapVisuals.qml
TerrainStatus 1.0 TerrainStatus.qml TerrainStatus 1.0 TerrainStatus.qml
TransectStyleComplexItemStats 1.0 TransectStyleComplexItemStats.qml TransectStyleComplexItemStats 1.0 TransectStyleComplexItemStats.qml
TransectStyleMapVisuals 1.0 TransectStyleMapVisuals.qml TransectStyleMapVisuals 1.0 TransectStyleMapVisuals.qml
ToolBarBase 1.0 ToolBarBase.qml
ToolStrip 1.0 ToolStrip.qml ToolStrip 1.0 ToolStrip.qml
VehicleRotationCal 1.0 VehicleRotationCal.qml VehicleRotationCal 1.0 VehicleRotationCal.qml
VehicleSummaryRow 1.0 VehicleSummaryRow.qml VehicleSummaryRow 1.0 VehicleSummaryRow.qml
......
...@@ -414,8 +414,8 @@ Vehicle::Vehicle(MAV_AUTOPILOT firmwareType, ...@@ -414,8 +414,8 @@ Vehicle::Vehicle(MAV_AUTOPILOT firmwareType,
, _flightDistanceFact (0, _flightDistanceFactName, FactMetaData::valueTypeDouble) , _flightDistanceFact (0, _flightDistanceFactName, FactMetaData::valueTypeDouble)
, _flightTimeFact (0, _flightTimeFactName, FactMetaData::valueTypeElapsedTimeInSeconds) , _flightTimeFact (0, _flightTimeFactName, FactMetaData::valueTypeElapsedTimeInSeconds)
, _distanceToHomeFact (0, _distanceToHomeFactName, FactMetaData::valueTypeDouble) , _distanceToHomeFact (0, _distanceToHomeFactName, FactMetaData::valueTypeDouble)
, _headingToNextWPFact (0, _headingToNextWPFactName, FactMetaData::valueTypeDouble)
, _missionItemIndexFact (0, _missionItemIndexFactName, FactMetaData::valueTypeUint16) , _missionItemIndexFact (0, _missionItemIndexFactName, FactMetaData::valueTypeUint16)
, _headingToNextWPFact (0, _headingToNextWPFactName, FactMetaData::valueTypeDouble)
, _headingToHomeFact (0, _headingToHomeFactName, FactMetaData::valueTypeDouble) , _headingToHomeFact (0, _headingToHomeFactName, FactMetaData::valueTypeDouble)
, _distanceToGCSFact (0, _distanceToGCSFactName, FactMetaData::valueTypeDouble) , _distanceToGCSFact (0, _distanceToGCSFactName, FactMetaData::valueTypeDouble)
, _hobbsFact (0, _hobbsFactName, FactMetaData::valueTypeString) , _hobbsFact (0, _hobbsFactName, FactMetaData::valueTypeString)
...@@ -446,7 +446,8 @@ void Vehicle::_commonInit() ...@@ -446,7 +446,8 @@ void Vehicle::_commonInit()
{ {
_firmwarePlugin = _firmwarePluginManager->firmwarePluginForAutopilot(_firmwareType, _vehicleType); _firmwarePlugin = _firmwarePluginManager->firmwarePluginForAutopilot(_firmwareType, _vehicleType);
connect(_firmwarePlugin, &FirmwarePlugin::toolbarIndicatorsChanged, this, &Vehicle::toolBarIndicatorsChanged); connect(_firmwarePlugin, &FirmwarePlugin::toolIndicatorsChanged, this, &Vehicle::toolIndicatorsChanged);
connect(_firmwarePlugin, &FirmwarePlugin::modeIndicatorsChanged, this, &Vehicle::modeIndicatorsChanged);
connect(this, &Vehicle::coordinateChanged, this, &Vehicle::_updateDistanceHeadingToHome); connect(this, &Vehicle::coordinateChanged, this, &Vehicle::_updateDistanceHeadingToHome);
connect(this, &Vehicle::coordinateChanged, this, &Vehicle::_updateDistanceToGCS); connect(this, &Vehicle::coordinateChanged, this, &Vehicle::_updateDistanceToGCS);
...@@ -3902,10 +3903,19 @@ QString Vehicle::vehicleImageCompass() const ...@@ -3902,10 +3903,19 @@ QString Vehicle::vehicleImageCompass() const
return QString(); return QString();
} }
const QVariantList& Vehicle::toolBarIndicators() const QVariantList& Vehicle::toolIndicators()
{
if(_firmwarePlugin) {
return _firmwarePlugin->toolIndicators(this);
}
static QVariantList emptyList;
return emptyList;
}
const QVariantList& Vehicle::modeIndicators()
{ {
if(_firmwarePlugin) { if(_firmwarePlugin) {
return _firmwarePlugin->toolBarIndicators(this); return _firmwarePlugin->modeIndicators(this);
} }
static QVariantList emptyList; static QVariantList emptyList;
return emptyList; return emptyList;
......
...@@ -615,7 +615,8 @@ public: ...@@ -615,7 +615,8 @@ public:
Q_PROPERTY(unsigned int telemetryTXBuffer READ telemetryTXBuffer NOTIFY telemetryTXBufferChanged) Q_PROPERTY(unsigned int telemetryTXBuffer READ telemetryTXBuffer NOTIFY telemetryTXBufferChanged)
Q_PROPERTY(int telemetryLNoise READ telemetryLNoise NOTIFY telemetryLNoiseChanged) Q_PROPERTY(int telemetryLNoise READ telemetryLNoise NOTIFY telemetryLNoiseChanged)
Q_PROPERTY(int telemetryRNoise READ telemetryRNoise NOTIFY telemetryRNoiseChanged) Q_PROPERTY(int telemetryRNoise READ telemetryRNoise NOTIFY telemetryRNoiseChanged)
Q_PROPERTY(QVariantList toolBarIndicators READ toolBarIndicators NOTIFY toolBarIndicatorsChanged) Q_PROPERTY(QVariantList toolIndicators READ toolIndicators NOTIFY toolIndicatorsChanged)
Q_PROPERTY(QVariantList modeIndicators READ modeIndicators NOTIFY modeIndicatorsChanged)
Q_PROPERTY(bool initialPlanRequestComplete READ initialPlanRequestComplete NOTIFY initialPlanRequestCompleteChanged) Q_PROPERTY(bool initialPlanRequestComplete READ initialPlanRequestComplete NOTIFY initialPlanRequestCompleteChanged)
Q_PROPERTY(QVariantList staticCameraList READ staticCameraList CONSTANT) Q_PROPERTY(QVariantList staticCameraList READ staticCameraList CONSTANT)
Q_PROPERTY(QGCCameraManager* dynamicCameras READ dynamicCameras NOTIFY dynamicCamerasChanged) Q_PROPERTY(QGCCameraManager* dynamicCameras READ dynamicCameras NOTIFY dynamicCamerasChanged)
...@@ -1086,7 +1087,8 @@ public: ...@@ -1086,7 +1087,8 @@ public:
QString vehicleImageOutline () const; QString vehicleImageOutline () const;
QString vehicleImageCompass () const; QString vehicleImageCompass () const;
const QVariantList& toolBarIndicators (); const QVariantList& toolIndicators ();
const QVariantList& modeIndicators ();
const QVariantList& staticCameraList () const; const QVariantList& staticCameraList () const;
bool capabilitiesKnown () const { return _capabilityBitsKnown; } bool capabilitiesKnown () const { return _capabilityBitsKnown; }
...@@ -1160,7 +1162,8 @@ signals: ...@@ -1160,7 +1162,8 @@ signals:
void capabilitiesKnownChanged (bool capabilitiesKnown); void capabilitiesKnownChanged (bool capabilitiesKnown);
void initialPlanRequestCompleteChanged(bool initialPlanRequestComplete); void initialPlanRequestCompleteChanged(bool initialPlanRequestComplete);
void capabilityBitsChanged (uint64_t capabilityBits); void capabilityBitsChanged (uint64_t capabilityBits);
void toolBarIndicatorsChanged (); void toolIndicatorsChanged ();
void modeIndicatorsChanged ();
void highLatencyLinkChanged (bool highLatencyLink); void highLatencyLinkChanged (bool highLatencyLink);
void priorityLinkNameChanged (const QString& priorityLinkName); void priorityLinkNameChanged (const QString& priorityLinkName);
void linksChanged (); void linksChanged ();
......
...@@ -516,8 +516,18 @@ QString QGCCorePlugin::stableVersionCheckFileUrl() const ...@@ -516,8 +516,18 @@ QString QGCCorePlugin::stableVersionCheckFileUrl() const
#endif #endif
} }
QStringList QStringList QGCCorePlugin::startupPages()
QGCCorePlugin::startupPages()
{ {
return { "/qml/QGroundControl/Specific/UnitsWizardPage.qml" }; return { "/qml/QGroundControl/Specific/UnitsWizardPage.qml" };
} }
const QVariantList &QGCCorePlugin::toolBarIndicators(void)
{
//-- Default list of indicators for all vehicles.
if(_toolBarIndicatorList.size() == 0) {
_toolBarIndicatorList = QVariantList({
QVariant::fromValue(QUrl::fromUserInput("qrc:/toolbar/GPSRTKIndicator.qml")),
});
}
return _toolBarIndicatorList;
}
...@@ -58,7 +58,7 @@ public: ...@@ -58,7 +58,7 @@ public:
Q_PROPERTY(QString brandImageOutdoor READ brandImageOutdoor CONSTANT) Q_PROPERTY(QString brandImageOutdoor READ brandImageOutdoor CONSTANT)
Q_PROPERTY(QmlObjectListModel* customMapItems READ customMapItems CONSTANT) Q_PROPERTY(QmlObjectListModel* customMapItems READ customMapItems CONSTANT)
Q_PROPERTY(QStringList startupPages READ startupPages NOTIFY startupPagesChanged) Q_PROPERTY(QStringList startupPages READ startupPages NOTIFY startupPagesChanged)
Q_PROPERTY(QVariantList toolBarIndicators READ toolBarIndicators NOTIFY toolBarIndicatorsChanged)
Q_INVOKABLE bool guidedActionsControllerLogging() const; Q_INVOKABLE bool guidedActionsControllerLogging() const;
...@@ -172,6 +172,11 @@ public: ...@@ -172,6 +172,11 @@ public:
/// @return QML files paths that will be loaded using the StartupWizard control /// @return QML files paths that will be loaded using the StartupWizard control
virtual QStringList startupPages(); virtual QStringList startupPages();
/// Returns the list of toolbar indicators which are not related to a vehicle
/// signals toolbarIndicatorsChanged
/// @return A list of QUrl with the indicators
virtual const QVariantList& toolBarIndicators(void);
bool showTouchAreas() const { return _showTouchAreas; } bool showTouchAreas() const { return _showTouchAreas; }
bool showAdvancedUI() const { return _showAdvancedUI; } bool showAdvancedUI() const { return _showAdvancedUI; }
void setShowTouchAreas(bool show); void setShowTouchAreas(bool show);
...@@ -181,12 +186,13 @@ public: ...@@ -181,12 +186,13 @@ public:
void setToolbox (QGCToolbox* toolbox); void setToolbox (QGCToolbox* toolbox);
signals: signals:
void settingsPagesChanged (); void settingsPagesChanged ();
void analyzePagesChanged (); void analyzePagesChanged ();
void instrumentPagesChanged (); void instrumentPagesChanged ();
void showTouchAreasChanged (bool showTouchAreas); void showTouchAreasChanged (bool showTouchAreas);
void showAdvancedUIChanged (bool showAdvancedUI); void showAdvancedUIChanged (bool showAdvancedUI);
void startupPagesChanged (); void startupPagesChanged ();
void toolBarIndicatorsChanged ();
protected slots: protected slots:
void _activeVehicleChanged (Vehicle* activeVehicle); void _activeVehicleChanged (Vehicle* activeVehicle);
...@@ -203,6 +209,7 @@ protected: ...@@ -203,6 +209,7 @@ protected:
Vehicle* _activeVehicle = nullptr; Vehicle* _activeVehicle = nullptr;
QGCCameraManager* _dynamicCameras = nullptr; QGCCameraManager* _dynamicCameras = nullptr;
QGCCameraControl* _currentCamera = nullptr; QGCCameraControl* _currentCamera = nullptr;
QVariantList _toolBarIndicatorList;
private: private:
QGCCorePlugin_p* _p; QGCCorePlugin_p* _p;
......
...@@ -21,16 +21,6 @@ QGCOptions::QGCOptions(QObject* parent) ...@@ -21,16 +21,6 @@ QGCOptions::QGCOptions(QObject* parent)
QQmlEngine::setObjectOwnership(this, QQmlEngine::CppOwnership); QQmlEngine::setObjectOwnership(this, QQmlEngine::CppOwnership);
} }
QUrl QGCOptions::mainToolbarUrl() const
{
return QUrl(QStringLiteral("qrc:/toolbar/MainToolBar.qml"));
}
QUrl QGCOptions::planToolbarUrl() const
{
return QUrl(QStringLiteral("qrc:/qml/PlanToolBar.qml"));
}
QColor QGCOptions::toolbarBackgroundLight() const QColor QGCOptions::toolbarBackgroundLight() const
{ {
return QColor(255,255,255,204); return QColor(255,255,255,204);
...@@ -41,11 +31,6 @@ QColor QGCOptions::toolbarBackgroundDark() const ...@@ -41,11 +31,6 @@ QColor QGCOptions::toolbarBackgroundDark() const
return QColor(0,0,0,192); return QColor(0,0,0,192);
} }
QUrl QGCOptions::planToolbarIndicatorsUrl() const
{
return QUrl(QStringLiteral("PlanToolBar.qml"));
}
QGCFlyViewOptions* QGCOptions::flyViewOptions(void) QGCFlyViewOptions* QGCOptions::flyViewOptions(void)
{ {
if (!_defaultFlyViewOptions) { if (!_defaultFlyViewOptions) {
......
...@@ -55,11 +55,8 @@ public: ...@@ -55,11 +55,8 @@ 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(QUrl mainToolbarUrl READ mainToolbarUrl CONSTANT)
Q_PROPERTY(QUrl planToolbarUrl READ planToolbarUrl CONSTANT)
Q_PROPERTY(QColor toolbarBackgroundLight READ toolbarBackgroundLight CONSTANT) Q_PROPERTY(QColor toolbarBackgroundLight READ toolbarBackgroundLight CONSTANT)
Q_PROPERTY(QColor toolbarBackgroundDark READ toolbarBackgroundDark CONSTANT) Q_PROPERTY(QColor toolbarBackgroundDark READ toolbarBackgroundDark CONSTANT)
Q_PROPERTY(QUrl planToolbarIndicatorsUrl READ planToolbarIndicatorsUrl 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)
...@@ -107,16 +104,10 @@ public: ...@@ -107,16 +104,10 @@ public:
/// Provides an optional, custom preflight checklist /// Provides an optional, custom preflight checklist
virtual QUrl preFlightChecklistUrl () const { return QUrl::fromUserInput("qrc:/qml/PreFlightCheckList.qml"); } virtual QUrl preFlightChecklistUrl () const { return QUrl::fromUserInput("qrc:/qml/PreFlightCheckList.qml"); }
/// Allows replacing the Main toolbar
virtual QUrl mainToolbarUrl () const;
/// Allows replacing the Plan View toolbar
virtual QUrl planToolbarUrl () const;
/// Allows replacing the toolbar Light Theme color /// Allows replacing the toolbar Light Theme color
virtual QColor toolbarBackgroundLight () const; virtual QColor toolbarBackgroundLight () const;
/// Allows replacing the toolbar Dark Theme color /// Allows replacing the toolbar Dark Theme color
virtual QColor toolbarBackgroundDark () const; virtual QColor toolbarBackgroundDark () const;
/// Allows replacing the Plan View toolbar container
virtual QUrl planToolbarIndicatorsUrl () const;
/// By returning false you can hide the following sensor calibration pages /// By returning false you can hide the following sensor calibration pages
virtual bool showSensorCalibrationCompass () const { return true; } virtual bool showSensorCalibrationCompass () const { return true; }
virtual bool showSensorCalibrationGyro () const { return true; } virtual bool showSensorCalibrationGyro () const { return true; }
......
...@@ -49,10 +49,7 @@ ApplicationWindow { ...@@ -49,10 +49,7 @@ ApplicationWindow {
property var _rgPreventViewSwitch: [ false ] property var _rgPreventViewSwitch: [ false ]
readonly property real _topBottomMargins: ScreenTools.defaultFontPixelHeight * 0.5 readonly property real _topBottomMargins: ScreenTools.defaultFontPixelHeight * 0.5
readonly property string _mainToolbar: QGroundControl.corePlugin.options.mainToolbarUrl
readonly property string _planToolbar: QGroundControl.corePlugin.options.planToolbarUrl
//------------------------------------------------------------------------- //-------------------------------------------------------------------------