Changeset View
Changeset View
Standalone View
Standalone View
src/qt/transactionview.cpp
Show First 20 Lines • Show All 108 Lines • ▼ Show 20 Lines | TransactionView::TransactionView(const PlatformStyle *platformStyle, | ||||
amountWidget = new QLineEdit(this); | amountWidget = new QLineEdit(this); | ||||
amountWidget->setPlaceholderText(tr("Min amount")); | amountWidget->setPlaceholderText(tr("Min amount")); | ||||
if (platformStyle->getUseExtraSpacing()) { | if (platformStyle->getUseExtraSpacing()) { | ||||
amountWidget->setFixedWidth(97); | amountWidget->setFixedWidth(97); | ||||
} else { | } else { | ||||
amountWidget->setFixedWidth(100); | amountWidget->setFixedWidth(100); | ||||
} | } | ||||
amountWidget->setValidator(new QDoubleValidator(0, 1e20, 8, this)); | QDoubleValidator *amountValidator = new QDoubleValidator(0, 1e20, 8, this); | ||||
QLocale amountLocale(QLocale::C); | |||||
amountLocale.setNumberOptions(QLocale::RejectGroupSeparator); | |||||
amountValidator->setLocale(amountLocale); | |||||
amountWidget->setValidator(amountValidator); | |||||
hlayout->addWidget(amountWidget); | hlayout->addWidget(amountWidget); | ||||
// Delay before filtering transactions in ms | // Delay before filtering transactions in ms | ||||
static const int input_filter_delay = 200; | static const int input_filter_delay = 200; | ||||
QTimer *amount_typing_delay = new QTimer(this); | QTimer *amount_typing_delay = new QTimer(this); | ||||
amount_typing_delay->setSingleShot(true); | amount_typing_delay->setSingleShot(true); | ||||
amount_typing_delay->setInterval(input_filter_delay); | amount_typing_delay->setInterval(input_filter_delay); | ||||
▲ Show 20 Lines • Show All 582 Lines • Show Last 20 Lines |