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.
69 lines
2.5 KiB
69 lines
2.5 KiB
8 years ago
|
import QtQuick 2.3
|
||
|
import QtQuick.Controls 1.2
|
||
9 years ago
|
|
||
|
import QGroundControl 1.0
|
||
|
import QGroundControl.ScreenTools 1.0
|
||
|
import QGroundControl.Controls 1.0
|
||
|
|
||
|
QGCFlickable {
|
||
|
height: outerEditorRect.height
|
||
|
contentHeight: outerEditorRect.height
|
||
|
clip: true
|
||
|
|
||
|
property var controller ///< RallyPointController
|
||
|
|
||
|
readonly property real _margin: ScreenTools.defaultFontPixelWidth / 2
|
||
|
readonly property real _radius: ScreenTools.defaultFontPixelWidth / 2
|
||
|
|
||
|
Rectangle {
|
||
|
id: outerEditorRect
|
||
|
width: parent.width
|
||
|
height: innerEditorRect.y + innerEditorRect.height + (_margin * 2)
|
||
|
radius: _radius
|
||
|
color: qgcPal.buttonHighlight
|
||
|
|
||
|
QGCLabel {
|
||
|
id: editorLabel
|
||
|
anchors.margins: _margin
|
||
|
anchors.left: parent.left
|
||
|
anchors.top: parent.top
|
||
|
text: qsTr("Rally Points (WIP careful!)")
|
||
|
color: "black"
|
||
|
}
|
||
|
|
||
|
Rectangle {
|
||
|
id: innerEditorRect
|
||
|
anchors.margins: _margin
|
||
|
anchors.left: parent.left
|
||
|
anchors.right: parent.right
|
||
|
anchors.top: editorLabel.bottom
|
||
8 years ago
|
height: infoLabel.height + helpLabel.height + (_margin * 2)
|
||
9 years ago
|
color: qgcPal.windowShadeDark
|
||
|
radius: _radius
|
||
|
|
||
|
QGCLabel {
|
||
|
id: infoLabel
|
||
|
anchors.margins: _margin
|
||
|
anchors.top: parent.top
|
||
|
anchors.left: parent.left
|
||
|
anchors.right: parent.right
|
||
|
wrapMode: Text.WordWrap
|
||
|
font.pointSize: ScreenTools.smallFontPointSize
|
||
|
text: qsTr("Rally Points provide alternate landing points when performing a Return to Launch (RTL).")
|
||
|
}
|
||
|
|
||
|
QGCLabel {
|
||
|
id: helpLabel
|
||
|
anchors.margins: _margin
|
||
|
anchors.left: parent.left
|
||
|
anchors.right: parent.right
|
||
|
anchors.top: infoLabel.bottom
|
||
|
wrapMode: Text.WordWrap
|
||
|
text: controller.rallyPointsSupported ?
|
||
|
qsTr("Click in the map to add new rally points.") :
|
||
|
qsTr("This vehicle does not support Rally Points.")
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|