Bitcoin Core  0.18.99
P2P Digital Currency
Signals | Public Member Functions | Private Slots | 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 (WalletModel *wallet_model, SendCoinsRecipient recipient, QByteArray transaction)
 

Public Member Functions

 WalletController (interfaces::Node &node, const PlatformStyle *platform_style, OptionsModel *options_model, QObject *parent)
 
 ~WalletController ()
 
std::vector< WalletModel * > getOpenWallets () const
 Returns wallet models currently open. More...
 
std::map< std::string, bool > listWalletDir () const
 Returns all wallet names in the wallet dir mapped to whether the wallet is loaded. More...
 
OpenWalletActivityopenWallet (const std::string &name, QWidget *parent=nullptr)
 
void closeWallet (WalletModel *wallet_model, QWidget *parent=nullptr)
 

Private Slots

void addWallet (WalletModel *wallet_model)
 

Private Member Functions

WalletModelgetOrCreateWallet (std::unique_ptr< interfaces::Wallet > wallet)
 
void removeAndDeleteWallet (WalletModel *wallet_model)
 

Private Attributes

QThread m_activity_thread
 
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 OpenWalletActivity
 

Detailed Description

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

Definition at line 32 of file walletcontroller.h.

Constructor & Destructor Documentation

◆ WalletController()

WalletController::WalletController ( interfaces::Node node,
const PlatformStyle platform_style,
OptionsModel options_model,
QObject *  parent 
)

Definition at line 18 of file walletcontroller.cpp.

Here is the call graph for this function:

◆ ~WalletController()

WalletController::~WalletController ( )

Definition at line 37 of file walletcontroller.cpp.

Member Function Documentation

◆ addWallet

void WalletController::addWallet ( WalletModel wallet_model)
privateslot

Definition at line 134 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 70 of file walletcontroller.cpp.

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

◆ coinsSent

void WalletController::coinsSent ( WalletModel wallet_model,
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 43 of file walletcontroller.cpp.

Here is the caller graph for this function:

◆ getOrCreateWallet()

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

Definition at line 86 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 49 of file walletcontroller.cpp.

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

◆ openWallet()

OpenWalletActivity * WalletController::openWallet ( const std::string &  name,
QWidget *  parent = nullptr 
)

Definition at line 63 of file walletcontroller.cpp.

Here is the caller graph for this function:

◆ removeAndDeleteWallet()

void WalletController::removeAndDeleteWallet ( WalletModel wallet_model)
private

Definition at line 141 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

◆ OpenWalletActivity

friend class OpenWalletActivity
friend

Definition at line 71 of file walletcontroller.h.

Member Data Documentation

◆ m_activity_thread

QThread WalletController::m_activity_thread
private

Definition at line 63 of file walletcontroller.h.

◆ m_handler_load_wallet

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

Definition at line 69 of file walletcontroller.h.

◆ m_mutex

QMutex WalletController::m_mutex
mutableprivate

Definition at line 67 of file walletcontroller.h.

◆ m_node

interfaces::Node& WalletController::m_node
private

Definition at line 64 of file walletcontroller.h.

◆ m_options_model

OptionsModel* const WalletController::m_options_model
private

Definition at line 66 of file walletcontroller.h.

◆ m_platform_style

const PlatformStyle* const WalletController::m_platform_style
private

Definition at line 65 of file walletcontroller.h.

◆ m_wallets

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

Definition at line 68 of file walletcontroller.h.


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