PRCYCoin  2.0.0.7rc1
P2P Digital Currency
Public Slots | Signals | Public Member Functions | Private Member Functions | Private Attributes | List of all members
ClientModel Class Reference

Model for PRCY network client. More...

#include <clientmodel.h>

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

Public Slots

void updateTimer ()
 
void updateMnTimer ()
 
void updateNumConnections (int numConnections)
 
void updateAlert ()
 
void updateBanlist ()
 

Signals

void numConnectionsChanged (int count)
 
void numBlocksChanged (int count)
 
void strMasternodesChanged (const QString &strMasternodes)
 
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 (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 getNumBlocksAtStartup ()
 
QString getMasternodeCountString () const
 
int getNumBlocks ()
 
QDateTime getLastBlockDate () const
 
QString getLastBlockHash () const
 
double getVerificationProgress () const
 
quint64 getTotalBytesRecv () const
 
quint64 getTotalBytesSent () const
 
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
 
bool isReleaseVersion () const
 
QString clientName () const
 
QString formatClientStartupTime () const
 
QString dataDir () const
 
bool getTorInfo (std::string &ip_port) const
 
void startMasternodesTimer ()
 
void stopMasternodesTimer ()
 
void setCacheTip (const CBlockIndex *const tip)
 
void setCacheReindexing (bool reindex)
 
void setCacheImporting (bool import)
 
void setCacheInitialSync (bool _initialSync)
 

Private Member Functions

void subscribeToCoreSignals ()
 
void unsubscribeFromCoreSignals ()
 

Private Attributes

OptionsModeloptionsModel
 
PeerTableModelpeerTableModel
 
BanTableModelbanTableModel
 
const CBlockIndexcacheTip {nullptr}
 
QString cachedMasternodeCountString
 
bool cachedReindexing
 
bool cachedImporting
 
bool cachedInitialSync
 
int numBlocksAtStartup
 
QTimer * pollTimer
 
QTimer * pollMnTimer
 

Detailed Description

Model for PRCY network client.

Definition at line 44 of file clientmodel.h.

Constructor & Destructor Documentation

◆ ClientModel()

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

Definition at line 35 of file clientmodel.cpp.

Here is the call graph for this function:

◆ ~ClientModel()

ClientModel::~ClientModel ( )

Definition at line 56 of file clientmodel.cpp.

Here is the call graph for this function:

Member Function Documentation

◆ alertsChanged

void ClientModel::alertsChanged ( const QString &  warnings)
signal
Here is the caller graph for this function:

◆ bytesChanged

void ClientModel::bytesChanged ( quint64  totalBytesIn,
quint64  totalBytesOut 
)
signal
Here is the caller graph for this function:

◆ clientName()

QString ClientModel::clientName ( ) const

Definition at line 223 of file clientmodel.cpp.

Here is the caller graph for this function:

◆ dataDir()

QString ClientModel::dataDir ( ) const

Definition at line 233 of file clientmodel.cpp.

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

◆ formatClientStartupTime()

QString ClientModel::formatClientStartupTime ( ) const

Definition at line 228 of file clientmodel.cpp.

Here is the caller graph for this function:

◆ formatFullVersion()

QString ClientModel::formatFullVersion ( ) const

Definition at line 213 of file clientmodel.cpp.

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

◆ getBanTableModel()

BanTableModel * ClientModel::getBanTableModel ( )

Definition at line 208 of file clientmodel.cpp.

Here is the caller graph for this function:

◆ getBlockSource()

enum BlockSource ClientModel::getBlockSource ( ) const

Return true if core is importing blocks.

Definition at line 181 of file clientmodel.cpp.

Here is the call graph for this function:

◆ getLastBlockDate()

QDateTime ClientModel::getLastBlockDate ( ) const

Definition at line 109 of file clientmodel.cpp.

Here is the call graph for this function:

◆ getLastBlockHash()

QString ClientModel::getLastBlockHash ( ) const

Definition at line 115 of file clientmodel.cpp.

Here is the call graph for this function:

◆ getMasternodeCountString()

QString ClientModel::getMasternodeCountString ( ) const

Definition at line 75 of file clientmodel.cpp.

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

◆ getNumBlocks()

int ClientModel::getNumBlocks ( )

Definition at line 84 of file clientmodel.cpp.

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

◆ getNumBlocksAtStartup()

int ClientModel::getNumBlocksAtStartup ( )

Definition at line 93 of file clientmodel.cpp.

Here is the call graph for this function:

◆ getNumConnections()

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

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

Definition at line 61 of file clientmodel.cpp.

Here is the caller graph for this function:

◆ getOptionsModel()

OptionsModel * ClientModel::getOptionsModel ( )

Definition at line 198 of file clientmodel.cpp.

Here is the caller graph for this function:

◆ getPeerTableModel()

PeerTableModel * ClientModel::getPeerTableModel ( )

Definition at line 203 of file clientmodel.cpp.

Here is the caller graph for this function:

◆ getStatusBarWarnings()

QString ClientModel::getStatusBarWarnings ( ) const

Return warnings to be displayed in status bar.

Definition at line 193 of file clientmodel.cpp.

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

◆ getTorInfo()

bool ClientModel::getTorInfo ( std::string &  ip_port) const

Definition at line 312 of file clientmodel.cpp.

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

◆ getTotalBytesRecv()

quint64 ClientModel::getTotalBytesRecv ( ) const

Definition at line 99 of file clientmodel.cpp.

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

◆ getTotalBytesSent()

quint64 ClientModel::getTotalBytesSent ( ) const

Definition at line 104 of file clientmodel.cpp.

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

◆ getVerificationProgress()

double ClientModel::getVerificationProgress ( ) const

Definition at line 121 of file clientmodel.cpp.

Here is the call graph for this function:

◆ inInitialBlockDownload()

bool ClientModel::inInitialBlockDownload ( ) const

Return true if core is doing initial block download.

Definition at line 176 of file clientmodel.cpp.

Here is the caller graph for this function:

◆ isReleaseVersion()

bool ClientModel::isReleaseVersion ( ) const

Definition at line 218 of file clientmodel.cpp.

◆ message

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

Fired when a message should be reported to the user.

◆ numBlocksChanged

void ClientModel::numBlocksChanged ( int  count)
signal

◆ numConnectionsChanged

void ClientModel::numConnectionsChanged ( int  count)
signal
Here is the caller graph for this function:

◆ setCacheImporting()

void ClientModel::setCacheImporting ( bool  import)
inline

Definition at line 91 of file clientmodel.h.

◆ setCacheInitialSync()

void ClientModel::setCacheInitialSync ( bool  _initialSync)
inline

Definition at line 92 of file clientmodel.h.

◆ setCacheReindexing()

void ClientModel::setCacheReindexing ( bool  reindex)
inline

Definition at line 90 of file clientmodel.h.

◆ setCacheTip()

void ClientModel::setCacheTip ( const CBlockIndex *const  tip)
inline

Definition at line 89 of file clientmodel.h.

◆ showProgress

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

◆ startMasternodesTimer()

void ClientModel::startMasternodesTimer ( )

Definition at line 151 of file clientmodel.cpp.

Here is the caller graph for this function:

◆ stopMasternodesTimer()

void ClientModel::stopMasternodesTimer ( )

Definition at line 159 of file clientmodel.cpp.

Here is the caller graph for this function:

◆ strMasternodesChanged

void ClientModel::strMasternodesChanged ( const QString &  strMasternodes)
signal
Here is the caller graph for this function:

◆ subscribeToCoreSignals()

void ClientModel::subscribeToCoreSignals ( )
private

Definition at line 292 of file clientmodel.cpp.

◆ unsubscribeFromCoreSignals()

void ClientModel::unsubscribeFromCoreSignals ( )
private

Definition at line 302 of file clientmodel.cpp.

Here is the caller graph for this function:

◆ updateAlert

void ClientModel::updateAlert ( )
slot

Definition at line 171 of file clientmodel.cpp.

Here is the call graph for this function:

◆ updateBanlist

void ClientModel::updateBanlist ( )
slot

Definition at line 238 of file clientmodel.cpp.

Here is the call graph for this function:

◆ updateMnTimer

void ClientModel::updateMnTimer ( )
slot

Definition at line 134 of file clientmodel.cpp.

Here is the call graph for this function:

◆ updateNumConnections

void ClientModel::updateNumConnections ( int  numConnections)
slot

Definition at line 166 of file clientmodel.cpp.

◆ updateTimer

void ClientModel::updateTimer ( )
slot

Definition at line 126 of file clientmodel.cpp.

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

Member Data Documentation

◆ banTableModel

BanTableModel* ClientModel::banTableModel
private

Definition at line 97 of file clientmodel.h.

◆ cachedImporting

bool ClientModel::cachedImporting
private

Definition at line 102 of file clientmodel.h.

◆ cachedInitialSync

bool ClientModel::cachedInitialSync
private

Definition at line 103 of file clientmodel.h.

◆ cachedMasternodeCountString

QString ClientModel::cachedMasternodeCountString
private

Definition at line 100 of file clientmodel.h.

◆ cachedReindexing

bool ClientModel::cachedReindexing
private

Definition at line 101 of file clientmodel.h.

◆ cacheTip

const CBlockIndex* ClientModel::cacheTip {nullptr}
private

Definition at line 99 of file clientmodel.h.

◆ numBlocksAtStartup

int ClientModel::numBlocksAtStartup
private

Definition at line 105 of file clientmodel.h.

◆ optionsModel

OptionsModel* ClientModel::optionsModel
private

Definition at line 95 of file clientmodel.h.

◆ peerTableModel

PeerTableModel* ClientModel::peerTableModel
private

Definition at line 96 of file clientmodel.h.

◆ pollMnTimer

QTimer* ClientModel::pollMnTimer
private

Definition at line 108 of file clientmodel.h.

◆ pollTimer

QTimer* ClientModel::pollTimer
private

Definition at line 107 of file clientmodel.h.


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