diff --git a/qgroundcontrol.qrc b/qgroundcontrol.qrc index 407433977b57a564f217e163546cd5ebf71dc53a..6b317dc3b9ec2923dc8796babc486d2fe0149cfc 100644 --- a/qgroundcontrol.qrc +++ b/qgroundcontrol.qrc @@ -237,12 +237,20 @@ src/test.qml + qml/QGroundControl/FactControls/qmldir + + qml/QGroundControl/FactControls/SetupButton.qml + qml/QGroundControl/FactControls/FactLabel.qml + qml/QGroundControl/FactControls/FactTextField.qml + files/images/px4/airframes/octo_x.png files/images/px4/boards/px4fmu_2.x.png + src/VehicleSetup/SetupViewConnected.qml src/VehicleSetup/SetupViewDisconnected.qml + src/AutoPilotPlugins/PX4/SafetyComponent.qml diff --git a/qml/QGroundControl/FactControls/FactLabel.qml b/qml/QGroundControl/FactControls/FactLabel.qml new file mode 100644 index 0000000000000000000000000000000000000000..a98f050b6fe322ed63c9b4ce95f50b9d8142d114 --- /dev/null +++ b/qml/QGroundControl/FactControls/FactLabel.qml @@ -0,0 +1,13 @@ +import QtQuick 2.2 +import QtQuick.Controls 1.2 +import QtQuick.Controls.Styles 1.2 +import QGroundControl.FactSystem 1.0 + +Label { + property Fact fact: Fact { value: "FactLabel" } + QGCPalette { id: palette; colorGroup: QGCPalette.Active } + + color: palette.windowText + + text: fact.value +} diff --git a/qml/QGroundControl/FactControls/FactTextField.qml b/qml/QGroundControl/FactControls/FactTextField.qml new file mode 100644 index 0000000000000000000000000000000000000000..b42ac3cc5823e9df3b6a2ed28799d85a9ef174b2 --- /dev/null +++ b/qml/QGroundControl/FactControls/FactTextField.qml @@ -0,0 +1,14 @@ +import QtQuick 2.2 +import QtQuick.Controls 1.2 +import QtQuick.Controls.Styles 1.2 +import QGroundControl.FactSystem 1.0 + +TextField { + property Fact fact: Fact { value: 0 } + + QGCPalette { id: palette; colorGroup: QGCPalette.Active } + + text: fact.value + + onAccepted: fact.value = text +} diff --git a/qml/QGroundControl/FactControls/qmldir b/qml/QGroundControl/FactControls/qmldir index 5c68157e2fac6b076dd322fa917cecda1d8281f5..b0c9edb64d6d83460d3840133bfbfd264fb6e4d4 100644 --- a/qml/QGroundControl/FactControls/qmldir +++ b/qml/QGroundControl/FactControls/qmldir @@ -1,2 +1,3 @@ Module QGroundControl.FactControls -SetupButton 1.0 SetupButton.qml \ No newline at end of file +FactLabel 1.0 FactLabel.qml +FactTextField 1.0 FactTextField.qml \ No newline at end of file diff --git a/src/AutoPilotPlugins/PX4/SafetyComponent.qml b/src/AutoPilotPlugins/PX4/SafetyComponent.qml index 3ef0471745e8e844d74bc77e082bd45315da7a28..9e958ebdc90cd4f4378e7d0704eab6ef5ff51094 100644 --- a/src/AutoPilotPlugins/PX4/SafetyComponent.qml +++ b/src/AutoPilotPlugins/PX4/SafetyComponent.qml @@ -2,6 +2,7 @@ import QtQuick 2.2 import QtQuick.Controls 1.2 import QtQuick.Controls.Styles 1.2 import QGroundControl.FactSystem 1.0 +import QGroundControl.FactControls 1.0 Rectangle { QGCPalette { id: palette; colorGroup: QGCPalette.Active } @@ -12,6 +13,8 @@ Rectangle { Column { Label { text: "Work in Progress"; color: palette.windowText } - Label { text: autopilot.parameters["RTL_RETURN_ALT"].value; color: palette.windowText } + Label { text: "Return to Land Altitude"; color: palette.windowText } + FactLabel { fact: autopilot.parameters["RTL_RETURN_ALT"] } + FactTextField { fact: autopilot.parameters["RTL_RETURN_ALT"] } } }