From cb85aeb06cfcac0812c56f24ebf429cf0904658b Mon Sep 17 00:00:00 2001 From: "Wladimir J. van der Laan" Date: Fri, 7 Jun 2013 11:08:03 +0200 Subject: [PATCH] qt: Add total balance in overview page --- src/qt/forms/overviewpage.ui | 42 +++++++++++++++++++++++++++++++++--- src/qt/overviewpage.cpp | 1 + 2 files changed, 40 insertions(+), 3 deletions(-) diff --git a/src/qt/forms/overviewpage.ui b/src/qt/forms/overviewpage.ui index 57aa624cc2..a4cf641195 100644 --- a/src/qt/forms/overviewpage.ui +++ b/src/qt/forms/overviewpage.ui @@ -103,7 +103,7 @@ - Balance: + Confirmed: @@ -119,7 +119,7 @@ IBeamCursor - Your current balance + Your current spendable balance 0 BTC @@ -148,7 +148,7 @@ IBeamCursor - Total of transactions that have yet to be confirmed, and do not yet count toward the current balance + Total of transactions that have yet to be confirmed, and do not yet count toward the spendable balance 0 BTC @@ -184,6 +184,42 @@ + + + + Total: + + + + + + + + 75 + true + + + + IBeamCursor + + + Your current total balance + + + 0 BTC + + + Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse + + + + + + + Qt::Horizontal + + + diff --git a/src/qt/overviewpage.cpp b/src/qt/overviewpage.cpp index ad2d682b7b..ddd8891335 100644 --- a/src/qt/overviewpage.cpp +++ b/src/qt/overviewpage.cpp @@ -140,6 +140,7 @@ void OverviewPage::setBalance(qint64 balance, qint64 unconfirmedBalance, qint64 ui->labelBalance->setText(BitcoinUnits::formatWithUnit(unit, balance)); ui->labelUnconfirmed->setText(BitcoinUnits::formatWithUnit(unit, unconfirmedBalance)); ui->labelImmature->setText(BitcoinUnits::formatWithUnit(unit, immatureBalance)); + ui->labelTotal->setText(BitcoinUnits::formatWithUnit(unit, balance + unconfirmedBalance + immatureBalance)); // only show immature (newly mined) balance if it's non-zero, so as not to complicate things // for the non-mining users