mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 15:09:59 +01:00
[qt] Add use available balance in send coins dialog
This commit is contained in:
@@ -48,6 +48,7 @@ SendCoinsEntry::SendCoinsEntry(const PlatformStyle *_platformStyle, QWidget *par
|
||||
connect(ui->deleteButton, SIGNAL(clicked()), this, SLOT(deleteClicked()));
|
||||
connect(ui->deleteButton_is, SIGNAL(clicked()), this, SLOT(deleteClicked()));
|
||||
connect(ui->deleteButton_s, SIGNAL(clicked()), this, SLOT(deleteClicked()));
|
||||
connect(ui->useAvailableBalanceButton, SIGNAL(clicked()), this, SLOT(useAvailableBalanceClicked()));
|
||||
}
|
||||
|
||||
SendCoinsEntry::~SendCoinsEntry()
|
||||
@@ -112,11 +113,21 @@ void SendCoinsEntry::clear()
|
||||
updateDisplayUnit();
|
||||
}
|
||||
|
||||
void SendCoinsEntry::checkSubtractFeeFromAmount()
|
||||
{
|
||||
ui->checkboxSubtractFeeFromAmount->setChecked(true);
|
||||
}
|
||||
|
||||
void SendCoinsEntry::deleteClicked()
|
||||
{
|
||||
Q_EMIT removeEntry(this);
|
||||
}
|
||||
|
||||
void SendCoinsEntry::useAvailableBalanceClicked()
|
||||
{
|
||||
Q_EMIT useAvailableBalance(this);
|
||||
}
|
||||
|
||||
bool SendCoinsEntry::validate()
|
||||
{
|
||||
if (!model)
|
||||
@@ -228,6 +239,11 @@ void SendCoinsEntry::setAddress(const QString &address)
|
||||
ui->payAmount->setFocus();
|
||||
}
|
||||
|
||||
void SendCoinsEntry::setAmount(const CAmount &amount)
|
||||
{
|
||||
ui->payAmount->setValue(amount);
|
||||
}
|
||||
|
||||
bool SendCoinsEntry::isClear()
|
||||
{
|
||||
return ui->payTo->text().isEmpty() && ui->payTo_is->text().isEmpty() && ui->payTo_s->text().isEmpty();
|
||||
|
||||
Reference in New Issue
Block a user