Commit 8a4426ac authored by Don Gagne's avatar Don Gagne

New FactBitmask control

parent 50f2056b
......@@ -76,6 +76,7 @@
<file alias="QGroundControl/Controls/VehicleSummaryRow.qml">src/QmlControls/VehicleSummaryRow.qml</file>
<file alias="QGroundControl/Controls/ViewWidget.qml">src/ViewWidgets/ViewWidget.qml</file>
<file alias="QGroundControl/Controls/FactSliderPanel.qml">src/QmlControls/FactSliderPanel.qml</file>
<file alias="QGroundControl/FactControls/FactBitmask.qml">src/FactSystem/FactControls/FactBitmask.qml</file>
<file alias="QGroundControl/FactControls/FactCheckBox.qml">src/FactSystem/FactControls/FactCheckBox.qml</file>
<file alias="QGroundControl/FactControls/FactComboBox.qml">src/FactSystem/FactControls/FactComboBox.qml</file>
<file alias="QGroundControl/FactControls/FactLabel.qml">src/FactSystem/FactControls/FactLabel.qml</file>
......
import QtQuick 2.5
import QtQuick.Controls 1.2
import QGroundControl.FactSystem 1.0
import QGroundControl.Palette 1.0
import QGroundControl.Controls 1.0
import QGroundControl.ScreenTools 1.0
Row {
spacing: ScreenTools.defaultFontPixelWidth
property Fact fact: Fact { }
Repeater {
model: fact.bitmaskStrings
QGCCheckBox {
text: modelData
checked: fact.value & fact.bitmaskValues[index]
onClicked: {
if (checked) {
fact.value |= fact.bitmaskValues[index]
} else {
fact.value &= ~fact.bitmaskValues[index]
}
}
}
}
}
......@@ -18,7 +18,7 @@ QGCComboBox {
if (indexModel) {
fact.value = index
} else {
fact.enumIndex = index
fact.value = fact.enumValues[index]
}
}
}
Module QGroundControl.FactControls
FactPanel 1.0 FactPanel.qml
FactLabel 1.0 FactLabel.qml
FactTextField 1.0 FactTextField.qml
FactCheckBox 1.0 FactCheckBox.qml
FactComboBox 1.0 FactComboBox.qml
\ No newline at end of file
FactBitmask 1.0 FactBitmask.qml
FactCheckBox 1.0 FactCheckBox.qml
FactComboBox 1.0 FactComboBox.qml
FactLabel 1.0 FactLabel.qml
FactPanel 1.0 FactPanel.qml
FactTextField 1.0 FactTextField.qml
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