QML UI: only allow valid gas mixes

The input is restricted to

EAN100
EANxx  (with 'x' one of 0..9)
AIR
xx/xx  (with 'x' one of 0..9)
xxx    (with 'x' one of 0..9 and the number <= 100)

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2016-02-20 21:55:59 -08:00
parent e22a452cf5
commit 8b39352d4e

View file

@ -180,6 +180,7 @@ Item {
id: txtGasMix
readOnly: (text == "cannot edit multiple gases" ? true : false)
Layout.fillWidth: true
validator: RegExpValidator { regExp: /(EAN100|EAN\d\d|AIR|100|\d{1,2}|\d{1,2}\/\d{1,2})/ }
}
MobileComponents.Label {