地面站终端 App
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

109 lines
4.4 KiB

/****************************************************************************
*
* (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 QGroundControl 1.0
import QGroundControl.FlightDisplay 1.0
import QGroundControl.FlightMap 1.0
import QGroundControl.ScreenTools 1.0
import QGroundControl.Controls 1.0
import QGroundControl.Palette 1.0
import QGroundControl.Vehicle 1.0
import QGroundControl.Controllers 1.0
Item {
id: root
property double _ar: QGroundControl.videoManager.aspectRatio
property bool _showGrid: QGroundControl.settingsManager.videoSettings.gridLines.rawValue > 0
Merge branch 'cameraControl' into camControl * cameraControl: (51 commits) Debug info Adding support for custom value. Parse min, max, step and unit off camera definition file Ignore Fact index if there are no enums (avoid adding an "Unknown" entry) Add function to convert and clamp a (Fact) value. Adding support for booleans Adding some more logging Keep asking for capture status while camera is not idle. Define how long to wait for RTSP frame before deciding the link is gone. Toggle video stream full screen Enable/Disable Offline maps import/export. Vehicle UID Handle capture status retries when capturing images. Allow plugin to validate parameter setting. Keep track of photo status (image capture) Don't allow "Take Photo" is status is not idle. Handle In Progress response (basically, do nothing) Request capture status when stopping video recording. For whatever reason, showing the dialog through a function causes a crash in QML (undebugable--new word!) Revert "Build fix due to MAVLink update." Revert "MAVLink signing (WIP)" Make custom dialog into a function Internet available now has a signal Wait a bit between reset and request parameters Build fix due to MAVLink update. MAVLink signing (WIP) Fixing uninitialized variable warning. Make slots protected instead of private. ... # Conflicts: # src/FirmwarePlugin/FirmwarePlugin.cc # src/FlightDisplay/FlightDisplayView.qml # src/FlightDisplay/FlightDisplayViewVideo.qml # src/MissionManager/MissionManager.cc # src/Vehicle/Vehicle.cc # src/Vehicle/Vehicle.h # src/api/QGCCorePlugin.h
8 years ago
property var _videoReceiver: QGroundControl.videoManager.videoReceiver
property var _activeVehicle: QGroundControl.multiVehicleManager.activeVehicle
property var _dynamicCameras: _activeVehicle ? _activeVehicle.dynamicCameras : null
property bool _connected: _activeVehicle ? !_activeVehicle.connectionLost : false
Rectangle {
id: noVideo
anchors.fill: parent
color: Qt.rgba(0,0,0,0.75)
visible: !(_videoReceiver && _videoReceiver.videoRunning)
QGCLabel {
text: QGroundControl.settingsManager.videoSettings.streamEnabled.rawValue ? qsTr("WAITING FOR VIDEO") : qsTr("VIDEO DISABLED")
font.family: ScreenTools.demiboldFontFamily
color: "white"
9 years ago
font.pointSize: _mainIsMap ? ScreenTools.smallFontPointSize : ScreenTools.largeFontPointSize
anchors.centerIn: parent
}
MouseArea {
anchors.fill: parent
onDoubleClicked: {
QGroundControl.videoManager.fullScreen = !QGroundControl.videoManager.fullScreen
}
}
}
Rectangle {
anchors.fill: parent
color: "black"
visible: _videoReceiver && _videoReceiver.videoRunning
QGCVideoBackground {
id: videoContent
height: parent.height
width: _ar != 0.0 ? height * _ar : parent.width
anchors.centerIn: parent
receiver: _videoReceiver
display: _videoReceiver && _videoReceiver.videoSurface
visible: _videoReceiver && _videoReceiver.videoRunning
Connections {
target: _videoReceiver
onImageFileChanged: {
videoContent.grabToImage(function(result) {
if (!result.saveToFile(_videoReceiver.imageFile)) {
console.error('Error capturing video frame');
}
});
}
}
Rectangle {
color: Qt.rgba(1,1,1,0.5)
height: parent.height
width: 1
x: parent.width * 0.33
visible: _showGrid && !QGroundControl.videoManager.fullScreen
}
Rectangle {
color: Qt.rgba(1,1,1,0.5)
height: parent.height
width: 1
x: parent.width * 0.66
visible: _showGrid && !QGroundControl.videoManager.fullScreen
}
Rectangle {
color: Qt.rgba(1,1,1,0.5)
width: parent.width
height: 1
y: parent.height * 0.33
visible: _showGrid && !QGroundControl.videoManager.fullScreen
}
Rectangle {
color: Qt.rgba(1,1,1,0.5)
width: parent.width
height: 1
y: parent.height * 0.66
visible: _showGrid && !QGroundControl.videoManager.fullScreen
}
}
MouseArea {
anchors.fill: parent
onDoubleClicked: {
QGroundControl.videoManager.fullScreen = !QGroundControl.videoManager.fullScreen
}
}
}
}