aboutsummaryrefslogtreecommitdiff
path: root/src/qt/sendcoinsdialog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/qt/sendcoinsdialog.cpp')
-rw-r--r--src/qt/sendcoinsdialog.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/qt/sendcoinsdialog.cpp b/src/qt/sendcoinsdialog.cpp
index 852d789805..58eb5c21f7 100644
--- a/src/qt/sendcoinsdialog.cpp
+++ b/src/qt/sendcoinsdialog.cpp
@@ -22,6 +22,7 @@ SendCoinsDialog::SendCoinsDialog(QWidget *parent) :
addEntry();
connect(ui->addButton, SIGNAL(clicked()), this, SLOT(addEntry()));
+ connect(ui->clearButton, SIGNAL(clicked()), this, SLOT(clear()));
}
void SendCoinsDialog::setModel(WalletModel *model)
@@ -36,6 +37,9 @@ void SendCoinsDialog::setModel(WalletModel *model)
entry->setModel(model);
}
}
+
+ setBalance(model->getBalance(), model->getUnconfirmedBalance());
+ connect(model, SIGNAL(balanceChanged(qint64, qint64)), this, SLOT(setBalance(qint64, qint64)));
}
SendCoinsDialog::~SendCoinsDialog()
@@ -241,3 +245,10 @@ void SendCoinsDialog::handleURL(const QUrl *url)
}
pasteEntry(rv);
}
+
+void SendCoinsDialog::setBalance(qint64 balance, qint64 unconfirmedBalance)
+{
+ Q_UNUSED(unconfirmedBalance);
+ int unit = model->getOptionsModel()->getDisplayUnit();
+ ui->labelBalance->setText(BitcoinUnits::formatWithUnit(unit, balance));
+}