Browse Source

Allow plugins to enable/disable multiple vehicles selector

QGC4.4
Gus Grubba 6 years ago
parent
commit
a08427a3d2
  1. 4
      src/FlightDisplay/FlightDisplayView.qml
  2. 2
      src/api/QGCOptions.h

4
src/FlightDisplay/FlightDisplayView.qml

@ -486,7 +486,7 @@ Item { @@ -486,7 +486,7 @@ Item {
anchors.top: parent.top
spacing: ScreenTools.defaultFontPixelWidth
z: _mapAndVideo.z + 4
visible: QGroundControl.multiVehicleManager.vehicles.count > 1
visible: QGroundControl.multiVehicleManager.vehicles.count > 1 && QGroundControl.corePlugin.options.enableMultiVehicleList
ExclusiveGroup { id: multiVehicleSelectorGroup }
@ -535,7 +535,7 @@ Item { @@ -535,7 +535,7 @@ Item {
anchors.right: parent.right
anchors.bottom: parent.bottom
width: ScreenTools.defaultFontPixelWidth * 30
visible: !singleVehicleView.checked && !QGroundControl.videoManager.fullScreen
visible: !singleVehicleView.checked && !QGroundControl.videoManager.fullScreen && QGroundControl.corePlugin.options.enableMultiVehicleList
z: _mapAndVideo.z + 4
guidedActionsController: _guidedController
}

2
src/api/QGCOptions.h

@ -62,6 +62,7 @@ public: @@ -62,6 +62,7 @@ public:
Q_PROPERTY(float devicePixelDensity READ devicePixelDensity NOTIFY devicePixelDensityChanged)
Q_PROPERTY(bool checkFirmwareVersion READ checkFirmwareVersion CONSTANT)
Q_PROPERTY(bool showMavlinkLogOptions READ showMavlinkLogOptions CONSTANT)
Q_PROPERTY(bool enableMultiVehicleList READ enableMultiVehicleList CONSTANT)
/// Should QGC hide its settings menu and colapse it into one single menu (Settings and Vehicle Setup)?
/// @return true if QGC should consolidate both menus into one.
@ -113,6 +114,7 @@ public: @@ -113,6 +114,7 @@ public:
virtual bool disableVehicleConnection () const { return false; } ///< true: vehicle connection is disabled
virtual bool checkFirmwareVersion () const { return true; }
virtual bool showMavlinkLogOptions () const { return true; }
virtual bool enableMultiVehicleList () const { return true; }
#if defined(__mobile__)
virtual bool useMobileFileDialog () const { return true;}

Loading…
Cancel
Save