Bitcoin Core  0.15.99
P2P Digital Currency
Public Slots | Signals | Public Member Functions | Public Attributes | Private Member Functions | Private Attributes | List of all members
ClientModel Class Reference

Model for Bitcoin network client. More...

#include <clientmodel.h>

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

Public Slots

void updateTimer ()
 
void updateNumConnections (int numConnections)
 
void updateNetworkActive (bool networkActive)
 
void updateAlert ()
 
void updateBanlist ()
 

Signals

void numConnectionsChanged (int count)
 
void numBlocksChanged (int count, const QDateTime &blockDate, double nVerificationProgress, bool header)
 
void mempoolSizeChanged (long count, size_t mempoolSizeInBytes)
 
void networkActiveChanged (bool networkActive)
 
void alertsChanged (const QString &warnings)
 
void bytesChanged (quint64 totalBytesIn, quint64 totalBytesOut)
 
void message (const QString &title, const QString &message, unsigned int style)
 Fired when a message should be reported to the user. More...
 
void showProgress (const QString &title, int nProgress)
 

Public Member Functions

 ClientModel (interfaces::Node &node, OptionsModel *optionsModel, QObject *parent=0)
 
 ~ClientModel ()
 
interfaces::Nodenode () const
 
OptionsModelgetOptionsModel ()
 
PeerTableModelgetPeerTableModel ()
 
BanTableModelgetBanTableModel ()
 
int getNumConnections (unsigned int flags=CONNECTIONS_ALL) const
 Return number of connections, default is in- and outbound (total) More...
 
int getHeaderTipHeight () const
 
int64_t getHeaderTipTime () const
 
enum BlockSource getBlockSource () const
 Returns enum BlockSource of the current importing/syncing state. More...
 
QString getStatusBarWarnings () const
 Return warnings to be displayed in status bar. More...
 
QString formatFullVersion () const
 
QString formatSubVersion () const
 
bool isReleaseVersion () const
 
QString formatClientStartupTime () const
 
QString dataDir () const
 

Public Attributes

std::atomic< int > cachedBestHeaderHeight
 
std::atomic< int64_t > cachedBestHeaderTime
 

Private Member Functions

void subscribeToCoreSignals ()
 
void unsubscribeFromCoreSignals ()
 

Private Attributes

interfaces::Nodem_node
 
std::unique_ptr< interfaces::Handlerm_handler_show_progress
 
std::unique_ptr< interfaces::Handlerm_handler_notify_num_connections_changed
 
std::unique_ptr< interfaces::Handlerm_handler_notify_network_active_changed
 
std::unique_ptr< interfaces::Handlerm_handler_notify_alert_changed
 
std::unique_ptr< interfaces::Handlerm_handler_banned_list_changed
 
std::unique_ptr< interfaces::Handlerm_handler_notify_block_tip
 
std::unique_ptr< interfaces::Handlerm_handler_notify_header_tip
 
OptionsModeloptionsModel
 
PeerTableModelpeerTableModel
 
BanTableModelbanTableModel
 
QTimer * pollTimer
 

Detailed Description

Model for Bitcoin network client.

Definition at line 44 of file clientmodel.h.

Constructor & Destructor Documentation

ClientModel::ClientModel ( interfaces::Node node,
OptionsModel optionsModel,
QObject *  parent = 0 
)
explicit

Definition at line 35 of file clientmodel.cpp.

Here is the call graph for this function:

ClientModel::~ClientModel ( )

Definition at line 54 of file clientmodel.cpp.

Here is the call graph for this function:

Member Function Documentation

void ClientModel::alertsChanged ( const QString &  warnings)
signal

Here is the caller graph for this function:

void ClientModel::bytesChanged ( quint64  totalBytesIn,
quint64  totalBytesOut 
)
signal

Here is the caller graph for this function:

QString ClientModel::dataDir ( ) const

Definition at line 176 of file clientmodel.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

QString ClientModel::formatClientStartupTime ( ) const

Definition at line 171 of file clientmodel.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

QString ClientModel::formatFullVersion ( ) const

Definition at line 156 of file clientmodel.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

QString ClientModel::formatSubVersion ( ) const

Definition at line 161 of file clientmodel.cpp.

Here is the caller graph for this function:

BanTableModel * ClientModel::getBanTableModel ( )

Definition at line 151 of file clientmodel.cpp.

Here is the caller graph for this function:

enum BlockSource ClientModel::getBlockSource ( ) const

Returns enum BlockSource of the current importing/syncing state.

