Changeset View
Changeset View
Standalone View
Standalone View
src/qt/guiutil.cpp
Show First 20 Lines • Show All 129 Lines • ▼ Show 20 Lines | static std::string DummyAddress(const CChainParams ¶ms) { | ||||
} | } | ||||
return ""; | return ""; | ||||
} | } | ||||
void setupAddressWidget(QValidatedLineEdit *widget, QWidget *parent) { | void setupAddressWidget(QValidatedLineEdit *widget, QWidget *parent) { | ||||
parent->setFocusProxy(widget); | parent->setFocusProxy(widget); | ||||
widget->setFont(fixedPitchFont()); | widget->setFont(fixedPitchFont()); | ||||
const CChainParams ¶ms = Params(); | |||||
#if QT_VERSION >= 0x040700 | #if QT_VERSION >= 0x040700 | ||||
// We don't want translators to use own addresses in translations | // We don't want translators to use own addresses in translations | ||||
// and this is the only place, where this address is supplied. | // and this is the only place, where this address is supplied. | ||||
widget->setPlaceholderText( | widget->setPlaceholderText( | ||||
QObject::tr("Enter a Bitcoin address (e.g. %1)") | QObject::tr("Enter a Bitcoin address (e.g. %1)") | ||||
.arg(QString::fromStdString(DummyAddress(Params())))); | .arg(QString::fromStdString(DummyAddress(params)))); | ||||
#endif | #endif | ||||
widget->setValidator(new BitcoinAddressEntryValidator(parent)); | widget->setValidator( | ||||
new BitcoinAddressEntryValidator(params.CashAddrHRP(), parent)); | |||||
widget->setCheckValidator(new BitcoinAddressCheckValidator(parent)); | widget->setCheckValidator(new BitcoinAddressCheckValidator(parent)); | ||||
} | } | ||||
void setupAmountWidget(QLineEdit *widget, QWidget *parent) { | void setupAmountWidget(QLineEdit *widget, QWidget *parent) { | ||||
QDoubleValidator *amountValidator = new QDoubleValidator(parent); | QDoubleValidator *amountValidator = new QDoubleValidator(parent); | ||||
amountValidator->setDecimals(8); | amountValidator->setDecimals(8); | ||||
amountValidator->setBottom(0.0); | amountValidator->setBottom(0.0); | ||||
widget->setValidator(amountValidator); | widget->setValidator(amountValidator); | ||||
▲ Show 20 Lines • Show All 837 Lines • Show Last 20 Lines |