![]() |
Dash Core
0.12.2.1
P2P Digital Currency
|
#include <clientmodel.h>
Public Slots | |
void | updateTimer () |
void | updateMnTimer () |
void | updateNumConnections (int numConnections) |
void | updateNetworkActive (bool networkActive) |
void | updateAlert (const QString &hash, int status) |
void | updateBanlist () |
Signals | |
void | numConnectionsChanged (int count) |
void | strMasternodesChanged (const QString &strMasternodes) |
void | numBlocksChanged (int count, const QDateTime &blockDate, double nVerificationProgress, bool header) |
void | additionalDataSyncProgressChanged (double nSyncProgress) |
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 (OptionsModel *optionsModel, QObject *parent=0) | |
~ClientModel () | |
OptionsModel * | getOptionsModel () |
PeerTableModel * | getPeerTableModel () |
BanTableModel * | getBanTableModel () |
int | getNumConnections (unsigned int flags=CONNECTIONS_ALL) const |
Return number of connections, default is in- and outbound (total) More... | |
QString | getMasternodeCountString () const |
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... | |
QString | formatFullVersion () const |
QString | formatSubVersion () const |
bool | isReleaseVersion () const |
QString | clientName () 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 | |
OptionsModel * | optionsModel |
PeerTableModel * | peerTableModel |
QString | cachedMasternodeCountString |
BanTableModel * | banTableModel |
QTimer * | pollTimer |
QTimer * | pollMnTimer |
Model for Dash network client.
Definition at line 42 of file clientmodel.h.
|
explicit |
Definition at line 37 of file clientmodel.cpp.
ClientModel::~ClientModel | ( | ) |
Definition at line 61 of file clientmodel.cpp.
|
signal |
Definition at line 291 of file moc_clientmodel.cpp.
|
signal |
Definition at line 312 of file moc_clientmodel.cpp.
Referenced by updateAlert().
|
signal |
Definition at line 319 of file moc_clientmodel.cpp.
Referenced by updateTimer().
QString ClientModel::clientName | ( | ) | const |
Definition at line 285 of file clientmodel.cpp.
Referenced by RPCConsole::setClientModel().
QString ClientModel::dataDir | ( | ) | const |
Definition at line 295 of file clientmodel.cpp.
Referenced by RPCConsole::setClientModel().
QString ClientModel::formatClientStartupTime | ( | ) | const |
Definition at line 290 of file clientmodel.cpp.
Referenced by RPCConsole::setClientModel().
QString ClientModel::formatFullVersion | ( | ) | const |
Definition at line 270 of file clientmodel.cpp.
Referenced by RPCConsole::setClientModel().
QString ClientModel::formatSubVersion | ( | ) | const |
Definition at line 275 of file clientmodel.cpp.
Referenced by RPCConsole::setClientModel().
BanTableModel * ClientModel::getBanTableModel | ( | ) |
Definition at line 265 of file clientmodel.cpp.
Referenced by RPCConsole::banSelectedNode(), RPCConsole::setClientModel(), RPCConsole::showOrHideBanTableIfRequired(), and RPCConsole::unbanSelectedNode().
enum BlockSource ClientModel::getBlockSource | ( | ) | const |
Returns enum BlockSource of the current importing/syncing state.
Definition at line 223 of file clientmodel.cpp.
Referenced by BitcoinGUI::setNumBlocks().
int ClientModel::getHeaderTipHeight | ( | ) | const |
Definition at line 100 of file clientmodel.cpp.
Referenced by BitcoinGUI::setClientModel(), and BitcoinGUI::updateHeadersSyncProgressLabel().
int64_t ClientModel::getHeaderTipTime | ( | ) | const |
Definition at line 114 of file clientmodel.cpp.
Referenced by BitcoinGUI::setClientModel(), and BitcoinGUI::updateHeadersSyncProgressLabel().
QDateTime ClientModel::getLastBlockDate | ( | ) | const |
Definition at line 140 of file clientmodel.cpp.
Referenced by RPCConsole::setClientModel(), and BitcoinGUI::setClientModel().
QString ClientModel::getMasternodeCountString | ( | ) | const |
Definition at line 82 of file clientmodel.cpp.
Referenced by RPCConsole::setClientModel(), and updateMnTimer().
size_t ClientModel::getMempoolDynamicUsage | ( | ) | const |
Return the dynamic memory usage of the mempool.
Definition at line 155 of file clientmodel.cpp.
Referenced by updateTimer().
long ClientModel::getMempoolSize | ( | ) | const |
Return number of transactions in the mempool.
Definition at line 150 of file clientmodel.cpp.
Referenced by updateTimer().
bool ClientModel::getNetworkActive | ( | ) | const |
Return true if network activity in core is enabled.
Definition at line 242 of file clientmodel.cpp.
Referenced by BitcoinGUI::toggleNetworkActive(), BitcoinGUI::updateNetworkState(), and RPCConsole::updateNetworkState().
int ClientModel::getNumBlocks | ( | ) | const |
Definition at line 94 of file clientmodel.cpp.
Referenced by OverviewPage::privateSendStatus(), RPCConsole::setClientModel(), and BitcoinGUI::setClientModel().
int ClientModel::getNumConnections | ( | unsigned int | flags = CONNECTIONS_ALL | ) | const |
Return number of connections, default is in- and outbound (total)
Definition at line 66 of file clientmodel.cpp.
Referenced by getBlockSource(), RPCConsole::setClientModel(), BitcoinGUI::updateNetworkState(), and RPCConsole::updateNetworkState().
OptionsModel * ClientModel::getOptionsModel | ( | ) |
Definition at line 255 of file clientmodel.cpp.
Referenced by BitcoinGUI::changeEvent(), BitcoinGUI::closeEvent(), BitcoinGUI::optionsClicked(), and BitcoinGUI::setClientModel().
PeerTableModel * ClientModel::getPeerTableModel | ( | ) |
Definition at line 260 of file clientmodel.cpp.
Referenced by RPCConsole::banSelectedNode(), RPCConsole::hideEvent(), RPCConsole::peerLayoutAboutToChange(), RPCConsole::peerLayoutChanged(), RPCConsole::peerSelected(), RPCConsole::setClientModel(), and RPCConsole::showEvent().
QString ClientModel::getStatusBarWarnings | ( | ) | const |
Return warnings to be displayed in status bar.
Definition at line 250 of file clientmodel.cpp.
Referenced by OverviewPage::setClientModel(), and updateAlert().
quint64 ClientModel::getTotalBytesRecv | ( | ) | const |
Definition at line 126 of file clientmodel.cpp.
Referenced by TrafficGraphWidget::clear(), TrafficGraphWidget::setClientModel(), RPCConsole::setClientModel(), TrafficGraphWidget::updateRates(), and updateTimer().
quint64 ClientModel::getTotalBytesSent | ( | ) | const |
Definition at line 133 of file clientmodel.cpp.
Referenced by TrafficGraphWidget::clear(), TrafficGraphWidget::setClientModel(), RPCConsole::setClientModel(), TrafficGraphWidget::updateRates(), and updateTimer().
double ClientModel::getVerificationProgress | ( | const CBlockIndex * | tip | ) | const |
Definition at line 160 of file clientmodel.cpp.
Referenced by BlockTipChanged(), RPCConsole::setClientModel(), and BitcoinGUI::setClientModel().
bool ClientModel::inInitialBlockDownload | ( | ) | const |
Return true if core is doing initial block download.
Definition at line 218 of file clientmodel.cpp.
Referenced by WalletView::processNewTransaction().
bool ClientModel::isReleaseVersion | ( | ) | const |
Definition at line 280 of file clientmodel.cpp.
|
signal |
Definition at line 298 of file moc_clientmodel.cpp.
Referenced by updateTimer().
|
signal |
Fired when a message should be reported to the user.
Definition at line 326 of file moc_clientmodel.cpp.
Referenced by updateAlert().
|
signal |
Definition at line 305 of file moc_clientmodel.cpp.
Referenced by updateNetworkActive().
|
signal |
Definition at line 284 of file moc_clientmodel.cpp.
|
signal |
Definition at line 270 of file moc_clientmodel.cpp.
Referenced by updateNumConnections().
void ClientModel::setNetworkActive | ( | bool | active | ) |
Toggle network activity state in core.
Definition at line 235 of file clientmodel.cpp.
Referenced by BitcoinGUI::toggleNetworkActive().
|
signal |
Definition at line 333 of file moc_clientmodel.cpp.
|
signal |
Definition at line 277 of file moc_clientmodel.cpp.
Referenced by updateMnTimer().
|
private |
Definition at line 375 of file clientmodel.cpp.
Referenced by ClientModel().
|
private |
Definition at line 388 of file clientmodel.cpp.
Referenced by ~ClientModel().
|
slot |
Definition at line 201 of file clientmodel.cpp.
|
slot |
Definition at line 300 of file clientmodel.cpp.
|
slot |
Definition at line 179 of file clientmodel.cpp.
Referenced by ClientModel().
|
slot |
Definition at line 196 of file clientmodel.cpp.
|
slot |
Definition at line 191 of file clientmodel.cpp.
|
slot |
Definition at line 171 of file clientmodel.cpp.
Referenced by ClientModel().
|
private |
Definition at line 97 of file clientmodel.h.
Referenced by ClientModel(), getBanTableModel(), and updateBanlist().
|
mutable |
Definition at line 90 of file clientmodel.h.
Referenced by BlockTipChanged(), ClientModel(), getHeaderTipHeight(), and getHeaderTipTime().
|
mutable |
Definition at line 91 of file clientmodel.h.
Referenced by BlockTipChanged(), ClientModel(), getHeaderTipHeight(), and getHeaderTipTime().
|
private |
Definition at line 96 of file clientmodel.h.
Referenced by updateMnTimer().
|
private |
Definition at line 94 of file clientmodel.h.
Referenced by getOptionsModel().
|
private |
Definition at line 95 of file clientmodel.h.
Referenced by ClientModel(), and getPeerTableModel().
|
private |
Definition at line 100 of file clientmodel.h.
Referenced by ClientModel().
|
private |
Definition at line 99 of file clientmodel.h.
Referenced by ClientModel().