aboutsummaryrefslogtreecommitdiff
path: root/src/qt/walletmodel.h
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2011-08-23 20:08:42 +0200
committerWladimir J. van der Laan <laanwj@gmail.com>2011-08-23 20:08:42 +0200
commitae8adeb90abb334b8e5712124e62461eca77c12f (patch)
treee35c4b1e07771c8c642bbffa65456ce309461d7e /src/qt/walletmodel.h
parentadce862c2795142a5f56933584abffdbe3599472 (diff)
downloadbitcoin-ae8adeb90abb334b8e5712124e62461eca77c12f.tar.xz
Wallet encryption part 1: show wallet encryption status
Diffstat (limited to 'src/qt/walletmodel.h')
-rw-r--r--src/qt/walletmodel.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/qt/walletmodel.h b/src/qt/walletmodel.h
index bb1c6e85d3..a585f8d8d6 100644
--- a/src/qt/walletmodel.h
+++ b/src/qt/walletmodel.h
@@ -36,6 +36,13 @@ public:
MiscError
};
+ enum EncryptionStatus
+ {
+ Unencrypted, // !wallet->IsCrypted()
+ Locked, // wallet->IsCrypted() && wallet->IsLocked()
+ Unlocked // wallet->IsCrypted() && !wallet->IsLocked()
+ };
+
OptionsModel *getOptionsModel();
AddressTableModel *getAddressTableModel();
TransactionTableModel *getTransactionTableModel();
@@ -43,6 +50,9 @@ public:
qint64 getBalance() const;
qint64 getUnconfirmedBalance() const;
int getNumTransactions() const;
+ EncryptionStatus getEncryptionStatus() const;
+
+ bool isEncrypted() const;
// Check address for validity
bool validateAddress(const QString &address);
@@ -74,10 +84,12 @@ private:
qint64 cachedBalance;
qint64 cachedUnconfirmedBalance;
qint64 cachedNumTransactions;
+ EncryptionStatus cachedEncryptionStatus;
signals:
void balanceChanged(qint64 balance, qint64 unconfirmedBalance);
void numTransactionsChanged(int count);
+ void encryptionStatusChanged(int status);
// Asynchronous error notification
void error(const QString &title, const QString &message);