Commit e2fc4181 authored by Gus Grubba's avatar Gus Grubba

Add option to disable video streaming when disarming.

Moved "Grid Lines" out of General Options and into the Video Stream Widget
Made a QGC custom Switch element
parent 3b025c14
...@@ -92,6 +92,7 @@ ...@@ -92,6 +92,7 @@
<file alias="QGroundControl/Controls/QGCPipable.qml">src/QmlControls/QGCPipable.qml</file> <file alias="QGroundControl/Controls/QGCPipable.qml">src/QmlControls/QGCPipable.qml</file>
<file alias="QGroundControl/Controls/QGCRadioButton.qml">src/QmlControls/QGCRadioButton.qml</file> <file alias="QGroundControl/Controls/QGCRadioButton.qml">src/QmlControls/QGCRadioButton.qml</file>
<file alias="QGroundControl/Controls/QGCSlider.qml">src/QmlControls/QGCSlider.qml</file> <file alias="QGroundControl/Controls/QGCSlider.qml">src/QmlControls/QGCSlider.qml</file>
<file alias="QGroundControl/Controls/QGCSwitch.qml">src/QmlControls/QGCSwitch.qml</file>
<file alias="QGroundControl/Controls/QGCTextField.qml">src/QmlControls/QGCTextField.qml</file> <file alias="QGroundControl/Controls/QGCTextField.qml">src/QmlControls/QGCTextField.qml</file>
<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/QGCView.qml">src/QmlControls/QGCView.qml</file> <file alias="QGroundControl/Controls/QGCView.qml">src/QmlControls/QGCView.qml</file>
......
...@@ -12,7 +12,6 @@ import QtPositioning 5.2 ...@@ -12,7 +12,6 @@ import QtPositioning 5.2
import QtQuick.Layouts 1.2 import QtQuick.Layouts 1.2
import QtQuick.Controls 1.4 import QtQuick.Controls 1.4
import QtQuick.Dialogs 1.2 import QtQuick.Dialogs 1.2
import QtQuick.Controls.Styles 1.4
import QtGraphicalEffects 1.0 import QtGraphicalEffects 1.0
import QGroundControl 1.0 import QGroundControl 1.0
...@@ -46,12 +45,13 @@ Item { ...@@ -46,12 +45,13 @@ Item {
columnSpacing: ScreenTools.defaultFontPixelWidth * 2 columnSpacing: ScreenTools.defaultFontPixelWidth * 2
rowSpacing: ScreenTools.defaultFontPixelHeight rowSpacing: ScreenTools.defaultFontPixelHeight
anchors.centerIn: parent anchors.centerIn: parent
// Enable/Disable Video Streaming
QGCLabel { QGCLabel {
text: qsTr("Enable Stream") text: qsTr("Enable Stream")
font.pointSize: ScreenTools.smallFontPointSize font.pointSize: ScreenTools.smallFontPointSize
} }
Switch { QGCSwitch {
enabled: _streamingEnabled && _activeVehicle enabled: _streamingEnabled
checked: QGroundControl.settingsManager.videoSettings.streamEnabled.rawValue checked: QGroundControl.settingsManager.videoSettings.streamEnabled.rawValue
onClicked: { onClicked: {
if(checked) { if(checked) {
...@@ -62,19 +62,27 @@ Item { ...@@ -62,19 +62,27 @@ Item {
_videoReceiver.stop() _videoReceiver.stop()
} }
} }
style: SwitchStyle { }
groove: Rectangle { // Grid Lines
implicitWidth: ScreenTools.defaultFontPixelWidth * 6 QGCLabel {
implicitHeight: ScreenTools.defaultFontPixelHeight text: qsTr("Grid Lines")
color: control.checked ? qgcPal.colorGreen : qgcPal.colorGrey font.pointSize: ScreenTools.smallFontPointSize
radius: 3 visible: QGroundControl.videoManager.isGStreamer && QGroundControl.settingsManager.videoSettings.gridLines.visible
border.color: qgcPal.button }
border.width: 1 QGCSwitch {
enabled: _streamingEnabled && _activeVehicle
checked: QGroundControl.settingsManager.videoSettings.gridLines.rawValue
visible: QGroundControl.videoManager.isGStreamer && QGroundControl.settingsManager.videoSettings.gridLines.visible
onClicked: {
if(checked) {
QGroundControl.settingsManager.videoSettings.gridLines.rawValue = 1
} else {
QGroundControl.settingsManager.videoSettings.gridLines.rawValue = 0
} }
} }
} }
QGCLabel { QGCLabel {
text: qsTr("Stream Recording") text: _recordingVideo ? qsTr("Stop Recording") : qsTr("Record Stream")
font.pointSize: ScreenTools.smallFontPointSize font.pointSize: ScreenTools.smallFontPointSize
visible: QGroundControl.settingsManager.videoSettings.showRecControl.rawValue visible: QGroundControl.settingsManager.videoSettings.showRecControl.rawValue
} }
......
/****************************************************************************
*
* (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.3
import QtQuick.Controls 1.2
import QtQuick.Controls.Styles 1.4
import QGroundControl.Palette 1.0
import QGroundControl.ScreenTools 1.0
Switch {
id: _root
QGCPalette { id:qgcPal; colorGroupEnabled: true }
style: SwitchStyle {
groove: Rectangle {
implicitWidth: ScreenTools.defaultFontPixelWidth * 6
implicitHeight: ScreenTools.defaultFontPixelHeight
color: (control.checked && control.enabled) ? qgcPal.colorGreen : qgcPal.colorGrey
radius: 3
border.color: qgcPal.button
border.width: 1
}
}
}
...@@ -52,6 +52,7 @@ QGCMovableItem 1.0 QGCMovableItem.qml ...@@ -52,6 +52,7 @@ QGCMovableItem 1.0 QGCMovableItem.qml
QGCPipable 1.0 QGCPipable.qml QGCPipable 1.0 QGCPipable.qml
QGCRadioButton 1.0 QGCRadioButton.qml QGCRadioButton 1.0 QGCRadioButton.qml
QGCSlider 1.0 QGCSlider.qml QGCSlider 1.0 QGCSlider.qml
QGCSwitch 1.0 QGCSwitch.qml
QGCTextField 1.0 QGCTextField.qml QGCTextField 1.0 QGCTextField.qml
QGCToolBarButton 1.0 QGCToolBarButton.qml QGCToolBarButton 1.0 QGCToolBarButton.qml
QGCView 1.0 QGCView.qml QGCView 1.0 QGCView.qml
......
...@@ -101,5 +101,12 @@ ...@@ -101,5 +101,12 @@
"longDescription": "Start/Stop Video Stream.", "longDescription": "Start/Stop Video Stream.",
"type": "bool", "type": "bool",
"defaultValue": true "defaultValue": true
},
{
"name": "DisableWhenDisarmed",
"shortDescription": "Video Stream Disnabled When Armed",
"longDescription": "Disable Video Stream when disarmed.",
"type": "bool",
"defaultValue": false
} }
] ]
...@@ -31,6 +31,7 @@ const char* VideoSettings::maxVideoSizeName = "MaxVideoSize"; ...@@ -31,6 +31,7 @@ const char* VideoSettings::maxVideoSizeName = "MaxVideoSize";
const char* VideoSettings::enableStorageLimitName = "EnableStorageLimit"; const char* VideoSettings::enableStorageLimitName = "EnableStorageLimit";
const char* VideoSettings::rtspTimeoutName = "RtspTimeout"; const char* VideoSettings::rtspTimeoutName = "RtspTimeout";
const char* VideoSettings::streamEnabledName = "StreamEnabled"; const char* VideoSettings::streamEnabledName = "StreamEnabled";
const char* VideoSettings::disableWhenDisarmedName ="DisableWhenDisarmed";
const char* VideoSettings::videoSourceNoVideo = "No Video Available"; const char* VideoSettings::videoSourceNoVideo = "No Video Available";
const char* VideoSettings::videoDisabled = "Video Stream Disabled"; const char* VideoSettings::videoDisabled = "Video Stream Disabled";
...@@ -52,6 +53,7 @@ VideoSettings::VideoSettings(QObject* parent) ...@@ -52,6 +53,7 @@ VideoSettings::VideoSettings(QObject* parent)
, _enableStorageLimitFact(NULL) , _enableStorageLimitFact(NULL)
, _rtspTimeoutFact(NULL) , _rtspTimeoutFact(NULL)
, _streamEnabledFact(NULL) , _streamEnabledFact(NULL)
, _disableWhenDisarmedFact(NULL)
{ {
QQmlEngine::setObjectOwnership(this, QQmlEngine::CppOwnership); QQmlEngine::setObjectOwnership(this, QQmlEngine::CppOwnership);
qmlRegisterUncreatableType<VideoSettings>("QGroundControl.SettingsManager", 1, 0, "VideoSettings", "Reference only"); qmlRegisterUncreatableType<VideoSettings>("QGroundControl.SettingsManager", 1, 0, "VideoSettings", "Reference only");
...@@ -192,6 +194,14 @@ Fact* VideoSettings::streamEnabled(void) ...@@ -192,6 +194,14 @@ Fact* VideoSettings::streamEnabled(void)
return _streamEnabledFact; return _streamEnabledFact;
} }
Fact* VideoSettings::disableWhenDisarmed(void)
{
if (!_disableWhenDisarmedFact) {
_disableWhenDisarmedFact = _createSettingsFact(disableWhenDisarmedName);
}
return _disableWhenDisarmedFact;
}
bool VideoSettings::streamConfigured(void) bool VideoSettings::streamConfigured(void)
{ {
#if !defined(QGC_GST_STREAMING) #if !defined(QGC_GST_STREAMING)
......
...@@ -19,33 +19,35 @@ class VideoSettings : public SettingsGroup ...@@ -19,33 +19,35 @@ class VideoSettings : public SettingsGroup
public: public:
VideoSettings(QObject* parent = NULL); VideoSettings(QObject* parent = NULL);
Q_PROPERTY(Fact* videoSource READ videoSource CONSTANT) Q_PROPERTY(Fact* videoSource READ videoSource CONSTANT)
Q_PROPERTY(Fact* udpPort READ udpPort CONSTANT) Q_PROPERTY(Fact* udpPort READ udpPort CONSTANT)
Q_PROPERTY(Fact* tcpUrl READ tcpUrl CONSTANT) Q_PROPERTY(Fact* tcpUrl READ tcpUrl CONSTANT)
Q_PROPERTY(Fact* rtspUrl READ rtspUrl CONSTANT) Q_PROPERTY(Fact* rtspUrl READ rtspUrl CONSTANT)
Q_PROPERTY(Fact* aspectRatio READ aspectRatio CONSTANT) Q_PROPERTY(Fact* aspectRatio READ aspectRatio CONSTANT)
Q_PROPERTY(Fact* gridLines READ gridLines CONSTANT) Q_PROPERTY(Fact* gridLines READ gridLines CONSTANT)
Q_PROPERTY(Fact* showRecControl READ showRecControl CONSTANT) Q_PROPERTY(Fact* showRecControl READ showRecControl CONSTANT)
Q_PROPERTY(Fact* recordingFormat READ recordingFormat CONSTANT) Q_PROPERTY(Fact* recordingFormat READ recordingFormat CONSTANT)
Q_PROPERTY(Fact* maxVideoSize READ maxVideoSize CONSTANT) Q_PROPERTY(Fact* maxVideoSize READ maxVideoSize CONSTANT)
Q_PROPERTY(Fact* enableStorageLimit READ enableStorageLimit CONSTANT) Q_PROPERTY(Fact* enableStorageLimit READ enableStorageLimit CONSTANT)
Q_PROPERTY(Fact* rtspTimeout READ rtspTimeout CONSTANT) Q_PROPERTY(Fact* rtspTimeout READ rtspTimeout CONSTANT)
Q_PROPERTY(Fact* streamEnabled READ streamEnabled CONSTANT) Q_PROPERTY(Fact* streamEnabled READ streamEnabled CONSTANT)
Q_PROPERTY(bool streamConfigured READ streamConfigured NOTIFY streamConfiguredChanged) Q_PROPERTY(Fact* disableWhenDisarmed READ disableWhenDisarmed CONSTANT)
Q_PROPERTY(bool streamConfigured READ streamConfigured NOTIFY streamConfiguredChanged)
Fact* videoSource (void); Fact* videoSource (void);
Fact* udpPort (void); Fact* udpPort (void);
Fact* rtspUrl (void); Fact* rtspUrl (void);
Fact* tcpUrl (void); Fact* tcpUrl (void);
Fact* aspectRatio (void); Fact* aspectRatio (void);
Fact* gridLines (void); Fact* gridLines (void);
Fact* showRecControl (void); Fact* showRecControl (void);
Fact* recordingFormat (void); Fact* recordingFormat (void);
Fact* maxVideoSize (void); Fact* maxVideoSize (void);
Fact* enableStorageLimit(void); Fact* enableStorageLimit (void);
Fact* rtspTimeout (void); Fact* rtspTimeout (void);
Fact* streamEnabled (void); Fact* streamEnabled (void);
bool streamConfigured (void); Fact* disableWhenDisarmed (void);
bool streamConfigured (void);
static const char* videoSettingsGroupName; static const char* videoSettingsGroupName;
...@@ -61,6 +63,7 @@ public: ...@@ -61,6 +63,7 @@ public:
static const char* enableStorageLimitName; static const char* enableStorageLimitName;
static const char* rtspTimeoutName; static const char* rtspTimeoutName;
static const char* streamEnabledName; static const char* streamEnabledName;
static const char* disableWhenDisarmedName;
static const char* videoSourceNoVideo; static const char* videoSourceNoVideo;
static const char* videoDisabled; static const char* videoDisabled;
...@@ -87,6 +90,7 @@ private: ...@@ -87,6 +90,7 @@ private:
SettingsFact* _enableStorageLimitFact; SettingsFact* _enableStorageLimitFact;
SettingsFact* _rtspTimeoutFact; SettingsFact* _rtspTimeoutFact;
SettingsFact* _streamEnabledFact; SettingsFact* _streamEnabledFact;
SettingsFact* _disableWhenDisarmedFact;
}; };
#endif #endif
...@@ -33,6 +33,8 @@ ...@@ -33,6 +33,8 @@
#include "QGCCorePlugin.h" #include "QGCCorePlugin.h"
#include "ADSBVehicle.h" #include "ADSBVehicle.h"
#include "QGCCameraManager.h" #include "QGCCameraManager.h"
#include "VideoReceiver.h"
#include "VideoManager.h"
QGC_LOGGING_CATEGORY(VehicleLog, "VehicleLog") QGC_LOGGING_CATEGORY(VehicleLog, "VehicleLog")
...@@ -1121,6 +1123,11 @@ void Vehicle::_handleHeartbeat(mavlink_message_t& message) ...@@ -1121,6 +1123,11 @@ void Vehicle::_handleHeartbeat(mavlink_message_t& message)
_clearCameraTriggerPoints(); _clearCameraTriggerPoints();
} else { } else {
_mapTrajectoryStop(); _mapTrajectoryStop();
// Also handle Video Streaming
if(_settingsManager->videoSettings()->disableWhenDisarmed()->rawValue().toBool()) {
_settingsManager->videoSettings()->streamEnabled()->setRawValue(false);
qgcApp()->toolbox()->videoManager()->videoReceiver()->stop();
}
} }
} }
......
...@@ -67,8 +67,10 @@ VideoReceiver::VideoReceiver(QObject* parent) ...@@ -67,8 +67,10 @@ VideoReceiver::VideoReceiver(QObject* parent)
, _videoSurface(NULL) , _videoSurface(NULL)
, _videoRunning(false) , _videoRunning(false)
, _showFullScreen(false) , _showFullScreen(false)
, _videoSettings(NULL)
{ {
_videoSurface = new VideoSurface; _videoSurface = new VideoSurface;
_videoSettings = qgcApp()->toolbox()->settingsManager()->videoSettings();
#if defined(QGC_GST_STREAMING) #if defined(QGC_GST_STREAMING)
_setVideoSink(_videoSurface->videoSink()); _setVideoSink(_videoSurface->videoSink());
_timer.setSingleShot(true); _timer.setSingleShot(true);
...@@ -147,7 +149,7 @@ VideoReceiver::_connected() ...@@ -147,7 +149,7 @@ VideoReceiver::_connected()
_timer.stop(); _timer.stop();
_socket->deleteLater(); _socket->deleteLater();
_socket = NULL; _socket = NULL;
if(qgcApp()->toolbox()->settingsManager()->videoSettings()->streamEnabled()->rawValue().toBool()) { if(_videoSettings->streamEnabled()->rawValue().toBool()) {
_serverPresent = true; _serverPresent = true;
start(); start();
} }
...@@ -163,7 +165,7 @@ VideoReceiver::_socketError(QAbstractSocket::SocketError socketError) ...@@ -163,7 +165,7 @@ VideoReceiver::_socketError(QAbstractSocket::SocketError socketError)
_socket->deleteLater(); _socket->deleteLater();
_socket = NULL; _socket = NULL;
//-- Try again in 5 seconds //-- Try again in 5 seconds
if(qgcApp()->toolbox()->settingsManager()->videoSettings()->streamEnabled()->rawValue().toBool()) { if(_videoSettings->streamEnabled()->rawValue().toBool()) {
_timer.start(5000); _timer.start(5000);
} }
} }
...@@ -179,7 +181,7 @@ VideoReceiver::_timeout() ...@@ -179,7 +181,7 @@ VideoReceiver::_timeout()
delete _socket; delete _socket;
_socket = NULL; _socket = NULL;
} }
if(qgcApp()->toolbox()->settingsManager()->videoSettings()->streamEnabled()->rawValue().toBool()) { if(_videoSettings->streamEnabled()->rawValue().toBool()) {
//-- RTSP will try to connect to the server. If it cannot connect, //-- RTSP will try to connect to the server. If it cannot connect,
// it will simply give up and never try again. Instead, we keep // it will simply give up and never try again. Instead, we keep
// attempting a connection on this timer. Once a connection is // attempting a connection on this timer. Once a connection is
...@@ -208,8 +210,8 @@ VideoReceiver::_timeout() ...@@ -208,8 +210,8 @@ VideoReceiver::_timeout()
void void
VideoReceiver::start() VideoReceiver::start()
{ {
if(!qgcApp()->toolbox()->settingsManager()->videoSettings()->streamEnabled()->rawValue().toBool() || if(!_videoSettings->streamEnabled()->rawValue().toBool() ||
!qgcApp()->toolbox()->settingsManager()->videoSettings()->streamConfigured()) { !_videoSettings->streamConfigured()) {
qCDebug(VideoReceiverLog) << "start() but not enabled/configured"; qCDebug(VideoReceiverLog) << "start() but not enabled/configured";
return; return;
} }
...@@ -560,7 +562,7 @@ void ...@@ -560,7 +562,7 @@ void
VideoReceiver::_cleanupOldVideos() VideoReceiver::_cleanupOldVideos()
{ {
//-- Only perform cleanup if storage limit is enabled //-- Only perform cleanup if storage limit is enabled
if(qgcApp()->toolbox()->settingsManager()->videoSettings()->enableStorageLimit()->rawValue().toBool()) { if(_videoSettings->enableStorageLimit()->rawValue().toBool()) {
QString savePath = qgcApp()->toolbox()->settingsManager()->appSettings()->videoSavePath(); QString savePath = qgcApp()->toolbox()->settingsManager()->appSettings()->videoSavePath();
QDir videoDir = QDir(savePath); QDir videoDir = QDir(savePath);
videoDir.setFilter(QDir::Files | QDir::Readable | QDir::NoSymLinks | QDir::Writable); videoDir.setFilter(QDir::Files | QDir::Readable | QDir::NoSymLinks | QDir::Writable);
...@@ -576,7 +578,7 @@ VideoReceiver::_cleanupOldVideos() ...@@ -576,7 +578,7 @@ VideoReceiver::_cleanupOldVideos()
if(!vidList.isEmpty()) { if(!vidList.isEmpty()) {
uint64_t total = 0; uint64_t total = 0;
//-- Settings are stored using MB //-- Settings are stored using MB
uint64_t maxSize = (qgcApp()->toolbox()->settingsManager()->videoSettings()->maxVideoSize()->rawValue().toUInt() * 1024 * 1024); uint64_t maxSize = (_videoSettings->maxVideoSize()->rawValue().toUInt() * 1024 * 1024);
//-- Compute total used storage //-- Compute total used storage
for(int i = 0; i < vidList.size(); i++) { for(int i = 0; i < vidList.size(); i++) {
total += vidList[i].size(); total += vidList[i].size();
...@@ -624,7 +626,7 @@ VideoReceiver::startRecording(void) ...@@ -624,7 +626,7 @@ VideoReceiver::startRecording(void)
return; return;
} }
uint32_t muxIdx = qgcApp()->toolbox()->settingsManager()->videoSettings()->recordingFormat()->rawValue().toUInt(); uint32_t muxIdx = _videoSettings->recordingFormat()->rawValue().toUInt();
if(muxIdx >= NUM_MUXES) { if(muxIdx >= NUM_MUXES) {
qgcApp()->showMessage(tr("Invalid video format defined.")); qgcApp()->showMessage(tr("Invalid video format defined."));
return; return;
...@@ -813,7 +815,7 @@ VideoReceiver::_updateTimer() ...@@ -813,7 +815,7 @@ VideoReceiver::_updateTimer()
if(_videoRunning) { if(_videoRunning) {
uint32_t timeout = 1; uint32_t timeout = 1;
if(qgcApp()->toolbox() && qgcApp()->toolbox()->settingsManager()) { if(qgcApp()->toolbox() && qgcApp()->toolbox()->settingsManager()) {
timeout = qgcApp()->toolbox()->settingsManager()->videoSettings()->rtspTimeout()->rawValue().toUInt(); timeout = _videoSettings->rtspTimeout()->rawValue().toUInt();
} }
time_t elapsed = 0; time_t elapsed = 0;
time_t lastFrame = _videoSurface->lastFrame(); time_t lastFrame = _videoSurface->lastFrame();
...@@ -824,7 +826,7 @@ VideoReceiver::_updateTimer() ...@@ -824,7 +826,7 @@ VideoReceiver::_updateTimer()
stop(); stop();
} }
} else { } else {
if(!running() && !_uri.isEmpty() && qgcApp()->toolbox()->settingsManager()->videoSettings()->streamEnabled()->rawValue().toBool()) { if(!running() && !_uri.isEmpty() && _videoSettings->streamEnabled()->rawValue().toBool()) {
start(); start();
} }
} }
......
...@@ -30,6 +30,8 @@ ...@@ -30,6 +30,8 @@
Q_DECLARE_LOGGING_CATEGORY(VideoReceiverLog) Q_DECLARE_LOGGING_CATEGORY(VideoReceiverLog)
class VideoSettings;
class VideoReceiver : public QObject class VideoReceiver : public QObject
{ {
Q_OBJECT Q_OBJECT
...@@ -137,6 +139,7 @@ private: ...@@ -137,6 +139,7 @@ private:
VideoSurface* _videoSurface; VideoSurface* _videoSurface;
bool _videoRunning; bool _videoRunning;
bool _showFullScreen; bool _showFullScreen;
VideoSettings* _videoSettings;
}; };
#endif // VIDEORECEIVER_H #endif // VIDEORECEIVER_H
...@@ -37,7 +37,7 @@ QGCView { ...@@ -37,7 +37,7 @@ QGCView {
property Fact _appFontPointSize: QGroundControl.settingsManager.appSettings.appFontPointSize property Fact _appFontPointSize: QGroundControl.settingsManager.appSettings.appFontPointSize
property Fact _userBrandImageIndoor: QGroundControl.settingsManager.brandImageSettings.userBrandImageIndoor property Fact _userBrandImageIndoor: QGroundControl.settingsManager.brandImageSettings.userBrandImageIndoor
property Fact _userBrandImageOutdoor: QGroundControl.settingsManager.brandImageSettings.userBrandImageOutdoor property Fact _userBrandImageOutdoor: QGroundControl.settingsManager.brandImageSettings.userBrandImageOutdoor
property real _labelWidth: ScreenTools.defaultFontPixelWidth * 15 property real _labelWidth: ScreenTools.defaultFontPixelWidth * 20
property real _editFieldWidth: ScreenTools.defaultFontPixelWidth * 30 property real _editFieldWidth: ScreenTools.defaultFontPixelWidth * 30
property Fact _mapProvider: QGroundControl.settingsManager.flightMapSettings.mapProvider property Fact _mapProvider: QGroundControl.settingsManager.flightMapSettings.mapProvider
property Fact _mapType: QGroundControl.settingsManager.flightMapSettings.mapType property Fact _mapType: QGroundControl.settingsManager.flightMapSettings.mapType
...@@ -590,13 +590,13 @@ QGCView { ...@@ -590,13 +590,13 @@ QGCView {
spacing: ScreenTools.defaultFontPixelWidth spacing: ScreenTools.defaultFontPixelWidth
visible: QGroundControl.videoManager.isGStreamer && videoSource.currentIndex && videoSource.currentIndex < 3 && QGroundControl.settingsManager.videoSettings.gridLines.visible visible: QGroundControl.videoManager.isGStreamer && videoSource.currentIndex && videoSource.currentIndex < 3 && QGroundControl.settingsManager.videoSettings.gridLines.visible
QGCLabel { QGCLabel {
text: qsTr("Grid Lines:") text: qsTr("Disable When Disarmed:")
width: _labelWidth width: _labelWidth
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
} }
FactComboBox { FactCheckBox {
width: _editFieldWidth text: ""
fact: QGroundControl.settingsManager.videoSettings.gridLines fact: QGroundControl.settingsManager.videoSettings.disableWhenDisarmed
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
} }
} }
......
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