Changeset View
Changeset View
Standalone View
Standalone View
src/qt/walletmodel.h
Show First 20 Lines • Show All 142 Lines • ▼ Show 20 Lines | public: | ||||
void loadReceiveRequests(std::vector<std::string> &vReceiveRequests); | void loadReceiveRequests(std::vector<std::string> &vReceiveRequests); | ||||
bool saveReceiveRequest(const std::string &sAddress, const int64_t nId, | bool saveReceiveRequest(const std::string &sAddress, const int64_t nId, | ||||
const std::string &sRequest); | const std::string &sRequest); | ||||
static bool isWalletEnabled(); | static bool isWalletEnabled(); | ||||
interfaces::Node &node() const { return m_node; } | interfaces::Node &node() const { return m_node; } | ||||
interfaces::Wallet &wallet() const { return *m_wallet; } | interfaces::Wallet &wallet() const { return *m_wallet; } | ||||
ClientModel &clientModel() const { return m_client_model; } | void setClientModel(ClientModel *client_model); | ||||
int getNumBlocks() const { return cachedNumBlocks; } | |||||
const CChainParams &getChainParams() const; | const CChainParams &getChainParams() const; | ||||
QString getWalletName() const; | QString getWalletName() const; | ||||
QString getDisplayName() const; | QString getDisplayName() const; | ||||
bool isMultiwallet(); | bool isMultiwallet(); | ||||
AddressTableModel *getAddressTableModel() const { | AddressTableModel *getAddressTableModel() const { | ||||
return addressTableModel; | return addressTableModel; | ||||
} | } | ||||
private: | private: | ||||
std::unique_ptr<interfaces::Wallet> m_wallet; | std::unique_ptr<interfaces::Wallet> m_wallet; | ||||
std::unique_ptr<interfaces::Handler> m_handler_unload; | std::unique_ptr<interfaces::Handler> m_handler_unload; | ||||
std::unique_ptr<interfaces::Handler> m_handler_status_changed; | std::unique_ptr<interfaces::Handler> m_handler_status_changed; | ||||
std::unique_ptr<interfaces::Handler> m_handler_address_book_changed; | std::unique_ptr<interfaces::Handler> m_handler_address_book_changed; | ||||
std::unique_ptr<interfaces::Handler> m_handler_transaction_changed; | std::unique_ptr<interfaces::Handler> m_handler_transaction_changed; | ||||
std::unique_ptr<interfaces::Handler> m_handler_show_progress; | std::unique_ptr<interfaces::Handler> m_handler_show_progress; | ||||
std::unique_ptr<interfaces::Handler> m_handler_watch_only_changed; | std::unique_ptr<interfaces::Handler> m_handler_watch_only_changed; | ||||
std::unique_ptr<interfaces::Handler> m_handler_can_get_addrs_changed; | std::unique_ptr<interfaces::Handler> m_handler_can_get_addrs_changed; | ||||
ClientModel &m_client_model; | ClientModel *m_client_model; | ||||
interfaces::Node &m_node; | interfaces::Node &m_node; | ||||
bool fHaveWatchOnly; | bool fHaveWatchOnly; | ||||
bool fForceCheckBalanceChanged{false}; | bool fForceCheckBalanceChanged{false}; | ||||
// Wallet has an options model for wallet-specific options (transaction fee, | // Wallet has an options model for wallet-specific options (transaction fee, | ||||
// for example) | // for example) | ||||
OptionsModel *optionsModel; | OptionsModel *optionsModel; | ||||
AddressTableModel *addressTableModel; | AddressTableModel *addressTableModel; | ||||
TransactionTableModel *transactionTableModel; | TransactionTableModel *transactionTableModel; | ||||
RecentRequestsTableModel *recentRequestsTableModel; | RecentRequestsTableModel *recentRequestsTableModel; | ||||
// Cache some values to be able to detect changes | // Cache some values to be able to detect changes | ||||
interfaces::WalletBalances m_cached_balances; | interfaces::WalletBalances m_cached_balances; | ||||
EncryptionStatus cachedEncryptionStatus; | EncryptionStatus cachedEncryptionStatus; | ||||
int cachedNumBlocks; | int cachedNumBlocks; | ||||
QTimer *timer; | |||||
void subscribeToCoreSignals(); | void subscribeToCoreSignals(); | ||||
void unsubscribeFromCoreSignals(); | void unsubscribeFromCoreSignals(); | ||||
void checkBalanceChanged(const interfaces::WalletBalances &new_balances); | void checkBalanceChanged(const interfaces::WalletBalances &new_balances); | ||||
Q_SIGNALS: | Q_SIGNALS: | ||||
// Signal that balance in wallet changed | // Signal that balance in wallet changed | ||||
void balanceChanged(const interfaces::WalletBalances &balances); | void balanceChanged(const interfaces::WalletBalances &balances); | ||||
▲ Show 20 Lines • Show All 50 Lines • Show Last 20 Lines |