Changeset View
Changeset View
Standalone View
Standalone View
src/qt/sendcoinsentry.cpp
Show All 40 Lines | ui->addAsLabel->setPlaceholderText( | ||||
tr("Enter a label for this address to add it to your address book")); | tr("Enter a label for this address to add it to your address book")); | ||||
// normal bitcoin address field | // normal bitcoin address field | ||||
GUIUtil::setupAddressWidget(ui->payTo, this); | GUIUtil::setupAddressWidget(ui->payTo, this); | ||||
// just a label for displaying bitcoin address(es) | // just a label for displaying bitcoin address(es) | ||||
ui->payTo_is->setFont(GUIUtil::fixedPitchFont()); | ui->payTo_is->setFont(GUIUtil::fixedPitchFont()); | ||||
// Connect signals | // Connect signals | ||||
connect(ui->payAmount, SIGNAL(valueChanged()), this, | connect(ui->payAmount, &BitcoinAmountField::valueChanged, this, | ||||
SIGNAL(payAmountChanged())); | &SendCoinsEntry::payAmountChanged); | ||||
connect(ui->checkboxSubtractFeeFromAmount, SIGNAL(toggled(bool)), this, | connect(ui->checkboxSubtractFeeFromAmount, &QCheckBox::toggled, this, | ||||
SIGNAL(subtractFeeFromAmountChanged())); | &SendCoinsEntry::subtractFeeFromAmountChanged); | ||||
connect(ui->deleteButton, SIGNAL(clicked()), this, SLOT(deleteClicked())); | connect(ui->deleteButton, &QPushButton::clicked, this, | ||||
connect(ui->deleteButton_is, SIGNAL(clicked()), this, | &SendCoinsEntry::deleteClicked); | ||||
SLOT(deleteClicked())); | connect(ui->deleteButton_is, &QPushButton::clicked, this, | ||||
connect(ui->deleteButton_s, SIGNAL(clicked()), this, SLOT(deleteClicked())); | &SendCoinsEntry::deleteClicked); | ||||
connect(ui->useAvailableBalanceButton, SIGNAL(clicked()), this, | connect(ui->deleteButton_s, &QPushButton::clicked, this, | ||||
SLOT(useAvailableBalanceClicked())); | &SendCoinsEntry::deleteClicked); | ||||
connect(ui->useAvailableBalanceButton, &QPushButton::clicked, this, | |||||
&SendCoinsEntry::useAvailableBalanceClicked); | |||||
// Set the model properly. | // Set the model properly. | ||||
setModel(model); | setModel(model); | ||||
} | } | ||||
SendCoinsEntry::~SendCoinsEntry() { | SendCoinsEntry::~SendCoinsEntry() { | ||||
delete ui; | delete ui; | ||||
} | } | ||||
Show All 28 Lines | if (_model) { | ||||
tr("A message that was attached to the %1 URI which will be stored " | tr("A message that was attached to the %1 URI which will be stored " | ||||
"with the transaction for your reference. Note: This message " | "with the transaction for your reference. Note: This message " | ||||
"will not be sent over the Bitcoin network.") | "will not be sent over the Bitcoin network.") | ||||
.arg(QString::fromStdString( | .arg(QString::fromStdString( | ||||
_model->getChainParams().CashAddrPrefix()))); | _model->getChainParams().CashAddrPrefix()))); | ||||
} | } | ||||
if (_model && _model->getOptionsModel()) { | if (_model && _model->getOptionsModel()) { | ||||
connect(_model->getOptionsModel(), SIGNAL(displayUnitChanged(int)), | connect(_model->getOptionsModel(), &OptionsModel::displayUnitChanged, | ||||
this, SLOT(updateDisplayUnit())); | this, &SendCoinsEntry::updateDisplayUnit); | ||||
} | } | ||||
clear(); | clear(); | ||||
} | } | ||||
void SendCoinsEntry::clear() { | void SendCoinsEntry::clear() { | ||||
// clear UI elements for normal payment | // clear UI elements for normal payment | ||||
ui->payTo->clear(); | ui->payTo->clear(); | ||||
▲ Show 20 Lines • Show All 187 Lines • Show Last 20 Lines |