Definition at line 124 of file clientmodel.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

int ClientModel::getHeaderTipHeight ( ) const

Definition at line 73 of file clientmodel.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

int64_t ClientModel::getHeaderTipTime ( ) const

Definition at line 88 of file clientmodel.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

int ClientModel::getNumConnections ( unsigned int  flags = CONNECTIONS_ALL) const

Return number of connections, default is in- and outbound (total)

Definition at line 59 of file clientmodel.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

OptionsModel * ClientModel::getOptionsModel ( )

Definition at line 141 of file clientmodel.cpp.

Here is the caller graph for this function:

PeerTableModel * ClientModel::getPeerTableModel ( )

Definition at line 146 of file clientmodel.cpp.

Here is the caller graph for this function:

QString ClientModel::getStatusBarWarnings ( ) const

Return warnings to be displayed in status bar.

Definition at line 136 of file clientmodel.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

bool ClientModel::isReleaseVersion ( ) const

Definition at line 166 of file clientmodel.cpp.

void ClientModel::mempoolSizeChanged ( long  count,
size_t  mempoolSizeInBytes 
)
signal

Here is the caller graph for this function:

void ClientModel::message ( const QString &  title,
const QString &  message,
unsigned int  style 
)
signal

Fired when a message should be reported to the user.

void ClientModel::networkActiveChanged ( bool  networkActive)
signal

Here is the caller graph for this function:

interfaces::Node& ClientModel::node ( ) const
inline

Definition at line 52 of file clientmodel.h.

Here is the caller graph for this function:

void ClientModel::numBlocksChanged ( int  count,
const QDateTime &  blockDate,
double  nVerificationProgress,
bool  header 
)
signal
void ClientModel::numConnectionsChanged ( int  count)
signal

Here is the caller graph for this function:

void ClientModel::showProgress ( const QString &  title,
int  nProgress 
)
signal
void ClientModel::subscribeToCoreSignals ( )
private

Definition at line 248 of file clientmodel.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void ClientModel::unsubscribeFromCoreSignals ( )
private

Definition at line 260 of file clientmodel.cpp.

Here is the caller graph for this function:

void ClientModel::updateAlert ( )
slot

Definition at line 119 of file clientmodel.cpp.

Here is the call graph for this function:

void ClientModel::updateBanlist ( )
slot

Definition at line 181 of file clientmodel.cpp.

Here is the call graph for this function:

void ClientModel::updateNetworkActive ( bool  networkActive)
slot

Definition at line 114 of file clientmodel.cpp.

void ClientModel::updateNumConnections ( int  numConnections)
slot

Definition at line 109 of file clientmodel.cpp.

void ClientModel::updateTimer ( )
slot

Definition at line 101 of file clientmodel.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

Member Data Documentation

BanTableModel* ClientModel::banTableModel
private

Definition at line 88 of file clientmodel.h.

std::atomic<int> ClientModel::cachedBestHeaderHeight
mutable

Definition at line 74 of file clientmodel.h.

std::atomic<int64_t> ClientModel::cachedBestHeaderTime
mutable

Definition at line 75 of file clientmodel.h.

std::unique_ptr<interfaces::Handler> ClientModel::m_handler_banned_list_changed
private

Definition at line 83 of file clientmodel.h.

std::unique_ptr<interfaces::Handler> ClientModel::m_handler_notify_alert_changed
private

Definition at line 82 of file clientmodel.h.

std::unique_ptr<interfaces::Handler> ClientModel::m_handler_notify_block_tip
private

Definition at line 84 of file clientmodel.h.

std::unique_ptr<interfaces::Handler> ClientModel::m_handler_notify_header_tip
private

Definition at line 85 of file clientmodel.h.

std::unique_ptr<interfaces::Handler> ClientModel::m_handler_notify_network_active_changed
private

Definition at line 81 of file clientmodel.h.

std::unique_ptr<interfaces::Handler> ClientModel::m_handler_notify_num_connections_changed
private

Definition at line 80 of file clientmodel.h.

std::unique_ptr<interfaces::Handler> ClientModel::m_handler_show_progress
private

Definition at line 79 of file clientmodel.h.

interfaces::Node& ClientModel::m_node
private

Definition at line 78 of file clientmodel.h.

OptionsModel* ClientModel::optionsModel
private

Definition at line 86 of file clientmodel.h.

PeerTableModel* ClientModel::peerTableModel
private

Definition at line 87 of file clientmodel.h.

QTimer* ClientModel::pollTimer
private

Definition at line 90 of file clientmodel.h.


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