diff --git a/qgroundcontrol.qrc b/qgroundcontrol.qrc index 2c13d66a944a9b221846c4689d4a3ff978dabecd..8dfabfe8be454972191af464a046dd39b9911bbd 100644 --- a/qgroundcontrol.qrc +++ b/qgroundcontrol.qrc @@ -88,8 +88,8 @@ src/QmlControls/ParameterEditorDialog.qml src/QmlControls/PIDTuning.qml src/PlanView/PlanToolBar.qml + src/QmlControls/PreFlightCheckButton.qml src/QmlControls/QGCButton.qml - src/QmlControls/QGCCheckListItem.qml src/QmlControls/QGCCheckBox.qml src/QmlControls/QGCColoredImage.qml src/QmlControls/QGCComboBox.qml @@ -152,6 +152,7 @@ src/FlightDisplay/GuidedActionsController.qml src/FlightDisplay/GuidedAltitudeSlider.qml src/FlightDisplay/MultiVehicleList.qml + src/FlightDisplay/PreFlightCheckList.qml src/FlightDisplay/qmldir src/FlightMap/MapItems/CameraTriggerIndicator.qml src/FlightMap/Widgets/CenterMapDropButton.qml @@ -195,7 +196,6 @@ src/FlightMap/Widgets/VibrationPageWidget.qml src/FlightMap/Widgets/VideoPageWidget.qml src/FlightDisplay/VirtualJoystick.qml - src/FlightDisplay/CheckList.qml src/MissionManager/CameraCalc.FactMetaData.json diff --git a/src/FlightDisplay/FlightDisplayView.qml b/src/FlightDisplay/FlightDisplayView.qml index 770636d361bfe4326c559cb9b8f81d230347ab53..dd1d0292eebdb56026d4d2f5b34200288c1ea929 100644 --- a/src/FlightDisplay/FlightDisplayView.qml +++ b/src/FlightDisplay/FlightDisplayView.qml @@ -113,8 +113,8 @@ QGCView { Component.onCompleted: start(true /* flyView */) } - CheckList { - id: checklist + PreFlightCheckList { + id: preFlightCheckList } Connections { @@ -729,7 +729,7 @@ QGCView { opacity : 0.2+0.8*(QGroundControl.multiVehicleManager.vehicles.count > 0) tooltip: "Reset the checklist (e.g. after a vehicle reboot)" - onClicked: checklist.resetNrClicks() + onClicked: preFlightCheckList.resetNrClicks() Image { source:"/qmlimages/MapSyncBlack.svg" ; anchors.fill: parent } } @@ -739,7 +739,7 @@ QGCView { // All check list items Repeater { - model: checklist.checkListItems + model: preFlightCheckList.checkListItems } } // Column } //Rectangle diff --git a/src/FlightDisplay/CheckList.qml b/src/FlightDisplay/PreFlightCheckList.qml similarity index 96% rename from src/FlightDisplay/CheckList.qml rename to src/FlightDisplay/PreFlightCheckList.qml index daddfb6a97ad9d46773b8edd50f39b9c9e13444e..de04b34dd4f54f7b3d7d9e5141d937aa68bd35b3 100644 --- a/src/FlightDisplay/CheckList.qml +++ b/src/FlightDisplay/PreFlightCheckList.qml @@ -73,12 +73,12 @@ Item { id: _checkListItems // Standard check list items (group 0) - Available from the start - QGCCheckListItem { + PreFlightCheckButton { id: buttonHardware name: "Hardware" defaulttext: "Props mounted? Wings secured? Tail secured?" } - QGCCheckListItem { + PreFlightCheckButton { id: buttonBattery name: "Battery" pendingtext: "Healthy & charged > 40%. Battery connector firmly plugged?" @@ -98,7 +98,7 @@ Item { } } } - QGCCheckListItem { + PreFlightCheckButton { id: buttonSensors name: "Sensors" function updateItem() { @@ -129,7 +129,7 @@ Item { } } } - QGCCheckListItem { + PreFlightCheckButton { id: buttonRC name: "Radio Control" pendingtext: "Receiving signal. Perform range test & confirm." @@ -146,7 +146,7 @@ Item { } } } - QGCCheckListItem { + PreFlightCheckButton { id: buttonEstimator name: "Global position estimate" function updateItem() { @@ -164,25 +164,25 @@ Item { // Check list item group 1 - Require arming QGCLabel {text:qsTr("Please arm the vehicle here.") ; opacity: 0.2+0.8*(QGroundControl.multiVehicleManager.vehicles.count > 0) ; anchors.horizontalCenter:buttonHardware.horizontalCenter ; anchors.topMargin:40 ; anchors.bottomMargin:40;} - QGCCheckListItem { + PreFlightCheckButton { id: buttonActuators name: "Actuators" group: 1 defaulttext: "Move all control surfaces. Did they work properly?" } - QGCCheckListItem { + PreFlightCheckButton { id: buttonMotors name: "Motors" group: 1 defaulttext: "Propellers free? Then throttle up gently. Working properly?" } - QGCCheckListItem { + PreFlightCheckButton { id: buttonMission name: "Mission" group: 1 defaulttext: "Please confirm mission is valid (waypoints valid, no terrain collision)." } - QGCCheckListItem { + PreFlightCheckButton { id: buttonSoundOutput name: "Sound output" group: 1 @@ -204,21 +204,21 @@ Item { // Check list item group 2 - Final checks before launch QGCLabel {text:qsTr("Last preparations before launch") ; opacity : 0.2+0.8*(_checkState >= 2); anchors.horizontalCenter:buttonHardware.horizontalCenter} - QGCCheckListItem { + PreFlightCheckButton { id: buttonPayload name: "Payload" group: 2 defaulttext: "Configured and started?" pendingtext: "Payload lid closed?" } - QGCCheckListItem { + PreFlightCheckButton { id: buttonWeather name: "Wind & weather" group: 2 defaulttext: "OK for your platform?" pendingtext: "Launching into the wind?" } - QGCCheckListItem { + PreFlightCheckButton { id: buttonFlightAreaFree name: "Flight area" group: 2 diff --git a/src/FlightDisplay/qmldir b/src/FlightDisplay/qmldir index bc327b9e3b1b05e075a51ce819f15a63b70d5107..816bd8d08b09c374720b0066b4b7031769e1e8cd 100644 --- a/src/FlightDisplay/qmldir +++ b/src/FlightDisplay/qmldir @@ -9,5 +9,5 @@ GuidedActionsController 1.0 GuidedActionsController.qml GuidedActionList 1.0 GuidedActionList.qml GuidedAltitudeSlider 1.0 GuidedAltitudeSlider.qml MultiVehicleList 1.0 MultiVehicleList.qml -CheckList 1.0 CheckList.qml +PreFlightCheckList 1.0 PreFlightCheckList.qml diff --git a/src/QmlControls/QGCCheckListItem.qml b/src/QmlControls/PreFlightCheckButton.qml similarity index 97% rename from src/QmlControls/QGCCheckListItem.qml rename to src/QmlControls/PreFlightCheckButton.qml index 371e0b4d9e81e536b2e73ab713b7f9257f773d1f..e9c4e263fd0a7b6ea3848a5645c8aca2a0bd1d18 100644 --- a/src/QmlControls/QGCCheckListItem.qml +++ b/src/QmlControls/PreFlightCheckButton.qml @@ -34,8 +34,8 @@ QGCButton { property string _text: name + ": " + defaulttext property var _activeVehicle: QGroundControl.multiVehicleManager.activeVehicle - enabled: (!_activeVehicle || _activeVehicle.connectionLost) ? false : checklist._checkState >= group - opacity: (!_activeVehicle || _activeVehicle.connectionLost) ? 0.4 : 0.2 + (0.8 * (checklist._checkState >= group)) + enabled: (!_activeVehicle || _activeVehicle.connectionLost) ? false : preFlightCheckList._checkState >= group + opacity: (!_activeVehicle || _activeVehicle.connectionLost) ? 0.4 : 0.2 + (0.8 * (preFlightCheckList._checkState >= group)) width: 40 * ScreenTools.defaultFontPixelWidth style: ButtonStyle { diff --git a/src/QmlControls/QGroundControl.Controls.qmldir b/src/QmlControls/QGroundControl.Controls.qmldir index 9277f3f2471a9ab4bc9db0e046c55dc2894c9334..25a33440c24e4a590992beb1eb0d28277a5a990d 100644 --- a/src/QmlControls/QGroundControl.Controls.qmldir +++ b/src/QmlControls/QGroundControl.Controls.qmldir @@ -34,8 +34,8 @@ ParameterEditor 1.0 ParameterEditor.qml ParameterEditorDialog 1.0 ParameterEditorDialog.qml PIDTuning 1.0 PIDTuning.qml PlanToolBar 1.0 PlanToolBar.qml +PreFlightCheckButton 1.0 PreFlightCheckButton.qml QGCButton 1.0 QGCButton.qml -QGCCheckListItem 1.0 QGCCheckListItem.qml QGCCheckBox 1.0 QGCCheckBox.qml QGCColoredImage 1.0 QGCColoredImage.qml QGCComboBox 1.0 QGCComboBox.qml