mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-12-11 21:22:47 +01:00
Qt: Add GUI view of peer information. #4133
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
#include "clientmodel.h"
|
||||
|
||||
#include "guiconstants.h"
|
||||
#include "peertablemodel.h"
|
||||
|
||||
#include "alert.h"
|
||||
#include "chainparams.h"
|
||||
@@ -22,11 +23,12 @@
|
||||
static const int64_t nClientStartupTime = GetTime();
|
||||
|
||||
ClientModel::ClientModel(OptionsModel *optionsModel, QObject *parent) :
|
||||
QObject(parent), optionsModel(optionsModel),
|
||||
QObject(parent), optionsModel(optionsModel), peerTableModel(0),
|
||||
cachedNumBlocks(0),
|
||||
cachedReindexing(0), cachedImporting(0),
|
||||
numBlocksAtStartup(-1), pollTimer(0)
|
||||
{
|
||||
peerTableModel = new PeerTableModel(this);
|
||||
pollTimer = new QTimer(this);
|
||||
connect(pollTimer, SIGNAL(timeout()), this, SLOT(updateTimer()));
|
||||
pollTimer->start(MODEL_UPDATE_DELAY);
|
||||
@@ -173,6 +175,11 @@ OptionsModel *ClientModel::getOptionsModel()
|
||||
return optionsModel;
|
||||
}
|
||||
|
||||
PeerTableModel *ClientModel::getPeerTableModel()
|
||||
{
|
||||
return peerTableModel;
|
||||
}
|
||||
|
||||
QString ClientModel::formatFullVersion() const
|
||||
{
|
||||
return QString::fromStdString(FormatFullVersion());
|
||||
|
||||
Reference in New Issue
Block a user