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 { ...@@ -152,12 +152,21 @@ Rectangle {
ColumnLayout { ColumnLayout {
RowLayout { RowLayout {
Label { text: "type" } 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 { RowLayout {
Label { text: "match" } Label { text: "match" }
TextField { TextField {
id:matchField id: matchField
Layout.fillWidth: true
text: rect.match text: rect.match
validator: IntValidator{ bottom: 0; top: 100; } validator: IntValidator{ bottom: 0; top: 100; }
} }
...@@ -165,7 +174,7 @@ Rectangle { ...@@ -165,7 +174,7 @@ Rectangle {
} }
onAccepted: { onAccepted: {
rect.type = typeField.text rect.type = typeBox.currentText
rect.match = parseFloat(matchField.text) 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