地面站终端 App
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
0 B

10 years ago
import QtQuick 2.2
import QtQuick.Controls 1.2
import QtQuick.Controls.Styles 1.2
import QGroundControl.FactSystem 1.0
CheckBox {
property Fact fact: Fact { value: 0 }
property variant checkedValue: 1
property variant uncheckedValue: 0
partiallyCheckedEnabled: fact.value != checkedValue && fact.value != uncheckedValue
checkedState: fact.value == checkedValue ? Qt.Checked : (fact.value == uncheckedValue ? Qt.Unchecked : Qt.PartiallyChecked)
text: "Label"
onClicked: {
fact.value = checked ? checkedValue : uncheckedValue
}
style: CheckBoxStyle {
label: Text {
color: palette.windowText
text: control.text
}
}
}