4import QGroundControl.Controls
6/// Toggle slider bound to a single bit within a Fact's bitmask rawValue.
7/// The slider stays in sync with the Fact and sets/clears the specified bit on click.
10/// FactBitMaskCheckBoxSlider {
11/// text: qsTr("Continue in Auto mode")
13/// bitMask: 2 // bit 1
18 property Fact fact: Fact { }
19 property int bitMask: 0
21 checked: fact && (fact.rawValue & bitMask)
25 function onRawValueChanged() { control.checked = fact.rawValue & control.bitMask }
30 fact.rawValue |= bitMask
32 fact.rawValue &= ~bitMask