aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIlya Kitaev <mbg033@gmail.com>2016-11-06 18:03:32 +0300
committerIlya Kitaev <mbg033@gmail.com>2016-11-10 23:08:12 +0300
commitead7ac8686841ef43e2524d04a664e375cae3300 (patch)
treed2885c9cb1b0382d8dfa591babf1d13ab62b7102
parent68736ab834533db50cb5eaebf9a751ad0f2fa5a6 (diff)
downloadmonzero-gui-ead7ac8686841ef43e2524d04a664e375cae3300.tar.gz
monzero-gui-ead7ac8686841ef43e2524d04a664e375cae3300.tar.xz
monzero-gui-ead7ac8686841ef43e2524d04a664e375cae3300.zip
Historty: DoubleValidator applied to "amount filter" fields
-rw-r--r--pages/History.qml21
1 files changed, 20 insertions, 1 deletions
diff --git a/pages/History.qml b/pages/History.qml
index a6c216bf..8821bb12 100644
--- a/pages/History.qml
+++ b/pages/History.qml
@@ -229,10 +229,12 @@ Rectangle {
model.paymentIdFilter = paymentIdLine.text
model.dateFromFilter = fromDatePicker.currentDate
model.dateToFilter = toDatePicker.currentDate
+
if (advancedFilteringCheckBox.checked) {
if (amountFromLine.text.length) {
model.amountFromFilter = parseFloat(amountFromLine.text)
}
+
if (amountToLine.text.length) {
model.amountToFilter = parseFloat(amountToLine.text)
}
@@ -243,7 +245,6 @@ Rectangle {
}
selectedAmount.text = getSelectedAmount()
-
}
}
@@ -315,6 +316,15 @@ Rectangle {
anchors.leftMargin: 17
anchors.topMargin: 5
width: 156
+ validator: DoubleValidator {
+ locale: "C"
+ notation: DoubleValidator.StandardNotation
+ bottom: 0.0
+ top: {
+ console.log("top");
+ parseFloat(amountToLine.text)
+ }
+ }
}
Label {
@@ -336,6 +346,15 @@ Rectangle {
anchors.leftMargin: 17
anchors.topMargin: 5
width: 156
+ validator: DoubleValidator {
+ locale: "C"
+ notation: DoubleValidator.StandardNotation
+ bottom: {
+ console.log("Botton")
+ parseFloat(amountFromLine.text)
+ }
+ }
+
}
Item {