Feathercoin  0.5.0
P2P Digital Currency
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros
Public Slots | Signals | Public Member Functions | 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:
Inheritance graph
[legend]
Collaboration diagram for ClientModel:
Collaboration graph
[legend]

Public Slots

void updateTimer ()
 
void updateNumConnections (int numConnections)
 
void updateAlert (const QString &hash, int status)
 

Signals

void numConnectionsChanged (int count)
 
void numBlocksChanged (int count, int countOfPeers)
 
void alertsChanged (const QString &warnings)
 
void message (const QString &title, const QString &message, unsigned int style)
 Asynchronous message notification. More...
 

Public Member Functions

 ClientModel (OptionsModel *optionsModel, QObject *parent=0)
 
 ~ClientModel ()
 
OptionsModelgetOptionsModel ()
 
int getNumConnections () const
 
int getNumBlocks () const
 
int getNumBlocksAtStartup ()
 
double getVerificationProgress () const
 
QDateTime getLastBlockDate () const
 
bool isTestNet () const
 Return true if client connected to testnet. 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...
 
int getNumBlocksOfPeers () const
 Return conservative estimate of total number of blocks, or 0 if unknown. 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
 
int cachedNumBlocks
 
int cachedNumBlocksOfPeers
 
bool cachedReindexing
 
bool cachedImporting
 
int numBlocksAtStartup
 
QTimer * pollTimer
 

Detailed Description

Model for Bitcoin network client.

Definition at line 24 of file clientmodel.h.

Constructor & Destructor Documentation

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

Definition at line 18 of file clientmodel.cpp.

ClientModel::~ClientModel ( )

Definition at line 32 of file clientmodel.cpp.

Member Function Documentation

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

Definition at line 163 of file clientmodel.cpp.

QString ClientModel::formatBuildDate ( ) const

Definition at line 153 of file clientmodel.cpp.

QString ClientModel::formatClientStartupTime ( ) const

Definition at line 168 of file clientmodel.cpp.

QString ClientModel::formatFullVersion ( ) const

Definition at line 148 of file clientmodel.cpp.

enum BlockSource ClientModel::getBlockSource ( ) const

Return true if core is importing blocks.

Definition at line 121 of file clientmodel.cpp.

QDateTime ClientModel::getLastBlockDate ( ) const

Definition at line 53 of file clientmodel.cpp.

int ClientModel::getNumBlocks ( ) const

Definition at line 42 of file clientmodel.cpp.

int ClientModel::getNumBlocksAtStartup ( )

Definition at line 47 of file clientmodel.cpp.

int ClientModel::getNumBlocksOfPeers ( ) const

Return conservative estimate of total number of blocks, or 0 if unknown.

Definition at line 133 of file clientmodel.cpp.

int ClientModel::getNumConnections ( ) const

Definition at line 37 of file clientmodel.cpp.

OptionsModel * ClientModel::getOptionsModel ( )

Definition at line 143 of file clientmodel.cpp.

QString ClientModel::getStatusBarWarnings ( ) const

Return warnings to be displayed in status bar.

Definition at line 138 of file clientmodel.cpp.

double ClientModel::getVerificationProgress ( ) const

Definition at line 63 of file clientmodel.cpp.

bool ClientModel::inInitialBlockDownload ( ) const

Return true if core is doing initial block download.

Definition at line 116 of file clientmodel.cpp.

bool ClientModel::isReleaseVersion ( ) const

Definition at line 158 of file clientmodel.cpp.

bool ClientModel::isTestNet ( ) const

Return true if client connected to testnet.

Definition at line 111 of file clientmodel.cpp.

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

Asynchronous message notification.

void ClientModel::numBlocksChanged ( int  count,
int  countOfPeers 
)
signal
void ClientModel::numConnectionsChanged ( int  count)
signal
void ClientModel::subscribeToCoreSignals ( )
private

Definition at line 195 of file clientmodel.cpp.

void ClientModel::unsubscribeFromCoreSignals ( )
private

Definition at line 203 of file clientmodel.cpp.

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

Definition at line 94 of file clientmodel.cpp.

void ClientModel::updateNumConnections ( int  numConnections)
slot

Definition at line 89 of file clientmodel.cpp.

void ClientModel::updateTimer ( )
slot

Definition at line 68 of file clientmodel.cpp.

Member Data Documentation

bool ClientModel::cachedImporting
private

Definition at line 64 of file clientmodel.h.

int ClientModel::cachedNumBlocks
private

Definition at line 61 of file clientmodel.h.

int ClientModel::cachedNumBlocksOfPeers
private

Definition at line 62 of file clientmodel.h.

bool ClientModel::cachedReindexing
private

Definition at line 63 of file clientmodel.h.

int ClientModel::numBlocksAtStartup
private

Definition at line 66 of file clientmodel.h.

OptionsModel* ClientModel::optionsModel
private

Definition at line 59 of file clientmodel.h.

QTimer* ClientModel::pollTimer
private

Definition at line 68 of file clientmodel.h.


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