19 QObject(parent), optionsModel(optionsModel),
20 cachedNumBlocks(0), cachedNumBlocksOfPeers(0),
21 cachedReindexing(0), cachedImporting(0),
22 numBlocksAtStartup(-1), pollTimer(0)
25 pollTimer->setInterval(MODEL_UPDATE_DELAY);
58 return QDateTime::fromTime_t(1231006505);
60 return QDateTime::fromTime_t(1296688602);
85 emit
numBlocksChanged(newNumBlocks, std::max(newNumBlocksOfPeers, newNumBlocks));
100 hash_256.
SetHex(hash.toStdString());
140 return QString::fromStdString(
GetWarnings(
"statusbar"));
170 return QDateTime::fromTime_t(nClientStartupTime).toString();
174 static void NotifyBlocksChanged(
ClientModel *clientmodel)
180 static void NotifyNumConnectionsChanged(
ClientModel *clientmodel,
int newNumConnections)
183 QMetaObject::invokeMethod(clientmodel,
"updateNumConnections", Qt::QueuedConnection,
184 Q_ARG(
int, newNumConnections));
190 QMetaObject::invokeMethod(clientmodel,
"updateAlert", Qt::QueuedConnection,
191 Q_ARG(QString, QString::fromStdString(hash.
GetHex())),
void SetHex(const char *psz)
void message(const QString &title, const QString &message, unsigned int style)
Asynchronous message notification.
int64 GetBlockTime() const
const std::string CLIENT_NAME
string GetWarnings(string strFor)
OptionsModel * getOptionsModel()
QString formatClientStartupTime() const
int getNumBlocksOfPeers() const
Return conservative estimate of total number of blocks, or 0 if unknown.
QString getStatusBarWarnings() const
Return warnings to be displayed in status bar.
void numConnectionsChanged(int count)
bool isReleaseVersion() const
void numBlocksChanged(int count, int countOfPeers)
void alertsChanged(const QString &warnings)
#define CLIENT_VERSION_IS_RELEASE
bool inInitialBlockDownload() const
Return true if core is doing initial block download.
int getNumConnections() const
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
int GetNumBlocksOfPeers()
Get the number of active peers.
void updateAlert(const QString &hash, int status)
CClientUIInterface uiInterface
void unsubscribeFromCoreSignals()
QString clientName() const
void subscribeToCoreSignals()
QString formatBuildDate() const
std::string GetHex() const
Model for Bitcoin network client.
int OutputDebugStringF(const char *pszFormat,...)
boost::signals2::signal< void(int newNumConnections)> NotifyNumConnectionsChanged
Number of network connections changed.
int cachedNumBlocksOfPeers
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.
static CAlert getAlertByHash(const uint256 &hash)
string FormatFullVersion()
bool isTestNet() const
Return true if client connected to testnet.
boost::signals2::signal< void()> NotifyBlocksChanged
Block chain changed.
OptionsModel * optionsModel
int getNumBlocksAtStartup()
void updateNumConnections(int numConnections)
QString formatFullVersion() const
double GuessVerificationProgress(CBlockIndex *pindex)
enum BlockSource getBlockSource() const
Return true if core is importing blocks.
const std::string CLIENT_DATE