地面站终端 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.

115 lines
4.1 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.12
import QtQuick.Layouts 1.12
import QGroundControl 1.0
import QGroundControl.ScreenTools 1.0
import QGroundControl.Vehicle 1.0
import QGroundControl.Controls 1.0
import QGroundControl.Palette 1.0
Rectangle {
id: telemetryPanel
height: telemetryLayout.height + (_toolsMargin * 2)
width: telemetryLayout.width + (_toolsMargin * 2)
color: qgcPal.window
radius: ScreenTools.defaultFontPixelWidth / 2
property bool bottomMode: true
DeadMouseArea { anchors.fill: parent }
ColumnLayout {
id: telemetryLayout
anchors.margins: _toolsMargin
anchors.bottom: parent.bottom
anchors.left: parent.left
RowLayout {
visible: mouseArea.containsMouse || valueArea.settingsUnlocked
QGCColoredImage {
source: "/res/layout-bottom.svg"
mipmap: true
width: ScreenTools.minTouchPixels * 0.75
height: width
sourceSize.width: width
color: qgcPal.text
fillMode: Image.PreserveAspectFit
visible: !bottomMode
QGCMouseArea {
fillItem: parent
onClicked: bottomMode = true
}
}
QGCColoredImage {
source: "/res/layout-right.svg"
mipmap: true
width: ScreenTools.minTouchPixels * 0.75
height: width
sourceSize.width: width
color: qgcPal.text
fillMode: Image.PreserveAspectFit
visible: bottomMode
QGCMouseArea {
fillItem: parent
onClicked: bottomMode = false
}
}
QGCColoredImage {
source: valueArea.settingsUnlocked ? "/res/LockOpen.svg" : "/res/pencil.svg"
mipmap: true
width: ScreenTools.minTouchPixels * 0.75
height: width
sourceSize.width: width
color: qgcPal.text
fillMode: Image.PreserveAspectFit
QGCMouseArea {
anchors.fill: parent
hoverEnabled: true
cursorShape: Qt.PointingHandCursor
onClicked: valueArea.settingsUnlocked = !valueArea.settingsUnlocked
}
}
}
QGCMouseArea {
id: mouseArea
x: telemetryLayout.x
y: telemetryLayout.y
width: telemetryLayout.width
height: telemetryLayout.height
hoverEnabled: !ScreenTools.isMobile
propagateComposedEvents: true
onClicked: {
if (ScreenTools.isMobile && !valueArea.settingsUnlocked) {
valueArea.settingsUnlocked = true
mouse.accepted = true
} else {
mouse.accepted = false
}
}
}
HorizontalFactValueGrid {
id: valueArea
userSettingsGroup: telemetryBarUserSettingsGroup
defaultSettingsGroup: telemetryBarDefaultSettingsGroup
}
}
}