5#ifndef BITCOIN_QT_PEERTABLEMODEL_H
6#define BITCOIN_QT_PEERTABLEMODEL_H
11#include <QAbstractTableModel>
75 int role)
const override;
79 void sort(
int column, Qt::SortOrder order)
override;
88 tr(
"Ping"),
tr(
"Sent"),
tr(
"Received"),
90 std::unique_ptr<PeerTablePriv>
priv;
bool operator()(const CNodeCombinedStats &left, const CNodeCombinedStats &right) const
NodeLessThan(int nColumn, Qt::SortOrder fOrder)
Qt model providing information about connected peers, similar to the "getpeerinfo" RPC call.
QVariant data(const QModelIndex &index, int role) const override
int columnCount(const QModelIndex &parent) const override
interfaces::Node & m_node
QModelIndex index(int row, int column, const QModelIndex &parent) const override
void sort(int column, Qt::SortOrder order) override
QVariant headerData(int section, Qt::Orientation orientation, int role) const override
const CNodeCombinedStats * getNodeStats(int idx)
const QStringList columns
int getRowByNodeId(NodeId nodeid)
int rowCount(const QModelIndex &parent) const override
std::unique_ptr< PeerTablePriv > priv
Top-level interface for a bitcoin node (bitcoind process).
T GetRand(T nMax=std::numeric_limits< T >::max()) noexcept
Generate a uniform random integer of type T in the range [0..nMax) nMax defaults to std::numeric_limi...
CNodeStateStats nodeStateStats
bool fNodeStateStatsAvailable
POD that contains various stats about a node.