aboutsummaryrefslogtreecommitdiff
path: root/src/qt/clientmodel.cpp
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2011-06-18 13:13:48 +0200
committerWladimir J. van der Laan <laanwj@gmail.com>2011-06-18 13:13:48 +0200
commit7df70c000a5f687953335a5ab397ab4c74a40dd4 (patch)
treedb0968764275db6a04b6ce26bdc2e007b5436374 /src/qt/clientmodel.cpp
parent0f3981bea94cea957f0de4b128f7feffbfc2d9c6 (diff)
Prevent notification balloon-spam on initial block download, const-correctness in client model
Diffstat (limited to 'src/qt/clientmodel.cpp')
-rw-r--r--src/qt/clientmodel.cpp15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/qt/clientmodel.cpp b/src/qt/clientmodel.cpp
index 10cafaf1af..822c03d949 100644
--- a/src/qt/clientmodel.cpp
+++ b/src/qt/clientmodel.cpp
@@ -22,12 +22,12 @@ ClientModel::ClientModel(QObject *parent) :
transactionTableModel = new TransactionTableModel(this);
}
-qint64 ClientModel::getBalance()
+qint64 ClientModel::getBalance() const
{
return GetBalance();
}
-QString ClientModel::getAddress()
+QString ClientModel::getAddress() const
{
std::vector<unsigned char> vchPubKey;
if (CWalletDB("r").ReadDefaultKey(vchPubKey))
@@ -40,17 +40,17 @@ QString ClientModel::getAddress()
}
}
-int ClientModel::getNumConnections()
+int ClientModel::getNumConnections() const
{
return vNodes.size();
}
-int ClientModel::getNumBlocks()
+int ClientModel::getNumBlocks() const
{
return nBestHeight;
}
-int ClientModel::getNumTransactions()
+int ClientModel::getNumTransactions() const
{
int numTransactions = 0;
CRITICAL_BLOCK(cs_mapWallet)
@@ -138,6 +138,11 @@ ClientModel::StatusCode ClientModel::sendCoins(const QString &payTo, qint64 payA
return OK;
}
+bool ClientModel::inInitialBlockDownload() const
+{
+ return IsInitialBlockDownload();
+}
+
OptionsModel *ClientModel::getOptionsModel()
{
return optionsModel;