Fabcoin Core  0.16.2
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 Fabcoin 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 tipChanged ()
 
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 (OptionsModel *optionsModel, QObject *parent=0)
 
 ~ClientModel ()
 
OptionsModelgetOptionsModel ()
 
PeerTableModelgetPeerTableModel ()
 
BanTableModelgetBanTableModel ()
 
int getNumConnections (unsigned int flags=CONNECTIONS_ALL) const
 Return number of connections, default is in- and outbound (total) More...
 
int getNumBlocks () const
 
int getHeaderTipHeight () const
 
int64_t getHeaderTipTime () const
 
long getMempoolSize () const
 Return number of transactions in the mempool. More...
 
size_t getMempoolDynamicUsage () const
 Return the dynamic memory usage of the mempool. More...
 
quint64 getTotalBytesRecv () const
 
quint64 getTotalBytesSent () const
 
double getVerificationProgress (const CBlockIndex *tip) const
 
QDateTime getLastBlockDate () const
 
bool inInitialBlockDownload () const
 Return true if core is doing initial block download. More...
 
enum BlockSource getBlockSource () const
 Returns enum BlockSource of the current importing/syncing state. More...
 
bool getNetworkActive () const
 Return true if network activity in core is enabled. More...
 
void setNetworkActive (bool active)
 Toggle network activity state in core. More...
 
QString getStatusBarWarnings () const
 Return warnings to be displayed in status bar. More...
 
void getGasInfo (uint64_t &blockGasLimit, uint64_t &minGasPrice, uint64_t &nGasPrice) const
 Get the information about the needed gas. 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

OptionsModeloptionsModel
 
PeerTableModelpeerTableModel
 
BanTableModelbanTableModel
 
QTimer * pollTimer
 

Detailed Description

Model for Fabcoin network client.

Definition at line 38 of file clientmodel.h.

Constructor & Destructor Documentation

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

Definition at line 34 of file clientmodel.cpp.

Here is the call graph for this function:

ClientModel::~ClientModel ( )

Definition at line 52 of file clientmodel.cpp.

Here is the call graph for this function:

Member Function Documentation

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

Definition at line 276 of file moc_clientmodel.cpp.

Here is the caller graph for this function:

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

Definition at line 283 of file moc_clientmodel.cpp.

Here is the caller graph for this function:

QString ClientModel::dataDir ( ) const

Definition at line 255 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 250 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 235 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 240 of file clientmodel.cpp.

Here is the caller graph for this function:

BanTableModel * ClientModel::getBanTableModel ( )

Definition at line 230 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 178 of file clientmodel.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void ClientModel::getGasInfo ( uint64_t &  blockGasLimit,
uint64_t &  minGasPrice,
uint64_t &  nGasPrice 
) const

Get the information about the needed gas.

Definition at line 210 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 79 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 93 of file clientmodel.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

QDateTime ClientModel::getLastBlockDate ( ) const

Definition at line 119 of file clientmodel.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

size_t ClientModel::getMempoolDynamicUsage ( ) const

Return the dynamic memory usage of the mempool.

Definition at line 134 of file clientmodel.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

long ClientModel::getMempoolSize ( ) const

Return number of transactions in the mempool.

Definition at line 129 of file clientmodel.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

bool ClientModel::getNetworkActive ( ) const

Return true if network activity in core is enabled.

Definition at line 197 of file clientmodel.cpp.

Here is the caller graph for this function:

int ClientModel::getNumBlocks ( ) 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:

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

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

Definition at line 57 of file clientmodel.cpp.

Here is the caller graph for this function:

OptionsModel * ClientModel::getOptionsModel ( )

Definition at line 220 of file clientmodel.cpp.

Here is the caller graph for this function:

PeerTableModel * ClientModel::getPeerTableModel ( )

Definition at line 225 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 205 of file clientmodel.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

quint64 ClientModel::getTotalBytesRecv ( ) const

Definition at line 105 of file clientmodel.cpp.

Here is the caller graph for this function:

quint64 ClientModel::getTotalBytesSent ( ) const

Definition at line 112 of file clientmodel.cpp.

Here is the caller graph for this function:

double ClientModel::getVerificationProgress ( const CBlockIndex tip) const

Definition at line 139 of file clientmodel.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

bool ClientModel::inInitialBlockDownload ( ) const

Return true if core is doing initial block download.

Definition at line 173 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 245 of file clientmodel.cpp.

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

Definition at line 262 of file moc_clientmodel.cpp.

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.

Definition at line 296 of file moc_clientmodel.cpp.

void ClientModel::networkActiveChanged ( bool  networkActive)
signal

Definition at line 269 of file moc_clientmodel.cpp.

Here is the caller graph for this function:

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

Definition at line 255 of file moc_clientmodel.cpp.

void ClientModel::numConnectionsChanged ( int  count)
signal

Definition at line 248 of file moc_clientmodel.cpp.

Here is the caller graph for this function:

void ClientModel::setNetworkActive ( bool  active)

Toggle network activity state in core.

Definition at line 190 of file clientmodel.cpp.

Here is the caller graph for this function:

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

Definition at line 303 of file moc_clientmodel.cpp.

void ClientModel::subscribeToCoreSignals ( )
private

Definition at line 346 of file clientmodel.cpp.

Here is the caller graph for this function:

void ClientModel::tipChanged ( )
signal

Definition at line 290 of file moc_clientmodel.cpp.

void ClientModel::unsubscribeFromCoreSignals ( )
private

Definition at line 358 of file clientmodel.cpp.

Here is the caller graph for this function:

void ClientModel::updateAlert ( )
slot

Definition at line 168 of file clientmodel.cpp.

Here is the call graph for this function:

void ClientModel::updateBanlist ( )
slot

Definition at line 260 of file clientmodel.cpp.

Here is the call graph for this function:

void ClientModel::updateNetworkActive ( bool  networkActive)
slot

Definition at line 163 of file clientmodel.cpp.

void ClientModel::updateNumConnections ( int  numConnections)
slot

Definition at line 158 of file clientmodel.cpp.

void ClientModel::updateTimer ( )
slot

Definition at line 150 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 92 of file clientmodel.h.

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

Definition at line 86 of file clientmodel.h.

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

Definition at line 87 of file clientmodel.h.

OptionsModel* ClientModel::optionsModel
private

Definition at line 90 of file clientmodel.h.

PeerTableModel* ClientModel::peerTableModel
private

Definition at line 91 of file clientmodel.h.

QTimer* ClientModel::pollTimer
private

Definition at line 94 of file clientmodel.h.


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