Bitcoin Core 31.0.0
P2P Digital Currency
Loading...
Searching...
No Matches
WalletController Class Reference

Controller between interfaces::Node, WalletModel instances and the GUI. More...

#include <walletcontroller.h>

Inheritance diagram for WalletController:
[legend]
Collaboration diagram for WalletController:
[legend]

Signals

void walletAdded (WalletModel *wallet_model)
void walletRemoved (WalletModel *wallet_model)
void coinsSent (WalletModel *wallet_model, SendCoinsRecipient recipient, QByteArray transaction)

Public Member Functions

 WalletController (ClientModel &client_model, const PlatformStyle *platform_style, QObject *parent)
 ~WalletController ()
WalletModelgetOrCreateWallet (std::unique_ptr< interfaces::Wallet > wallet)
std::map< std::string, std::pair< bool, std::string > > listWalletDir () const
void closeWallet (WalletModel *wallet_model, QWidget *parent=nullptr)
void closeAllWallets (QWidget *parent=nullptr)

Private Member Functions

void removeAndDeleteWallet (WalletModel *wallet_model)
void removeWallet (WalletModel *wallet_model)
 Starts the wallet closure procedure.

Private Attributes

QThread *const m_activity_thread
QObject *const m_activity_worker
ClientModelm_client_model
interfaces::Nodem_node
const PlatformStyle *const m_platform_style
OptionsModel *const m_options_model
QMutex m_mutex
std::vector< WalletModel * > m_wallets
std::unique_ptr< interfaces::Handlerm_handler_load_wallet

Friends

class WalletControllerActivity
class MigrateWalletActivity

Detailed Description

Controller between interfaces::Node, WalletModel instances and the GUI.

Definition at line 50 of file walletcontroller.h.

Constructor & Destructor Documentation

◆ WalletController()

WalletController::WalletController ( ClientModel & client_model,
const PlatformStyle * platform_style,
QObject * parent )

Definition at line 39 of file walletcontroller.cpp.

Here is the call graph for this function:

◆ ~WalletController()

WalletController::~WalletController ( )

Definition at line 61 of file walletcontroller.cpp.

Member Function Documentation

◆ closeAllWallets()

void WalletController::closeAllWallets ( QWidget * parent = nullptr)

Definition at line 103 of file walletcontroller.cpp.

Here is the call graph for this function:

◆ closeWallet()

void WalletController::closeWallet ( WalletModel * wallet_model,
QWidget * parent = nullptr )

Definition at line 90 of file walletcontroller.cpp.

Here is the call graph for this function:

◆ coinsSent

void WalletController::coinsSent ( WalletModel * wallet_model,
SendCoinsRecipient recipient,
QByteArray transaction )
signal
Here is the caller graph for this function:

◆ getOrCreateWallet()

WalletModel * WalletController::getOrCreateWallet ( std::unique_ptr< interfaces::Wallet > wallet)

Definition at line 117 of file walletcontroller.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ listWalletDir()

std::map< std::string, std::pair< bool, std::string > > WalletController::listWalletDir ( ) const

Returns all wallet names in the wallet dir mapped to whether the wallet is loaded.

Definition at line 68 of file walletcontroller.cpp.

◆ removeAndDeleteWallet()

void WalletController::removeAndDeleteWallet ( WalletModel * wallet_model)
private

Definition at line 177 of file walletcontroller.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ removeWallet()

void WalletController::removeWallet ( WalletModel * wallet_model)
private

Starts the wallet closure procedure.

Definition at line 82 of file walletcontroller.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ walletAdded

void WalletController::walletAdded ( WalletModel * wallet_model)
signal
Here is the caller graph for this function:

◆ walletRemoved

void WalletController::walletRemoved ( WalletModel * wallet_model)
signal
Here is the caller graph for this function:

◆ MigrateWalletActivity

friend class MigrateWalletActivity
friend

Definition at line 87 of file walletcontroller.h.

◆ WalletControllerActivity

friend class WalletControllerActivity
friend

Definition at line 86 of file walletcontroller.h.

Member Data Documentation

◆ m_activity_thread

QThread* const WalletController::m_activity_thread
private

Definition at line 76 of file walletcontroller.h.

◆ m_activity_worker

QObject* const WalletController::m_activity_worker
private

Definition at line 77 of file walletcontroller.h.

◆ m_client_model

ClientModel& WalletController::m_client_model
private

Definition at line 78 of file walletcontroller.h.

◆ m_handler_load_wallet

std::unique_ptr<interfaces::Handler> WalletController::m_handler_load_wallet
private

Definition at line 84 of file walletcontroller.h.

◆ m_mutex

QMutex WalletController::m_mutex
mutableprivate

Definition at line 82 of file walletcontroller.h.

◆ m_node

interfaces::Node& WalletController::m_node
private

Definition at line 79 of file walletcontroller.h.

◆ m_options_model

OptionsModel* const WalletController::m_options_model
private

Definition at line 81 of file walletcontroller.h.

◆ m_platform_style

const PlatformStyle* const WalletController::m_platform_style
private

Definition at line 80 of file walletcontroller.h.

◆ m_wallets

std::vector<WalletModel*> WalletController::m_wallets
private

Definition at line 83 of file walletcontroller.h.


The documentation for this class was generated from the following files: