@ -13,7 +13,7 @@ import QGroundControl.Palette 1.0
@@ -13,7 +13,7 @@ import QGroundControl.Palette 1.0
/ / E d i t o r f o r S i m p l e m i s s i o n i t e m s
Rectangle {
width: availableWidth
height: values Column. height + ( _margin * 2 )
height: editor Column. height + ( _margin * 2 )
color: qgcPal . windowShadeDark
radius: _radius
@ -53,212 +53,246 @@ Rectangle {
@@ -53,212 +53,246 @@ Rectangle {
}
Column {
id: values Column
id: editor Column
anchors.margins: _margin
anchors.left: parent . left
anchors.right: parent . right
anchors.top: parent . top
spacing: _margin
QGCLabel {
width: parent . width
wrapMode: Text . WordWrap
font.pointSize: ScreenTools . smallFontPointSize
text: missionItem . rawEdit ?
qsTr ( "Provides advanced access to all commands/parameters. Be very careful!" ) :
missionItem . commandDescription
}
GridLayout {
anchors.left: parent . left
anchors.right: parent . right
columns: 2
Repeater {
model: missionItem . comboboxFacts
ColumnLayout {
anchors.left: parent . left
anchors.right: parent . right
spacing: _margin
visible: missionItem . wizardMode
QGCLabel {
text: object . name
visible: object . name !== ""
Layout.column: 0
Layout.row: index
}
QGCLabel {
text: qsTr ( "Adjust the initial launch location by selecting 'P' and dragging it to the correct location." )
Layout.fillWidth: true
wrapMode: Text . WordWrap
}
Repeater {
model: missionItem . comboboxFacts
QGCLabel {
text: qsTr ( "Adjust the takeoff completion location by dragging it to the correct location." )
Layout.fillWidth: true
wrapMode: Text . WordWrap
}
FactComboBox {
indexModel: false
model: object . enumStrings
fact: object
font.pointSize: ScreenTools . smallFontPointSize
Layout.column: 1
Layout.row: index
Layout.fillWidth: true
QGCButton {
text: qsTr ( "Done Adjusting" )
Layout.fillWidth: true
onClicked: {
missionItem . wizardMode = false
editorRoot . selectNextNotReadyItem ( )
}
}
}
Rectangle {
anchors.left: parent . left
anchors.right: parent . right
height: altColumn . y + altColumn . height + _margin
color: qgcPal . windowShade
visible: _specifiesAltitude
Column {
id: altColumn
anchors.margins: _margin
anchors.top: parent . top
anchors.left: parent . left
anchors.right: parent . right
spacing: _margin
Item {
width: altHamburger . x + altHamburger . width
height: altModeLabel . height
QGCLabel { id: altModeLabel }
QGCColoredImage {
id: altHamburger
anchors.leftMargin: ScreenTools . defaultFontPixelWidth / 4
anchors.left: altModeLabel . right
anchors.verticalCenter: altModeLabel . verticalCenter
width: ScreenTools . defaultFontPixelHeight / 2
height: width
sourceSize.height: height
source: "/res/DropArrow.svg"
color: qgcPal . text
}
Column {
anchors.left: parent . left
anchors.right: parent . right
spacing: _margin
visible: ! missionItem . wizardMode
QGCLabel {
width: parent . width
wrapMode: Text . WordWrap
font.pointSize: ScreenTools . smallFontPointSize
text: missionItem . rawEdit ?
qsTr ( "Provides advanced access to all commands/parameters. Be very careful!" ) :
missionItem . commandDescription
}
QGCMouseArea {
anchors.fill: paren t
onClicked: altHamburgerMenu . popup ( )
}
GridLayout {
anchors.left: parent . left
anchors.right: parent . right
columns: 2
QGCMenu {
id: altHamburgerMenu
Repeater {
model: missionItem . comboboxFacts
QGCMenuItem {
text: qsTr ( "Altitude Relative To Home" )
checkable: true
checked: missionItem . altitudeMode === QGroundControl . AltitudeModeRelative
onTriggered: missionItem . altitudeMode = QGroundControl . AltitudeModeRelative
}
QGCLabel {
text: object . name
visible: object . name !== ""
Layout.column: 0
Layout.row: index
}
}
Repeater {
model: missionItem . comboboxFacts
FactComboBox {
indexModel: false
model: object . enumStrings
fact: object
font.pointSize: ScreenTools . smallFontPointSize
Layout.column: 1
Layout.row: index
Layout.fillWidth: true
}
}
}
QGCMenuItem {
text: qsTr ( "Altitude Above Mean Sea Level" )
checkable: true
checked: missionItem . altitudeMode === QGroundControl . AltitudeModeAbsolute
visible: QGroundControl . corePlugin . options . showMissionAbsoluteAltitude
onTriggered: missionItem . altitudeMode = QGroundControl . AltitudeModeAbsolute
Rectangle {
anchors.left: parent . left
anchors.right: parent . right
height: altColumn . y + altColumn . height + _margin
color: qgcPal . windowShade
visible: _specifiesAltitude
Column {
id: altColumn
anchors.margins: _margin
anchors.top: parent . top
anchors.left: parent . left
anchors.right: parent . right
spacing: _margin
Item {
width: altHamburger . x + altHamburger . width
height: altModeLabel . height
QGCLabel { id: altModeLabel }
QGCColoredImage {
id: altHamburger
anchors.leftMargin: ScreenTools . defaultFontPixelWidth / 4
anchors.left: altModeLabel . right
anchors.verticalCenter: altModeLabel . verticalCenter
width: ScreenTools . defaultFontPixelHeight / 2
height: width
sourceSize.height: height
source: "/res/DropArrow.svg"
color: qgcPal . text
}
QGCMenuItem {
text: qsTr ( "Altitude Above Terrain" )
checkable: true
checked: missionItem . altitudeMode === QGroundControl . AltitudeModeAboveTerrain
onTriggered: missionItem . altitudeMode = QGroundControl . AltitudeModeAboveTerrain
visible: missionItem . specifiesCoordinate
QGCMouseArea {
anchors.fill: parent
onClicked: altHamburgerMenu . popup ( )
}
QGCMenuItem {
text: qsTr ( "Terrain Frame" )
checkable: true
checked: missionItem . altitudeMode === QGroundControl . AltitudeModeTerrainFrame
visible: missionItem . altitudeMode === QGroundControl . AltitudeModeTerrainFrame
onTriggered: missionItem . altitudeMode = QGroundControl . AltitudeModeTerrainFrame
QGCMenu {
id: altHamburgerMenu
QGCMenuItem {
text: qsTr ( "Altitude Relative To Home" )
checkable: true
checked: missionItem . altitudeMode === QGroundControl . AltitudeModeRelative
onTriggered: missionItem . altitudeMode = QGroundControl . AltitudeModeRelative
}
QGCMenuItem {
text: qsTr ( "Altitude Above Mean Sea Level" )
checkable: true
checked: missionItem . altitudeMode === QGroundControl . AltitudeModeAbsolute
visible: QGroundControl . corePlugin . options . showMissionAbsoluteAltitude
onTriggered: missionItem . altitudeMode = QGroundControl . AltitudeModeAbsolute
}
QGCMenuItem {
text: qsTr ( "Altitude Above Terrain" )
checkable: true
checked: missionItem . altitudeMode === QGroundControl . AltitudeModeAboveTerrain
onTriggered: missionItem . altitudeMode = QGroundControl . AltitudeModeAboveTerrain
visible: missionItem . specifiesCoordinate
}
QGCMenuItem {
text: qsTr ( "Terrain Frame" )
checkable: true
checked: missionItem . altitudeMode === QGroundControl . AltitudeModeTerrainFrame
visible: missionItem . altitudeMode === QGroundControl . AltitudeModeTerrainFrame
onTriggered: missionItem . altitudeMode = QGroundControl . AltitudeModeTerrainFrame
}
}
}
}
AltitudeFactTextField {
id: altField
fact: missionItem . altitude
altitudeMode: missionItem . altitudeMode
anchors.left: parent . left
anchors.right: parent . right
}
AltitudeFactTextField {
id: altField
fact: missionItem . altitude
altitudeMode: missionItem . altitudeMode
anchors.left: parent . left
anchors.right: parent . right
}
QGCLabel {
id: altModeHelp
wrapMode: Text . WordWrap
font.pointSize: ScreenTools . smallFontPointSize
anchors.left: parent . left
anchors.right: parent . right
QGCLabel {
id: altModeHelp
wrapMode: Text . WordWrap
font.pointSize: ScreenTools . smallFontPointSize
anchors.left: parent . left
anchors.right: parent . right
}
}
}
}
GridLayout {
anchors.left: parent . left
anchors.right: parent . right
flow: GridLayout . TopToBottom
rows: missionItem . textFieldFacts . count +
missionItem . nanFacts . count +
( missionItem . speedSection . available ? 1 : 0 )
columns: 2
GridLayout {
anchors.left: parent . left
anchors.right: parent . right
flow: GridLayout . TopToBottom
rows: missionItem . textFieldFacts . count +
missionItem . nanFacts . count +
( missionItem . speedSection . available ? 1 : 0 )
columns: 2
Repeater {
model: missionItem . textFieldFacts
Repeater {
model: missionItem . textFieldFacts
QGCLabel { text: object . name }
}
QGCLabel { text: object . name }
}
Repeater {
model: missionItem . nanFacts
Repeater {
model: missionItem . nanFacts
QGCCheckBox {
text: object . name
checked: ! isNaN ( object . rawValue )
onClicked: object . rawValue = checked ? 0 : NaN
QGCCheckBox {
text: object . name
checked: ! isNaN ( object . rawValue )
onClicked: object . rawValue = checked ? 0 : NaN
}
}
}
QGCCheckBox {
id: flightSpeedCheckbox
text: qsTr ( "Flight Speed" )
checked: missionItem . speedSection . specifyFlightSpeed
onClicked: missionItem . speedSection . specifyFlightSpeed = checked
visible: missionItem . speedSection . available
}
QGCCheckBox {
id: flightSpeedCheckbox
text: qsTr ( "Flight Speed" )
checked: missionItem . speedSection . specifyFlightSpeed
onClicked: missionItem . speedSection . specifyFlightSpeed = checked
visible: missionItem . speedSection . available
}
Repeater {
model: missionItem . textFieldFacts
Repeater {
model: missionItem . textFieldFacts
FactTextField {
showUnits: true
fact: object
Layout.fillWidth: true
enabled: ! object . readOnly
FactTextField {
showUnits: true
fact: object
Layout.fillWidth: true
enabled: ! object . readOnly
}
}
}
Repeater {
model: missionItem . nanFacts
Repeater {
model: missionItem . nanFacts
FactTextField {
showUnits: true
fact: object
Layout.fillWidth: true
enabled: ! isNaN ( object . rawValue )
}
}
FactTextField {
showUnits: true
fact: object
fact: missionItem . speedSection . flightSpeed
Layout.fillWidth: true
enabled: ! isNaN ( object . rawValue )
enabled: flightSpeedCheckbox . checked
visible: missionItem . speedSection . available
}
}
FactTextField {
fact: missionItem . speedSection . flightSpeed
Layout.fillWidth: true
enabled: flightSpeedCheckbox . checked
visible: missionItem . speedSection . available
CameraSection {
checked: missionItem . cameraSection . settingsSpecified
visible: missionItem . cameraSection . available
}
}
CameraSection {
checked: missionItem . cameraSection . settingsSpecified
visible: missionItem . cameraSection . available
}
} / / C o l u m n
} / / R e c t a n g l e
}
}