Commit d7aa3a1f authored by Don Gagne's avatar Don Gagne

Add FactLabel and FactTextField qml controls

parent 6b1383fe
......@@ -237,12 +237,20 @@
</qresource>
<qresource prefix="/qml">
<file alias="test.qml">src/test.qml</file>
<file alias="QGroundControl/FactControls/qmldir">qml/QGroundControl/FactControls/qmldir</file>
<file alias="QGroundControl/FactControls/SetupButton.qml">qml/QGroundControl/FactControls/SetupButton.qml</file>
<file alias="QGroundControl/FactControls/FactLabel.qml">qml/QGroundControl/FactControls/FactLabel.qml</file>
<file alias="QGroundControl/FactControls/FactTextField.qml">qml/QGroundControl/FactControls/FactTextField.qml</file>
<file alias="octo_x.png">files/images/px4/airframes/octo_x.png</file>
<file alias="px4fmu_2.x.png">files/images/px4/boards/px4fmu_2.x.png</file>
<file alias="SetupViewConnected.qml">src/VehicleSetup/SetupViewConnected.qml</file>
<file alias="SetupViewDisconnected.qml">src/VehicleSetup/SetupViewDisconnected.qml</file>
<file alias="SafetyComponent.qml">src/AutoPilotPlugins/PX4/SafetyComponent.qml</file>
</qresource>
<qresource prefix="/AutoPilotPlugins/PX4">
......
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
}
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
}
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
......@@ -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"] }
}
}
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