| 31 | |
| 32 | |
| 33 | WalletModel::WalletModel(std::unique_ptr<interfaces::Wallet> wallet, interfaces::Node& node, const PlatformStyle *platformStyle, OptionsModel *_optionsModel, QObject *parent) : |
| 34 | QObject(parent), m_wallet(std::move(wallet)), m_node(node), optionsModel(_optionsModel), addressTableModel(0), |
| 35 | transactionTableModel(0), |
| 36 | recentRequestsTableModel(0), |
| 37 | cachedEncryptionStatus(Unencrypted), |
| 38 | cachedNumBlocks(0) |
| 39 | { |
| 40 | fHaveWatchOnly = m_wallet->haveWatchOnly(); |
| 41 | fForceCheckBalanceChanged = false; |
| 42 | |
| 43 | addressTableModel = new AddressTableModel(this); |
| 44 | transactionTableModel = new TransactionTableModel(platformStyle, this); |
| 45 | recentRequestsTableModel = new RecentRequestsTableModel(this); |
| 46 | |
| 47 | // This timer will be fired repeatedly to update the balance |
| 48 | pollTimer = new QTimer(this); |
| 49 | connect(pollTimer, SIGNAL(timeout()), this, SLOT(pollBalanceChanged())); |
| 50 | pollTimer->start(MODEL_UPDATE_DELAY); |
| 51 | |
| 52 | subscribeToCoreSignals(); |
| 53 | } |
| 54 | |
| 55 | WalletModel::~WalletModel() |
| 56 | { |
nothing calls this directly
no test coverage detected