Bitcoin ABC 0.30.7
P2P Digital Currency
Signals | Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
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 (interfaces::Wallet &wallet, SendCoinsRecipient recipient, QByteArray transaction)
 

Public Member Functions

 WalletController (ClientModel &client_model, const PlatformStyle *platform_style, QObject *parent)
 
 ~WalletController ()
 
std::vector< WalletModel * > getOpenWallets () const
 Returns wallet models currently open. More...
 
WalletModelgetOrCreateWallet (std::unique_ptr< interfaces::Wallet > wallet)
 
std::map< std::string, bool > listWalletDir () const
 Returns all wallet names in the wallet dir mapped to whether the wallet is loaded. More...
 
void closeWallet (WalletModel *wallet_model, QWidget *parent=nullptr)
 
void closeAllWallets (QWidget *parent=nullptr)
 

Private Member Functions

void removeAndDeleteWallet (WalletModel *wallet_model)
 

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
 

Detailed Description

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

Definition at line 48 of file walletcontroller.h.

Constructor & Destructor Documentation

◆ WalletController()

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

Definition at line 27 of file walletcontroller.cpp.

Here is the call graph for this function:

◆ ~WalletController()

WalletController::~WalletController ( )

Definition at line 52 of file walletcontroller.cpp.

Member Function Documentation

◆ closeAllWallets()

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

Definition at line 98 of file walletcontroller.cpp.

Here is the caller graph for this function:

◆ closeWallet()

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

Definition at line 78 of file walletcontroller.cpp.

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

◆ coinsSent

void WalletController::coinsSent ( interfaces::Wallet wallet,
SendCoinsRecipient  recipient,
QByteArray  transaction 
)
signal
Here is the caller graph for this function:

◆ getOpenWallets()

std::vector< WalletModel * > WalletController::getOpenWallets ( ) const

Returns wallet models currently open.

Definition at line 58 of file walletcontroller.cpp.

◆ getOrCreateWallet()

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

Definition at line 116 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, bool > WalletController::listWalletDir ( ) const

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

Definition at line 63 of file walletcontroller.cpp.

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

◆ removeAndDeleteWallet()

void WalletController::removeAndDeleteWallet ( WalletModel wallet_model)
private

Definition at line 176 of file walletcontroller.cpp.

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:

Friends And Related Function Documentation

◆ WalletControllerActivity

friend class WalletControllerActivity
friend

Definition at line 88 of file walletcontroller.h.

Member Data Documentation

◆ m_activity_thread

QThread* const WalletController::m_activity_thread
private

Definition at line 78 of file walletcontroller.h.

◆ m_activity_worker

QObject* const WalletController::m_activity_worker
private

Definition at line 79 of file walletcontroller.h.

◆ m_client_model

ClientModel& WalletController::m_client_model
private

Definition at line 80 of file walletcontroller.h.

◆ m_handler_load_wallet

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

Definition at line 86 of file walletcontroller.h.

◆ m_mutex

QMutex WalletController::m_mutex
mutableprivate

Definition at line 84 of file walletcontroller.h.

◆ m_node

interfaces::Node& WalletController::m_node
private

Definition at line 81 of file walletcontroller.h.

◆ m_options_model

OptionsModel* const WalletController::m_options_model
private

Definition at line 83 of file walletcontroller.h.

◆ m_platform_style

const PlatformStyle* const WalletController::m_platform_style
private

Definition at line 82 of file walletcontroller.h.

◆ m_wallets

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

Definition at line 85 of file walletcontroller.h.


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