Commit e6d3d5a0 authored by Harald Sitter's avatar Harald Sitter 💎

make the type selector a combobox with supported choices

avoids typos and whatnot
parent 2223bf5d
......@@ -152,12 +152,21 @@ Rectangle {
ColumnLayout {
RowLayout {
Label { text: "type" }
TextField { id:typeField; text: rect.type }
ComboBox {
id: typeBox
Layout.fillWidth: true
// Fixed types.
// match: pixel matching
// ocr: run through optical character recogniation
// exclude: exclude from reference. not sure how this works
model: [ 'match', 'ocr', 'exclude' ]
}
}
RowLayout {
Label { text: "match" }
TextField {
id:matchField
id: matchField
Layout.fillWidth: true
text: rect.match
validator: IntValidator{ bottom: 0; top: 100; }
}
......@@ -165,7 +174,7 @@ Rectangle {
}
onAccepted: {
rect.type = typeField.text
rect.type = typeBox.currentText
rect.match = parseFloat(matchField.text)
}
}
......
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