diff --git a/deploy/QGroundControl.AppImage b/deploy/QGroundControl.AppImage index 30c156dfb7b3eaa999ac3b1e683da58695eee884..3050e98f99f4a9f6390c644e1c8327c3cdfea679 100755 Binary files a/deploy/QGroundControl.AppImage and b/deploy/QGroundControl.AppImage differ diff --git a/deploy/appImageCommand.txt b/deploy/appImageCommand.txt index 322a5cb43ef0a0a1dd608ee8bf4d5752f468ec60..9fd6857014d5da0dc89c3c375f7b127aef6073d7 100644 --- a/deploy/appImageCommand.txt +++ b/deploy/appImageCommand.txt @@ -1 +1 @@ -./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/ diff --git a/src/FlightDisplay/FlightDisplayWimaMenu.qml b/src/FlightDisplay/FlightDisplayWimaMenu.qml index 4963c44c124abf3520fac45bfe04773a651faeb3..d8a6851b2cb7749eb90512e0233a7bdd8815eaf9 100644 --- a/src/FlightDisplay/FlightDisplayWimaMenu.qml +++ b/src/FlightDisplay/FlightDisplayWimaMenu.qml @@ -62,18 +62,14 @@ 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 { id: enableWima - anchors.horizontalCenter: parent.horizontalCenter - anchors.topMargin: ScreenTools.defaultFontPixelHeight * 0.25 - anchors.top: parent.top - confirmText: enableWimaBoolean ? qsTr("disable WiMA") : qsTr("enable WiMA") + anchors.horizontalCenter: parent.horizontalCenter + anchors.topMargin: ScreenTools.defaultFontPixelHeight * 0.25 + anchors.top: parent.top + confirmText: enableWimaBoolean ? qsTr("disable WiMA") : qsTr("enable WiMA") property var enableWimaFact: wimaController.enableWimaController property bool enableWimaBoolean: enableWimaFact.value @@ -87,201 +83,240 @@ Item { } } - Rectangle { - id: controllerFrame - 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 - clip: true - - - ScrollView { - id: scrollView - anchors.fill: parent - - Column { - /*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") } - FactTextField { - fact: wimaController.startWaypointIndex - Layout.fillWidth: true + Item { + id: flickableWrapper + anchors.top: enableWima.bottom + anchors.left: parent.left + anchors.right: parent.right + anchors.bottom: parent.bottom + 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 + + property int itemWidth: 120 + + Column { + id: mainColumn + anchors.horizontalCenter: parent.horizontalCenter + spacing: 4 + + SectionHeader{ + id: settingsHeader + text: qsTr("Settings") } - - QGCLabel { text: qsTr("Max Waypoints") } - FactTextField { - fact: wimaController.maxWaypointsPerPhase - Layout.fillWidth: true - } - - QGCLabel { text: qsTr("Overlap") } - FactTextField { - fact: wimaController.overlapWaypoints - Layout.fillWidth: true - } - - FactCheckBox { - text: qsTr("Show All") - fact: wimaController.showAllMissionItems - } - - FactCheckBox { - text: qsTr("Show Current") - fact: wimaController.showCurrentMissionItems - } - - } - - /*SectionHeader{ - id: missionHeader - text: qsTr("Mission") - }*/ - GridLayout { - columns: 2 - rowSpacing: ScreenTools.defaultFontPixelHeight * 0.5 - columnSpacing: ScreenTools.defaultFontPixelHeight * 0.5 - visible: missionHeader.checked - - QGCLabel { text: qsTr("Speed") } - FactTextField { - fact: wimaController.flightSpeed - Layout.fillWidth: true - } - - QGCLabel { text: qsTr("Altitude") } - FactTextField { - fact: wimaController.altitude - Layout.fillWidth: true - } - - // Buttons - QGCButton { - id: buttonPreviousMissionPhase - text: qsTr("Reverse") - onClicked: wimaController.previousPhase(); - Layout.fillWidth: true - } - - QGCButton { - id: buttonNextMissionPhase - text: qsTr("Forward") - onClicked: wimaController.nextPhase(); - Layout.fillWidth: true - } - - QGCButton { - id: buttonResetPhase - text: qsTr("Reset Phase") - onClicked: wimaController.resetPhase(); - Layout.fillWidth: true - Layout.rowSpan: 2 - } - - - /*} - - SectionHeader{ - id: vehicleHeader - text: qsTr("Vehicle") - } - GridLayout { - columns: 2 - rowSpacing: ScreenTools.defaultFontPixelHeight * 0.5 - columnSpacing: ScreenTools.defaultFontPixelHeight * 0.5 - visible: vehicleHeader.checked*/ - - QGCButton { - id: buttonUpload - text: qsTr("Upload") - onClicked: wimaController.uploadToVehicle(); - Layout.fillWidth: true - } - - QGCButton { - id: buttonRemoveFromVehicle - text: qsTr("Remove") - onClicked: wimaController.removeFromVehicle(); - Layout.fillWidth: true - } - - QGCButton { - id: buttonSmartRTL - text: qsTr("Smart RTL") - onClicked: initSmartRTL() - Layout.fillWidth: true - } - // placeholder, remove if you add stuff - QGCLabel { text: "" } - - - // progess bar - Rectangle { - id: progressBar - height: 4 - width: _controllerProgressPct * parent.width - color: qgcPal.colorGreen - visible: false + GridLayout { + columns: 2 + rowSpacing: ScreenTools.defaultFontPixelHeight * 0.5 + columnSpacing: ScreenTools.defaultFontPixelHeight * 0.5 + visible: settingsHeader.checked + + QGCLabel { + text: qsTr("Next Waypoint") + Layout.fillWidth: true + } + FactTextField { + fact: wimaController.startWaypointIndex + Layout.fillWidth: true + } + + QGCLabel { + text: qsTr("Max Waypoints") + Layout.fillWidth: true + } + FactTextField { + fact: wimaController.maxWaypointsPerPhase + Layout.fillWidth: true + } + + QGCLabel { + text: qsTr("Overlap") + Layout.fillWidth: true + } + FactTextField { + fact: wimaController.overlapWaypoints + Layout.fillWidth: true + } + + FactCheckBox { + text: qsTr("Show All") + fact: wimaController.showAllMissionItems + Layout.fillWidth: true + } + + FactCheckBox { + text: qsTr("Show Current") + fact: wimaController.showCurrentMissionItems + Layout.fillWidth: true + } + } // Grid + + 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") + Layout.fillWidth: true + } + FactTextField { + fact: wimaController.flightSpeed + Layout.fillWidth: true + } + + QGCLabel { + text: qsTr("Altitude") + Layout.fillWidth: true + } + FactTextField { + fact: wimaController.altitude + Layout.fillWidth: true + } - QGCLabel { - id: uploadCompleteText - font.pointSize: ScreenTools.largeFontPointSize - Layout.columnSpan: 2 - horizontalAlignment: Text.AlignHCenter - verticalAlignment: Text.AlignVCenter - text: "Done" - visible: false } - } - - /*SectionHeader { - id: statsHeader - text: qsTr("Statistics") - }*/ - GridLayout { - columns: 2 - rowSpacing: ScreenTools.defaultFontPixelHeight * 0.5 - anchors.topMargin: ScreenTools.defaultFontPixelHeight * 0.25 - visible: statsHeader.checked - - QGCLabel { - text: qsTr("Phase Length: ") - wrapMode: Text.WordWrap - font.pointSize: ScreenTools.smallFontPointSize + 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() + Layout.fillWidth: true + } + + QGCButton { + id: buttonNextMissionPhase + text: qsTr("Forward") + onClicked: wimaController.nextPhase() + Layout.fillWidth: true + } + + QGCButton { + id: buttonResetPhase + text: qsTr("Reset Phase") + onClicked: wimaController.resetPhase(); + Layout.columnSpan: 2 + Layout.fillWidth: true + } + } // Grid + + SectionHeader{ + id: vehicleHeader + text: qsTr("Vehicle") } - QGCLabel { - text: wimaController.phaseDistance >= 0 ? wimaController.phaseDistance.toFixed(2) + " m": "" - wrapMode: Text.WordWrap - font.pointSize: ScreenTools.smallFontPointSize + GridLayout { + columns: 2 + rowSpacing: ScreenTools.defaultFontPixelHeight * 0.5 + columnSpacing: ScreenTools.defaultFontPixelHeight * 0.5 + visible: vehicleHeader.checked + width: parent.width + + QGCButton { + id: buttonUpload + text: qsTr("Upload") + onClicked: wimaController.uploadToVehicle() + Layout.fillWidth: true + } + + QGCButton { + id: buttonRemoveFromVehicle + text: qsTr("Remove") + onClicked: wimaController.removeFromVehicle() + Layout.fillWidth: true + } + + QGCButton { + id: buttonSmartRTL + text: qsTr("Smart RTL") + onClicked: initSmartRTL() + Layout.columnSpan: 2 + Layout.fillWidth: true + } + + + // progess bar + Rectangle { + id: progressBar + height: 4 + width: _controllerProgressPct * parent.width + color: qgcPal.colorGreen + visible: false + Layout.columnSpan: 2 + Layout.fillWidth: true + } + + QGCLabel { + id: uploadCompleteText + font.pointSize: ScreenTools.largeFontPointSize + Layout.columnSpan: 2 + horizontalAlignment: Text.AlignHCenter + verticalAlignment: Text.AlignVCenter + text: "Done" + visible: false + Layout.fillWidth: true + } } - QGCLabel { - text: qsTr("Phase Duration: ") - wrapMode: Text.WordWrap - font.pointSize: ScreenTools.smallFontPointSize + SectionHeader { + id: statsHeader + text: qsTr("Statistics") } - QGCLabel { - text: wimaController.phaseDuration >= 0 ? getTime(wimaController.phaseDuration) : "" - wrapMode: Text.WordWrap - font.pointSize: ScreenTools.smallFontPointSize + GridLayout { + columns: 2 + rowSpacing: ScreenTools.defaultFontPixelHeight * 0.5 + anchors.topMargin: ScreenTools.defaultFontPixelHeight * 0.5 + visible: statsHeader.checked + + QGCLabel { + text: qsTr("Phase Length: ") + wrapMode: Text.WordWrap + Layout.fillWidth: true + } + QGCLabel { + text: wimaController.phaseDistance >= 0 ? wimaController.phaseDistance.toFixed(2) + " m": "" + wrapMode: Text.WordWrap + Layout.fillWidth: true + } + + QGCLabel { + text: qsTr("Phase Duration: ") + wrapMode: Text.WordWrap + Layout.fillWidth: true + } + QGCLabel { + text: wimaController.phaseDuration >= 0 ? getTime(wimaController.phaseDuration) : "" + wrapMode: Text.WordWrap + Layout.fillWidth: true + } + QGCLabel { + text: "" + Layout.columnSpan: 2 + } } - } - } // mainColumn - } // item - } // Rectangle + } // settingsColumn + } // wrapperItem + } // QGCFlickable + } // Item } } diff --git a/src/QmlControls/SectionHeader.qml b/src/QmlControls/SectionHeader.qml index 06c9a2ca533ccb57c9f5a810bd242c016ab98931..c4ac2a25ee4fac5f1b0c499a8721fa848ee7f4e8 100644 --- a/src/QmlControls/SectionHeader.qml +++ b/src/QmlControls/SectionHeader.qml @@ -7,10 +7,9 @@ import QGroundControl.ScreenTools 1.0 import QGroundControl.Palette 1.0 FocusScope { - id: _root - anchors.left: parent.left - anchors.right: parent.right - height: column.height + id: _root + width: parent.width + height: column.height property alias text: label.text property bool checked: true