brmbarv3 Withdraw: Allow keyboard text entry

This commit is contained in:
Petr Baudis 2012-10-16 22:06:45 +02:00
parent a5ffdf27e8
commit ee90915300

View file

@ -8,7 +8,7 @@ Item {
property variant username: "" property variant username: ""
property variant userdbid: "" property variant userdbid: ""
property variant amount: "" property variant amount: withdraw_pad.enteredText
Text { Text {
id: item_name id: item_name
@ -49,12 +49,14 @@ Item {
x: 65 x: 65
y: 195 y: 195
visible: parent.username != "" visible: parent.username != ""
onLetterEntered: { amount = amount.toString() + letter; } focus: parent.username != ""
onLetterBackspace: { amount = amount.toString().replace(/.$/, ''); } Keys.onReturnPressed: { withdraw_button.buttonClick() }
Keys.onEscapePressed: { cancel.buttonClick() }
} }
BarcodeInput { BarcodeInput {
color: "#00ff00" /* just for debugging */ color: "#00ff00" /* just for debugging */
focus: parent.username == ""
onAccepted: { onAccepted: {
var acct = shop.barcodeInput(text) var acct = shop.barcodeInput(text)
text = "" text = ""