commit 068609b4a65a172a15a24299b8a0fad0ef82898c
parent a195ca5c07f5c04314537b29cd77e8d14c5c0f9c
Author: ThomasV <thomasv@gitorious>
Date: Wed, 16 Jul 2014 15:33:59 +0200
AmountEdit:get_amount
Diffstat:
1 file changed, 6 insertions(+), 0 deletions(-)
diff --git a/gui/qt/amountedit.py b/gui/qt/amountedit.py
@@ -53,6 +53,12 @@ class AmountEdit(MyLineEdit):
painter.setPen(self.help_palette.brush(QPalette.Disabled, QPalette.Text).color())
painter.drawText(textRect, Qt.AlignRight | Qt.AlignVCenter, self.base_unit())
+ def get_amount(self):
+ try:
+ x = int(str(self.text()))
+ except:
+ return None
+ return x
class BTCAmountEdit(AmountEdit):