5#ifndef BITCOIN_QT_PEERTABLEMODEL_H
6#define BITCOIN_QT_PEERTABLEMODEL_H
11#include <QAbstractTableModel>
71 int rowCount(
const QModelIndex &parent)
const override;
72 int columnCount(
const QModelIndex &parent)
const override;
73 QVariant
data(
const QModelIndex &
index,
int role)
const override;
74 QVariant
headerData(
int section, Qt::Orientation orientation,
75 int role)
const override;
76 QModelIndex
index(
int row,
int column,
77 const QModelIndex &parent)
const override;
78 Qt::ItemFlags
flags(
const QModelIndex &
index)
const override;
79 void sort(
int column, Qt::SortOrder order)
override;
87 const QStringList
columns{tr(
"Peer Id"), tr(
"Address"), tr(
"Network"),
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
Qt::ItemFlags flags(const QModelIndex &index) 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
PeerTableModel(interfaces::Node &node, QObject *parent)
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).
CNodeStateStats nodeStateStats
bool fNodeStateStatsAvailable
POD that contains various stats about a node.