Commit accb2ed3 authored by Valentin Platzgummer's avatar Valentin Platzgummer

wima menu scrollbar fixed

parent 99d9796c
./create_linux_appimage.sh /home/valentin/drones/qgroundcontrol/ /home/valentin/drones/build-qgroundcontrol-Desktop_Qt_5_11_3_GCC_64bit-Release/release/
./create_linux_appimage.sh /home/valentin/Desktop/drones/qgroundcontrol/ /home/valentin/Desktop/drones/build-qgroundcontrol-Desktop_Qt_5_11_3_GCC_64bit-Release/release/
......@@ -62,10 +62,6 @@ Item {
width: enableWima.enableWimaBoolean ? parent.width : enableWima.width
color: enableWima.enableWimaBoolean ? qgcPal.window : "transparent"
radius: ScreenTools.defaultFontPixelHeight / 4
anchors.topMargin: ScreenTools.defaultFontPixelHeight * 0.5
anchors.bottomMargin: ScreenTools.defaultFontPixelHeight * 0.5
anchors.rightMargin: ScreenTools.defaultFontPixelHeight * 0.5
anchors.leftMargin: ScreenTools.defaultFontPixelHeight * 0.5
// checkbox to enable/ disable wima
SliderSwitch {
......@@ -87,47 +83,64 @@ Item {
}
}
Rectangle {
id: controllerFrame
Item {
id: flickableWrapper
anchors.top: enableWima.bottom
anchors.left: parent.left
anchors.right: parent.right
anchors.bottom: parent.bottom
anchors.margins: ScreenTools.defaultFontPixelHeight *0.25
color: qgcPal.window
anchors.margins: ScreenTools.defaultFontPixelHeight*0.5
QGCFlickable {
clip: true
anchors.fill: parent
contentHeight: wrapperItem.height
contentWidth: wrapperItem.width
Item {
id: wrapperItem
width: Math.max(flickableWrapper.width, mainColumn.width)
height: mainColumn.height
ScrollView {
id: scrollView
anchors.fill: parent
property int itemWidth: 120
Column {
/*SectionHeader {
id: mainColumn
anchors.horizontalCenter: parent.horizontalCenter
spacing: 4
SectionHeader{
id: settingsHeader
text: qsTr("Settings")
}*/
}
GridLayout {
columns: 2
rowSpacing: ScreenTools.defaultFontPixelHeight * 0.5
columnSpacing: ScreenTools.defaultFontPixelHeight * 0.5
visible: settingsHeader.checked
// Settings
QGCLabel { text: qsTr("Next Waypoint") }
QGCLabel {
text: qsTr("Next Waypoint")
Layout.fillWidth: true
}
FactTextField {
fact: wimaController.startWaypointIndex
Layout.fillWidth: true
}
QGCLabel { text: qsTr("Max Waypoints") }
QGCLabel {
text: qsTr("Max Waypoints")
Layout.fillWidth: true
}
FactTextField {
fact: wimaController.maxWaypointsPerPhase
Layout.fillWidth: true
}
QGCLabel { text: qsTr("Overlap") }
QGCLabel {
text: qsTr("Overlap")
Layout.fillWidth: true
}
FactTextField {
fact: wimaController.overlapWaypoints
Layout.fillWidth: true
......@@ -136,49 +149,66 @@ Item {
FactCheckBox {
text: qsTr("Show All")
fact: wimaController.showAllMissionItems
Layout.fillWidth: true
}
FactCheckBox {
text: qsTr("Show Current")
fact: wimaController.showCurrentMissionItems
Layout.fillWidth: true
}
} // Grid
}
/*SectionHeader{
SectionHeader{
id: missionHeader
text: qsTr("Mission")
}*/
}
GridLayout {
columns: 2
rowSpacing: ScreenTools.defaultFontPixelHeight * 0.5
columnSpacing: ScreenTools.defaultFontPixelHeight * 0.5
visible: missionHeader.checked
width: parent.width
QGCLabel { text: qsTr("Speed") }
QGCLabel {
text: qsTr("Speed")
Layout.fillWidth: true
}
FactTextField {
fact: wimaController.flightSpeed
Layout.fillWidth: true
}
QGCLabel { text: qsTr("Altitude") }
QGCLabel {
text: qsTr("Altitude")
Layout.fillWidth: true
}
FactTextField {
fact: wimaController.altitude
Layout.fillWidth: true
}
}
GridLayout {
columns: 2
rowSpacing: ScreenTools.defaultFontPixelHeight * 0.5
columnSpacing: ScreenTools.defaultFontPixelHeight * 0.5
visible: missionHeader.checked
width: parent.width
// Buttons
QGCButton {
id: buttonPreviousMissionPhase
text: qsTr("Reverse")
onClicked: wimaController.previousPhase();
onClicked: wimaController.previousPhase()
Layout.fillWidth: true
}
QGCButton {
id: buttonNextMissionPhase
text: qsTr("Forward")
onClicked: wimaController.nextPhase();
onClicked: wimaController.nextPhase()
Layout.fillWidth: true
}
......@@ -186,12 +216,10 @@ Item {
id: buttonResetPhase
text: qsTr("Reset Phase")
onClicked: wimaController.resetPhase();
Layout.columnSpan: 2
Layout.fillWidth: true
Layout.rowSpan: 2
}
/*}
} // Grid
SectionHeader{
id: vehicleHeader
......@@ -201,19 +229,20 @@ Item {
columns: 2
rowSpacing: ScreenTools.defaultFontPixelHeight * 0.5
columnSpacing: ScreenTools.defaultFontPixelHeight * 0.5
visible: vehicleHeader.checked*/
visible: vehicleHeader.checked
width: parent.width
QGCButton {
id: buttonUpload
text: qsTr("Upload")
onClicked: wimaController.uploadToVehicle();
onClicked: wimaController.uploadToVehicle()
Layout.fillWidth: true
}
QGCButton {
id: buttonRemoveFromVehicle
text: qsTr("Remove")
onClicked: wimaController.removeFromVehicle();
onClicked: wimaController.removeFromVehicle()
Layout.fillWidth: true
}
......@@ -221,10 +250,9 @@ Item {
id: buttonSmartRTL
text: qsTr("Smart RTL")
onClicked: initSmartRTL()
Layout.columnSpan: 2
Layout.fillWidth: true
}
// placeholder, remove if you add stuff
QGCLabel { text: "" }
// progess bar
......@@ -234,6 +262,8 @@ Item {
width: _controllerProgressPct * parent.width
color: qgcPal.colorGreen
visible: false
Layout.columnSpan: 2
Layout.fillWidth: true
}
QGCLabel {
......@@ -244,44 +274,49 @@ Item {
verticalAlignment: Text.AlignVCenter
text: "Done"
visible: false
Layout.fillWidth: true
}
}
/*SectionHeader {
SectionHeader {
id: statsHeader
text: qsTr("Statistics")
}*/
}
GridLayout {
columns: 2
rowSpacing: ScreenTools.defaultFontPixelHeight * 0.5
anchors.topMargin: ScreenTools.defaultFontPixelHeight * 0.25
anchors.topMargin: ScreenTools.defaultFontPixelHeight * 0.5
visible: statsHeader.checked
QGCLabel {
text: qsTr("Phase Length: ")
wrapMode: Text.WordWrap
font.pointSize: ScreenTools.smallFontPointSize
Layout.fillWidth: true
}
QGCLabel {
text: wimaController.phaseDistance >= 0 ? wimaController.phaseDistance.toFixed(2) + " m": ""
wrapMode: Text.WordWrap
font.pointSize: ScreenTools.smallFontPointSize
Layout.fillWidth: true
}
QGCLabel {
text: qsTr("Phase Duration: ")
wrapMode: Text.WordWrap
font.pointSize: ScreenTools.smallFontPointSize
Layout.fillWidth: true
}
QGCLabel {
text: wimaController.phaseDuration >= 0 ? getTime(wimaController.phaseDuration) : ""
wrapMode: Text.WordWrap
font.pointSize: ScreenTools.smallFontPointSize
Layout.fillWidth: true
}
QGCLabel {
text: ""
Layout.columnSpan: 2
}
}
} // mainColumn
} // item
} // Rectangle
} // settingsColumn
} // wrapperItem
} // QGCFlickable
} // Item
}
}
......@@ -8,8 +8,7 @@ import QGroundControl.Palette 1.0
FocusScope {
id: _root
anchors.left: parent.left
anchors.right: parent.right
width: parent.width
height: column.height
property alias text: label.text
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment