25 QObject(parent), optionsModel(optionsModel),
27 cachedReindexing(0), cachedImporting(0),
28 numBlocksAtStartup(-1), pollTimer(0)
84 return QDateTime::fromTime_t(
Params().GenesisBlock().nTime);
130 hash_256.
SetHex(hash.toStdString());
143 QString netname(QString::fromStdString(
Params().DataDir()));
144 if(netname.isEmpty())
168 return QString::fromStdString(
GetWarnings(
"statusbar"));
211 QMetaObject::invokeMethod(clientmodel,
"updateNumConnections", Qt::QueuedConnection,
212 Q_ARG(
int, newNumConnections));
217 qDebug() <<
"NotifyAlertChanged : " + QString::fromStdString(hash.
GetHex()) +
" status=" + QString::number(status);
218 QMetaObject::invokeMethod(clientmodel,
"updateAlert", Qt::QueuedConnection,
219 Q_ARG(QString, QString::fromStdString(hash.
GetHex())),
void numBlocksChanged(int count)
CClientUIInterface uiInterface
void SetHex(const char *psz)
void message(const QString &title, const QString &message, unsigned int style)
Fired when a message should be reported to the user.
static uint64_t GetTotalBytesRecv()
#define TRY_LOCK(cs, name)
static const int64_t nClientStartupTime
quint64 getTotalBytesRecv() const
const std::string CLIENT_NAME
int getNumConnections(unsigned int flags=CONNECTIONS_ALL) const
Return number of connections, default is in- and outbound (total)
string GetWarnings(string strFor)
Format a string that describes several potential problems detected by the core.
OptionsModel * getOptionsModel()
QString formatClientStartupTime() const
QString getStatusBarWarnings() const
Return warnings to be displayed in status bar.
void numConnectionsChanged(int count)
CChain chainActive
The currently-connected chain of blocks.
bool isReleaseVersion() const
void alertsChanged(const QString &warnings)
QString getNetworkName() const
Return network (main, testnet3, regtest)
void bytesChanged(quint64 totalBytesIn, quint64 totalBytesOut)
bool inInitialBlockDownload() const
Return true if core is doing initial block download.
CBlockIndex * Tip() const
Returns the index entry for the tip of this chain, or NULL if none.
#define CLIENT_VERSION_IS_RELEASE
int Height() const
Return the maximal height in the chain.
double getVerificationProgress() const
ChangeType
General change type (added, updated, removed).
bool IsInitialBlockDownload()
Check whether we are doing an initial block download (synchronizing from disk or network) ...
An alert is a combination of a serialized CUnsignedAlert and a signature.
QDateTime getLastBlockDate() const
void updateAlert(const QString &hash, int status)
void unsubscribeFromCoreSignals()
QString clientName() const
void subscribeToCoreSignals()
QString formatBuildDate() const
static void NotifyAlertChanged(ClientModel *clientmodel, const uint256 &hash, ChangeType status)
static uint64_t GetTotalBytesSent()
std::string GetHex() const
Model for Bitcoin network client.
double GuessVerificationProgress(CBlockIndex *pindex, bool fSigchecks)
static void NotifyBlocksChanged(ClientModel *clientmodel)
static const int MODEL_UPDATE_DELAY
boost::signals2::signal< void(int newNumConnections)> NotifyNumConnectionsChanged
Number of network connections changed.
quint64 getTotalBytesSent() const
ClientModel(OptionsModel *optionsModel, QObject *parent=0)
boost::signals2::signal< void(const uint256 &hash, ChangeType status)> NotifyAlertChanged
New, updated or cancelled alert.
Interface from Qt to configuration data structure for Bitcoin client.
const CChainParams & Params()
Return the currently selected parameters.
static CAlert getAlertByHash(const uint256 &hash)
string FormatFullVersion()
boost::signals2::signal< void()> NotifyBlocksChanged
Block chain changed.
OptionsModel * optionsModel
int getNumBlocksAtStartup()
Information about a peer.
void updateNumConnections(int numConnections)
int64_t GetBlockTime() const
static void NotifyNumConnectionsChanged(ClientModel *clientmodel, int newNumConnections)
QString formatFullVersion() const
CCriticalSection cs_vNodes
enum BlockSource getBlockSource() const
Return true if core is importing blocks.
const std::string CLIENT_DATE