aboutsummaryrefslogtreecommitdiff
path: root/src/qt/sendcoinsdialog.cpp
diff options
context:
space:
mode:
authorGavin Andresen <gavinandresen@gmail.com>2011-09-29 10:50:40 -0700
committerGavin Andresen <gavinandresen@gmail.com>2011-09-29 10:50:40 -0700
commit9a7e5ed3b000a9788f3e3e2a145c4504473d812e (patch)
treea555362fbbf25d6f26f5ee9f048555bb0864d2f2 /src/qt/sendcoinsdialog.cpp
parent7dd4001b40b65b66ba5d47e628f10253ccb5d99c (diff)
parent20091df725e56376f6df0f71d19c63a34a5bf71d (diff)
Merge pull request #539 from laanwj/qt2
Qt GUI updates
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));
+}