From 63c76487e792e735a7122a567e3bb688862d1022 Mon Sep 17 00:00:00 2001 From: DonLakeFlyer Date: Thu, 24 May 2018 09:20:58 -0700 Subject: [PATCH] Control renaming * QGCCheckListItem -> PreFlightCheckButton * CheckList -> PreFlightCheckList --- qgroundcontrol.qrc | 4 ++-- src/FlightDisplay/FlightDisplayView.qml | 8 +++---- .../{CheckList.qml => PreFlightCheckList.qml} | 24 +++++++++---------- src/FlightDisplay/qmldir | 2 +- ...kListItem.qml => PreFlightCheckButton.qml} | 4 ++-- .../QGroundControl.Controls.qmldir | 2 +- 6 files changed, 22 insertions(+), 22 deletions(-) rename src/FlightDisplay/{CheckList.qml => PreFlightCheckList.qml} (96%) rename src/QmlControls/{QGCCheckListItem.qml => PreFlightCheckButton.qml} (97%) diff --git a/qgroundcontrol.qrc b/qgroundcontrol.qrc index 2c13d66a9..8dfabfe8b 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 770636d36..dd1d0292e 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 daddfb6a9..de04b34dd 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 bc327b9e3..816bd8d08 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 371e0b4d9..e9c4e263f 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 9277f3f24..25a33440c 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 -- 2.22.0