|
|
|
@ -30,11 +30,14 @@ import CustomQuickInterface 1.0
@@ -30,11 +30,14 @@ import CustomQuickInterface 1.0
|
|
|
|
|
import Custom.Widgets 1.0 |
|
|
|
|
|
|
|
|
|
Item { |
|
|
|
|
height: cameraRect.height |
|
|
|
|
width: cameraRect.width + (ScreenTools.defaultFontPixelWidth * 2) |
|
|
|
|
height: mainColumn.height |
|
|
|
|
width: mainColumn.width + (ScreenTools.defaultFontPixelWidth * 2) |
|
|
|
|
visible: !QGroundControl.videoManager.fullScreen |
|
|
|
|
|
|
|
|
|
readonly property string _commLostStr: qsTr("NO CAMERA") |
|
|
|
|
readonly property real buttonSize: ScreenTools.defaultFontPixelWidth * 4 |
|
|
|
|
readonly property real buttonRadius: ScreenTools.defaultFontPixelWidth * 0.5 |
|
|
|
|
readonly property real iconRatio: 0.666 |
|
|
|
|
|
|
|
|
|
property real _spacers: ScreenTools.defaultFontPixelHeight |
|
|
|
|
property real _labelFieldWidth: ScreenTools.defaultFontPixelWidth * 28 |
|
|
|
@ -56,6 +59,8 @@ Item {
@@ -56,6 +59,8 @@ Item {
|
|
|
|
|
property bool _recordingVideo: _cameraVideoMode && _camera.videoStatus === QGCCameraControl.VIDEO_CAPTURE_STATUS_RUNNING |
|
|
|
|
property bool _settingsEnabled: !_communicationLost && _camera && _camera.cameraMode !== QGCCameraControl.CAM_MODE_UNDEFINED && _camera.photoStatus === QGCCameraControl.PHOTO_CAPTURE_IDLE && !_recordingVideo |
|
|
|
|
property bool _hasZoom: _camera && _camera.hasZoom |
|
|
|
|
property Fact _evFact: _camera ? _camera.ev : null |
|
|
|
|
property Fact _irPaletteFact: _camera ? _camera.irPalette : null |
|
|
|
|
|
|
|
|
|
Connections { |
|
|
|
|
target: QGroundControl.multiVehicleManager.activeVehicle |
|
|
|
@ -70,12 +75,126 @@ Item {
@@ -70,12 +75,126 @@ Item {
|
|
|
|
|
anchors.fill: parent |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//------------------------------------------------------------------------- |
|
|
|
|
//-- Main Column |
|
|
|
|
Column { |
|
|
|
|
id: mainColumn |
|
|
|
|
spacing: ScreenTools.defaultFontPixelHeight |
|
|
|
|
anchors.centerIn: parent |
|
|
|
|
//--------------------------------------------------------------------- |
|
|
|
|
//-- Quick Thermal Modes |
|
|
|
|
Rectangle { |
|
|
|
|
id: backgroundRect |
|
|
|
|
width: buttonsRow.width + (ScreenTools.defaultFontPixelWidth * 4) |
|
|
|
|
height: buttonsRow.height + (ScreenTools.defaultFontPixelHeight) |
|
|
|
|
color: qgcPal.windowShade |
|
|
|
|
radius: height * 0.5 |
|
|
|
|
visible: _camera && _camera.modelName === "DSC-QX30" && QGroundControl.videoManager.hasThermal |
|
|
|
|
anchors.horizontalCenter: parent.horizontalCenter |
|
|
|
|
ButtonGroup { |
|
|
|
|
id: buttonGroup |
|
|
|
|
exclusive: true |
|
|
|
|
buttons: buttonsRow.children |
|
|
|
|
} |
|
|
|
|
Row { |
|
|
|
|
id: buttonsRow |
|
|
|
|
spacing: ScreenTools.defaultFontPixelWidth * 0.25 |
|
|
|
|
anchors.centerIn: parent |
|
|
|
|
//-- Standard |
|
|
|
|
QGCHoverButton { |
|
|
|
|
width: buttonSize |
|
|
|
|
height: width |
|
|
|
|
checkable: true |
|
|
|
|
radius: buttonRadius |
|
|
|
|
onClicked: { |
|
|
|
|
_camera.thermalMode = QGCCameraControl.THERMAL_OFF |
|
|
|
|
//-- Restore EV to 0 |
|
|
|
|
if(_evFact) { |
|
|
|
|
_evFact.value = 6 |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
QGCColoredImage { |
|
|
|
|
source: "/custom/img/thermal-standard.svg" |
|
|
|
|
color: parent.checked ? qgcPal.buttonHighlightText : qgcPal.buttonText |
|
|
|
|
width: parent.width * iconRatio |
|
|
|
|
height: width |
|
|
|
|
anchors.centerIn: parent |
|
|
|
|
sourceSize.height: height |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
//-- PIP |
|
|
|
|
QGCHoverButton { |
|
|
|
|
width: buttonSize |
|
|
|
|
height: width |
|
|
|
|
checkable: true |
|
|
|
|
radius: buttonRadius |
|
|
|
|
onClicked: _camera.thermalMode = QGCCameraControl.THERMAL_PIP |
|
|
|
|
QGCColoredImage { |
|
|
|
|
source: "/custom/img/thermal-pip.svg" |
|
|
|
|
color: parent.checked ? qgcPal.buttonHighlightText : qgcPal.buttonText |
|
|
|
|
width: parent.width * iconRatio |
|
|
|
|
height: width |
|
|
|
|
anchors.centerIn: parent |
|
|
|
|
sourceSize.height: height |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
// Visual with high brightness |
|
|
|
|
QGCHoverButton { |
|
|
|
|
width: buttonSize |
|
|
|
|
height: width |
|
|
|
|
checkable: true |
|
|
|
|
radius: buttonRadius |
|
|
|
|
onClicked: { |
|
|
|
|
_camera.thermalMode = QGCCameraControl.THERMAL_OFF |
|
|
|
|
//-- Set EV to +1.3 |
|
|
|
|
if(_evFact) { |
|
|
|
|
_evFact.value = 10 |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
QGCColoredImage { |
|
|
|
|
source: "/custom/img/thermal-brightness.svg" |
|
|
|
|
color: parent.checked ? qgcPal.buttonHighlightText : qgcPal.buttonText |
|
|
|
|
width: parent.width * iconRatio |
|
|
|
|
height: width |
|
|
|
|
anchors.centerIn: parent |
|
|
|
|
sourceSize.height: height |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
// Thermal with color-map |
|
|
|
|
QGCHoverButton { |
|
|
|
|
width: buttonSize |
|
|
|
|
height: width |
|
|
|
|
checkable: true |
|
|
|
|
radius: buttonRadius |
|
|
|
|
onClicked: { |
|
|
|
|
if(_irPaletteFact) { |
|
|
|
|
var entryIdx = _irPaletteFact.enumStrings.find("Rainbow") |
|
|
|
|
if(entryIdx !== undefined) { |
|
|
|
|
_irPaletteFact.value = entryIdx; |
|
|
|
|
} |
|
|
|
|
_camera.thermalMode = QGCCameraControl.THERMAL_FULL |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
QGCColoredImage { |
|
|
|
|
source: "/custom/img/thermal-palette.svg" |
|
|
|
|
color: parent.checked ? qgcPal.buttonHighlightText : qgcPal.buttonText |
|
|
|
|
width: parent.width * iconRatio |
|
|
|
|
height: width |
|
|
|
|
anchors.centerIn: parent |
|
|
|
|
sourceSize.height: height |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
//--------------------------------------------------------------------- |
|
|
|
|
//-- Main Camera Control |
|
|
|
|
Rectangle { |
|
|
|
|
id: cameraRect |
|
|
|
|
height: cameraCol.height |
|
|
|
|
width: cameraCol.width + (ScreenTools.defaultFontPixelWidth * 4) |
|
|
|
|
color: qgcPal.windowShade |
|
|
|
|
radius: ScreenTools.defaultFontPixelWidth * 0.5 |
|
|
|
|
anchors.horizontalCenter: parent.horizontalCenter |
|
|
|
|
Column { |
|
|
|
|
id: cameraCol |
|
|
|
|
spacing: _spacers |
|
|
|
@ -297,7 +416,7 @@ Item {
@@ -297,7 +416,7 @@ Item {
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
//------------------------------------------------------------------------- |
|
|
|
|
//-- Camera Settings |
|
|
|
|
Popup { |
|
|
|
|