MCPcopy Create free account
hub / github.com/LUX-Core/lux / WalletModel

Method WalletModel

src/qt/walletmodel.cpp:41–66  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

39#include <boost/filesystem.hpp>
40
41WalletModel::WalletModel(const PlatformStyle *platformStyle, CWallet* wallet, OptionsModel* optionsModel, QObject* parent) : QObject(parent), wallet(wallet), optionsModel(optionsModel), addressTableModel(0),
42 contractTableModel(0),
43 transactionTableModel(0),
44 recentRequestsTableModel(0),
45 cachedBalance(0),
46 cachedUnconfirmedBalance(0),
47 cachedImmatureBalance(0),
48 cachedEncryptionStatus(Unencrypted),
49 cachedNumBlocks(0)
50{
51 fHaveWatchOnly = wallet->HaveWatchOnly();
52 fForceCheckBalanceChanged = false;
53 addressTableModel = new AddressTableModel(wallet, this);
54 contractTableModel = new ContractTableModel(wallet, this);
55 transactionTableModel = new TransactionTableModel(platformStyle, wallet, this);
56 recentRequestsTableModel = new RecentRequestsTableModel(wallet, this);
57 tokenItemModel = new TokenItemModel(wallet, this);
58 tokenTransactionTableModel = new TokenTransactionTableModel(platformStyle, wallet, this);
59
60 // This timer will be fired repeatedly to update the balance
61 pollTimer = new QTimer(this);
62 connect(pollTimer, SIGNAL(timeout()), this, SLOT(pollBalanceChanged()));
63 pollTimer->start(MODEL_UPDATE_DELAY * 4);
64
65 subscribeToCoreSignals();
66}
67
68WalletModel::~WalletModel()
69{

Callers

nothing calls this directly

Calls 2

HaveWatchOnlyMethod · 0.80
startMethod · 0.45

Tested by

no test coverage detected