5import QGroundControl.Controls
8 spacing: ScreenTools.defaultFontPixelWidth
10 /// true: Checking the first entry will clear and disable all other entries
11 property bool firstEntryIsAll: false
13 property Fact fact: Fact { }
15 Component.onCompleted: {
16 if (firstEntryIsAll && repeater.itemAt(0).checked) {
17 for (var i=1; i<repeater.count; i++) {
18 var otherCheckbox = repeater.itemAt(i)
19 otherCheckbox.enabled = false
26 model: fact ? fact.bitmaskStrings : []
31 checked: fact.value & fact.bitmaskValues[index]
37 if (firstEntryIsAll && index == 0) {
38 for (i = 1; i < repeater.count; i++) {
39 otherCheckbox = repeater.itemAt(i)
40 fact.value &= ~fact.bitmaskValues[i]
41 otherCheckbox.checked = false
42 otherCheckbox.enabled = false
45 fact.value |= fact.bitmaskValues[index]
47 if (firstEntryIsAll && index == 0) {
48 for (i = 1; i < repeater.count; i++) {
49 otherCheckbox = repeater.itemAt(i)
50 otherCheckbox.enabled = true
53 fact.value &= ~fact.bitmaskValues[index]