Anoncoin  0.9.4
P2P Digital Currency
Public Slots | Signals | Public Member Functions | Private Member Functions | Private Attributes | List of all members
ClientModel Class Reference

Model for Anoncoin network client. More...

#include <clientmodel.h>

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

Public Slots

void updateTimer ()
 From: https://qt-project.org/doc/qt-5-snapshot/signalsandslots.html A slot is a function that is called in response to a particular signal. More...
 
void updateNumConnections (int numConnections)
 
void updateAlert (const QString &hash, int status)
 

Signals

void numConnectionsChanged (int count)
 Note signal functions like this are created here in the header file, yet no source implmentation will be found in the developer code. More...
 
void numBlocksChanged (int count)
 
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...
 

Public Member Functions

 ClientModel (OptionsModel *optionsModel, QObject *parent=0)
 
 ~ClientModel ()
 
OptionsModelgetOptionsModel ()
 
PeerTableModelgetPeerTableModel ()
 
int getNumConnections (unsigned int flags=CONNECTIONS_ALL) const
 Return number of connections, default is in- and outbound (total) More...
 
int getNumBlocks () const
 
int getNumBlocksAtStartup ()
 
quint64 getTotalBytesRecv () const
 
quint64 getTotalBytesSent () const
 
double getVerificationProgress () const
 
QDateTime getLastBlockDate () const
 
QString getNetworkName () const
 Return network (main, testnetX, regtest) More...
 
bool inInitialBlockDownload () const
 Return true if core is doing initial block download. More...
 
enum BlockSource getBlockSource () const
 Return true if core is importing blocks. More...
 
QString getStatusBarWarnings () const
 Return warnings to be displayed in status bar. More...
 
QString formatFullVersion () const
 
QString formatBuildDate () const
 
bool isReleaseVersion () const
 
QString clientName () const
 
QString formatClientStartupTime () const
 

Private Member Functions

void subscribeToCoreSignals ()
 
void unsubscribeFromCoreSignals ()
 

Private Attributes

OptionsModeloptionsModel
 
PeerTableModelpeerTableModel
 
int cachedNumBlocks
 
bool cachedReindexing
 
bool cachedImporting
 
int numBlocksAtStartup
 
QTimer * pollTimer
 

Detailed Description

Model for Anoncoin network client.

Definition at line 45 of file clientmodel.h.

Constructor & Destructor Documentation

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

Definition at line 30 of file clientmodel.cpp.

Here is the call graph for this function:

ClientModel::~ClientModel ( )

Definition at line 46 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 219 of file moc_clientmodel.cpp.

Here is the caller graph for this function:

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

Definition at line 226 of file moc_clientmodel.cpp.

Here is the caller graph for this function:

QString ClientModel::clientName ( ) const

Definition at line 274 of file clientmodel.cpp.

Here is the caller graph for this function:

QString ClientModel::formatBuildDate ( ) const

Definition at line 264 of file clientmodel.cpp.

Here is the caller graph for this function:

QString ClientModel::formatClientStartupTime ( ) const

Definition at line 279 of file clientmodel.cpp.

Here is the caller graph for this function:

QString ClientModel::formatFullVersion ( ) const

Definition at line 259 of file clientmodel.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

enum BlockSource ClientModel::getBlockSource ( ) const

Return true if core is importing blocks.

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

Here is the call graph for this function:

Here is the caller graph for this function:

QString ClientModel::getNetworkName ( ) const

Return network (main, testnetX, regtest)

Definition at line 150 of file clientmodel.cpp.

Here is the call graph for this function:

int ClientModel::getNumBlocks ( ) const

Definition at line 65 of file clientmodel.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

int ClientModel::getNumBlocksAtStartup ( )

Definition at line 71 of file clientmodel.cpp.

Here is the call 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 51 of file clientmodel.cpp.

Here is the caller graph for this function:

OptionsModel * ClientModel::getOptionsModel ( )

Definition at line 249 of file clientmodel.cpp.

Here is the caller graph for this function:

PeerTableModel * ClientModel::getPeerTableModel ( )

Definition at line 254 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 244 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 77 of file clientmodel.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

quint64 ClientModel::getTotalBytesSent ( ) const

Definition at line 82 of file clientmodel.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

double ClientModel::getVerificationProgress ( ) const

Definition at line 96 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 227 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 269 of file clientmodel.cpp.

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 240 of file moc_clientmodel.cpp.

Here is the caller graph for this function:

void ClientModel::numBlocksChanged ( int  count)
signal

Definition at line 212 of file moc_clientmodel.cpp.

Here is the caller graph for this function:

void ClientModel::numConnectionsChanged ( int  count)
signal

Note signal functions like this are created here in the header file, yet no source implmentation will be found in the developer code.

It's upto the build process to create moc_xx files, from which is generated sufficant information that QT runs & the linker is able to create an execuable.

Definition at line 205 of file moc_clientmodel.cpp.

Here is the caller graph for this function:

void ClientModel::subscribeToCoreSignals ( )
private

Definition at line 314 of file clientmodel.cpp.

Here is the caller graph for this function:

void ClientModel::unsubscribeFromCoreSignals ( )
private

Definition at line 325 of file clientmodel.cpp.

Here is the caller graph for this function:

void ClientModel::updateAlert ( const QString &  hash,
int  status 
)
slot

Definition at line 133 of file clientmodel.cpp.

Here is the call graph for this function:

void ClientModel::updateNumConnections ( int  numConnections)
slot

Definition at line 128 of file clientmodel.cpp.

void ClientModel::updateTimer ( )
slot

From: https://qt-project.org/doc/qt-5-snapshot/signalsandslots.html A slot is a function that is called in response to a particular signal.

Qt's widgets have many pre-defined slots, but it is common practice to subclass widgets and add slots so that you can handle the signals that you are interested in...

Definition at line 102 of file clientmodel.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

Member Data Documentation

bool ClientModel::cachedImporting
private

Definition at line 106 of file clientmodel.h.

int ClientModel::cachedNumBlocks
private

Definition at line 104 of file clientmodel.h.

bool ClientModel::cachedReindexing
private

Definition at line 105 of file clientmodel.h.

int ClientModel::numBlocksAtStartup
private

Definition at line 108 of file clientmodel.h.

OptionsModel* ClientModel::optionsModel
private

Definition at line 101 of file clientmodel.h.

PeerTableModel* ClientModel::peerTableModel
private

Definition at line 102 of file clientmodel.h.

QTimer* ClientModel::pollTimer
private

Definition at line 110 of file clientmodel.h.


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