Qt: Add GUI view of peer information. #4133

This commit is contained in:
Ashley Holman
2014-05-23 12:09:59 -05:00
parent 9d97e83bf6
commit 65f78a111f
10 changed files with 870 additions and 12 deletions

View File

@@ -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());