|
|
@ -13,6 +13,7 @@ import QtQuick 2.11 |
|
|
|
import QtQuick.Controls 2.4 |
|
|
|
import QtQuick.Controls 2.4 |
|
|
|
import QtQuick.Layouts 1.11 |
|
|
|
import QtQuick.Layouts 1.11 |
|
|
|
import QtQuick.Dialogs 1.3 |
|
|
|
import QtQuick.Dialogs 1.3 |
|
|
|
|
|
|
|
import QtGraphicalEffects 1.0 |
|
|
|
|
|
|
|
|
|
|
|
import QtMultimedia 5.9 |
|
|
|
import QtMultimedia 5.9 |
|
|
|
import QtPositioning 5.2 |
|
|
|
import QtPositioning 5.2 |
|
|
@ -31,6 +32,7 @@ import Custom.Widgets 1.0 |
|
|
|
import Custom.Camera 1.0 |
|
|
|
import Custom.Camera 1.0 |
|
|
|
|
|
|
|
|
|
|
|
Item { |
|
|
|
Item { |
|
|
|
|
|
|
|
id: _root |
|
|
|
height: mainColumn.height |
|
|
|
height: mainColumn.height |
|
|
|
width: mainColumn.width + (ScreenTools.defaultFontPixelWidth * 2) |
|
|
|
width: mainColumn.width + (ScreenTools.defaultFontPixelWidth * 2) |
|
|
|
visible: !QGroundControl.videoManager.fullScreen |
|
|
|
visible: !QGroundControl.videoManager.fullScreen |
|
|
@ -399,10 +401,11 @@ Item { |
|
|
|
} |
|
|
|
} |
|
|
|
//-- Gimbal Indicator |
|
|
|
//-- Gimbal Indicator |
|
|
|
Rectangle { |
|
|
|
Rectangle { |
|
|
|
|
|
|
|
id: gimbalBackground |
|
|
|
width: _hasGimbal ? ScreenTools.defaultFontPixelWidth * 6 : 0 |
|
|
|
width: _hasGimbal ? ScreenTools.defaultFontPixelWidth * 6 : 0 |
|
|
|
height: _hasGimbal ? (gimbalCol.height + (ScreenTools.defaultFontPixelHeight * 2)) : 0 |
|
|
|
height: _hasGimbal ? (gimbalCol.height + (ScreenTools.defaultFontPixelHeight * 2)) : 0 |
|
|
|
visible: _hasGimbal |
|
|
|
visible: _hasGimbal |
|
|
|
color: Qt.rgba(0,0,0,0.5) |
|
|
|
color: Qt.rgba(qgcPal.window.r, qgcPal.window.g, qgcPal.window.b, 0.5) |
|
|
|
radius: ScreenTools.defaultFontPixelWidth * 0.5 |
|
|
|
radius: ScreenTools.defaultFontPixelWidth * 0.5 |
|
|
|
anchors.verticalCenter: cameraRect.verticalCenter |
|
|
|
anchors.verticalCenter: cameraRect.verticalCenter |
|
|
|
Column { |
|
|
|
Column { |
|
|
@ -410,6 +413,7 @@ Item { |
|
|
|
spacing: ScreenTools.defaultFontPixelHeight * 0.75 |
|
|
|
spacing: ScreenTools.defaultFontPixelHeight * 0.75 |
|
|
|
anchors.centerIn: parent |
|
|
|
anchors.centerIn: parent |
|
|
|
Image { |
|
|
|
Image { |
|
|
|
|
|
|
|
id: gimbalIcon |
|
|
|
source: "/custom/img/gimbal_icon.svg" |
|
|
|
source: "/custom/img/gimbal_icon.svg" |
|
|
|
width: ScreenTools.defaultFontPixelWidth * 2 |
|
|
|
width: ScreenTools.defaultFontPixelWidth * 2 |
|
|
|
height: width |
|
|
|
height: width |
|
|
@ -418,7 +422,7 @@ Item { |
|
|
|
antialiasing: true |
|
|
|
antialiasing: true |
|
|
|
fillMode: Image.PreserveAspectFit |
|
|
|
fillMode: Image.PreserveAspectFit |
|
|
|
sourceSize.width: width |
|
|
|
sourceSize.width: width |
|
|
|
anchors.horizontalCenter: parent.horizontalCenter |
|
|
|
z: stickItem.z + 1 |
|
|
|
} |
|
|
|
} |
|
|
|
Image { |
|
|
|
Image { |
|
|
|
id: pitchScale |
|
|
|
id: pitchScale |
|
|
@ -429,34 +433,42 @@ Item { |
|
|
|
smooth: true |
|
|
|
smooth: true |
|
|
|
mipmap: true |
|
|
|
mipmap: true |
|
|
|
antialiasing: true |
|
|
|
antialiasing: true |
|
|
|
anchors.horizontalCenter: parent.horizontalCenter |
|
|
|
|
|
|
|
Image { |
|
|
|
Image { |
|
|
|
id: yawIndicator |
|
|
|
id: yawIndicator |
|
|
|
width: ScreenTools.defaultFontPixelWidth * 4 |
|
|
|
width: ScreenTools.defaultFontPixelWidth * 4 |
|
|
|
source: "/custom/img/gimbal_position.svg" |
|
|
|
source: "/custom/img/gimbal_position.svg" |
|
|
|
fillMode: Image.PreserveAspectFit |
|
|
|
fillMode: Image.PreserveAspectFit |
|
|
|
sourceSize.width: width |
|
|
|
sourceSize.width: width |
|
|
|
y: (parent.height * _pitch / 105) |
|
|
|
x: pitchScale.width/2 |
|
|
|
|
|
|
|
y: (pitchScale.height * pitchScale.scaleRatio) + (pitchScale._pitch / pitchScale.rangeValue) * pitchScale.height |
|
|
|
smooth: true |
|
|
|
smooth: true |
|
|
|
mipmap: true |
|
|
|
mipmap: true |
|
|
|
anchors.horizontalCenter: parent.horizontalCenter |
|
|
|
transform: [ |
|
|
|
transform: Rotation { |
|
|
|
Translate { |
|
|
|
origin.x: yawIndicator.width / 2 |
|
|
|
x: -yawIndicator.width / 2 |
|
|
|
origin.y: yawIndicator.height / 2 |
|
|
|
y: -yawIndicator.height / 2 |
|
|
|
angle: _gimbalYaw |
|
|
|
}, |
|
|
|
} |
|
|
|
Rotation { |
|
|
|
property real _pitch: _gimbalPitch < -15 ? -15 : (_gimbalPitch > 90 ? 90 : _gimbalPitch) |
|
|
|
angle: _gimbalYaw |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
] |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
readonly property real minValue: -15 |
|
|
|
|
|
|
|
readonly property real centerValue: 0 |
|
|
|
|
|
|
|
readonly property real maxValue: 90 |
|
|
|
|
|
|
|
readonly property real rangeValue: maxValue - minValue |
|
|
|
|
|
|
|
readonly property real scaleRatio: 1/7 |
|
|
|
|
|
|
|
property real _pitch: _gimbalPitch < minValue ? minValue : (_gimbalPitch > maxValue ? maxValue : _gimbalPitch) |
|
|
|
} |
|
|
|
} |
|
|
|
QGCLabel { |
|
|
|
QGCLabel { |
|
|
|
id: gimbalLabel |
|
|
|
id: gimbalLabel |
|
|
|
text: _gimbalPitch ? _gimbalPitch.toFixed(0) : 0 |
|
|
|
text: _gimbalPitch ? pitchScale._pitch.toFixed(0) : 0 |
|
|
|
color: "#FFF" |
|
|
|
color: "#FFF" |
|
|
|
font.pointSize: ScreenTools.smallFontPointSize |
|
|
|
font.pointSize: ScreenTools.smallFontPointSize |
|
|
|
anchors.horizontalCenter: parent.horizontalCenter |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} // Gimbal Indicator |
|
|
|
} |
|
|
|
} |
|
|
|
//-- Zoom Buttons |
|
|
|
//-- Zoom Buttons |
|
|
|
ZoomControl { |
|
|
|
ZoomControl { |
|
|
@ -468,6 +480,7 @@ Item { |
|
|
|
zoomLevelVisible: false |
|
|
|
zoomLevelVisible: false |
|
|
|
zoomLevel: _hasZoom ? _camera.zoomLevel : NaN |
|
|
|
zoomLevel: _hasZoom ? _camera.zoomLevel : NaN |
|
|
|
anchors.horizontalCenter: parent.horizontalCenter |
|
|
|
anchors.horizontalCenter: parent.horizontalCenter |
|
|
|
|
|
|
|
onlyContinousZoom: true |
|
|
|
onZoomIn: { |
|
|
|
onZoomIn: { |
|
|
|
_camera.stepZoom(1) |
|
|
|
_camera.stepZoom(1) |
|
|
|
} |
|
|
|
} |
|
|
@ -940,18 +953,18 @@ Item { |
|
|
|
id: thermalPalettes |
|
|
|
id: thermalPalettes |
|
|
|
width: Math.min(mainWindow.width * 0.666, ScreenTools.defaultFontPixelWidth * 40) |
|
|
|
width: Math.min(mainWindow.width * 0.666, ScreenTools.defaultFontPixelWidth * 40) |
|
|
|
height: mainWindow.height * 0.5 |
|
|
|
height: mainWindow.height * 0.5 |
|
|
|
//modal: true |
|
|
|
modal: true |
|
|
|
focus: true |
|
|
|
focus: true |
|
|
|
parent: Overlay.overlay |
|
|
|
parent: Overlay.overlay |
|
|
|
x: Math.round((mainWindow.width - width) * 0.5) |
|
|
|
x: Math.round((mainWindow.width - width) * 0.5) |
|
|
|
y: Math.round((mainWindow.height - height) * 0.5) |
|
|
|
y: Math.round((mainWindow.height - height) * 0.5) |
|
|
|
closePolicy: Popup.CloseOnEscape | Popup.CloseOnPressOutside |
|
|
|
closePolicy: Popup.CloseOnEscape | Popup.CloseOnPressOutside |
|
|
|
property int selectedIndex: 0 |
|
|
|
|
|
|
|
background: Rectangle { |
|
|
|
background: Rectangle { |
|
|
|
anchors.fill: parent |
|
|
|
anchors.fill: parent |
|
|
|
color: qgcPal.globalTheme === QGCPalette.Light ? Qt.rgba(1,1,1,0.95) : Qt.rgba(0,0,0,0.75) |
|
|
|
color: qgcPal.globalTheme === QGCPalette.Light ? Qt.rgba(1,1,1,0.95) : Qt.rgba(0,0,0,0.75) |
|
|
|
border.color: qgcPal.text |
|
|
|
border.color: qgcPal.text |
|
|
|
radius: ScreenTools.defaultFontPixelWidth |
|
|
|
radius: ScreenTools.defaultFontPixelWidth * 0.5 |
|
|
|
} |
|
|
|
} |
|
|
|
Item { |
|
|
|
Item { |
|
|
|
anchors.fill: parent |
|
|
|
anchors.fill: parent |
|
|
@ -987,6 +1000,7 @@ Item { |
|
|
|
if(thermalBackgroundRect.visible) { |
|
|
|
if(thermalBackgroundRect.visible) { |
|
|
|
if(_camera.thermalMode !== QGCCameraControl.THERMAL_PIP && _camera.thermalMode !== QGCCameraControl.THERMAL_FULL) { |
|
|
|
if(_camera.thermalMode !== QGCCameraControl.THERMAL_PIP && _camera.thermalMode !== QGCCameraControl.THERMAL_FULL) { |
|
|
|
_camera.thermalMode = QGCCameraControl.THERMAL_FULL |
|
|
|
_camera.thermalMode = QGCCameraControl.THERMAL_FULL |
|
|
|
|
|
|
|
thermalFull.checked = true |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|