From ee909153004e1b3888e996a9d50600d84b033976 Mon Sep 17 00:00:00 2001 From: Petr Baudis Date: Tue, 16 Oct 2012 22:06:45 +0200 Subject: [PATCH] brmbarv3 Withdraw: Allow keyboard text entry --- brmbar3/brmbar-gui-qt4/Withdraw.qml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/brmbar3/brmbar-gui-qt4/Withdraw.qml b/brmbar3/brmbar-gui-qt4/Withdraw.qml index e202d31..2baa6f2 100644 --- a/brmbar3/brmbar-gui-qt4/Withdraw.qml +++ b/brmbar3/brmbar-gui-qt4/Withdraw.qml @@ -8,7 +8,7 @@ Item { property variant username: "" property variant userdbid: "" - property variant amount: "" + property variant amount: withdraw_pad.enteredText Text { id: item_name @@ -49,12 +49,14 @@ Item { x: 65 y: 195 visible: parent.username != "" - onLetterEntered: { amount = amount.toString() + letter; } - onLetterBackspace: { amount = amount.toString().replace(/.$/, ''); } + focus: parent.username != "" + Keys.onReturnPressed: { withdraw_button.buttonClick() } + Keys.onEscapePressed: { cancel.buttonClick() } } BarcodeInput { color: "#00ff00" /* just for debugging */ + focus: parent.username == "" onAccepted: { var acct = shop.barcodeInput(text) text = ""