diff options
author | CryptAxe <cryptaxe@gmail.com> | 2017-08-19 22:04:56 -0700 |
---|---|---|
committer | João Barbosa <joao.paulo.barbosa@gmail.com> | 2017-09-13 01:24:07 +0100 |
commit | d052e3847c84fc89f3a3ec6ddef15bbe836d755d (patch) | |
tree | 4afc8b1a28d19a2533d4f90e935f051797878bb7 /src/qt/sendcoinsentry.cpp | |
parent | 96ac26e56627f0c24213fcd3a1cce9fc95f1f661 (diff) |
[qt] Add use available balance in send coins dialog
Diffstat (limited to 'src/qt/sendcoinsentry.cpp')
-rw-r--r-- | src/qt/sendcoinsentry.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/qt/sendcoinsentry.cpp b/src/qt/sendcoinsentry.cpp index bb0f47b21c..8cf8db8030 100644 --- a/src/qt/sendcoinsentry.cpp +++ b/src/qt/sendcoinsentry.cpp @@ -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(); |