Dash Core Source Documentation (0.16.0.1)

Find detailed information regarding the Dash Core source code.

Qt model providing information about connected peers, similar to the "getpeerinfo" RPC call. More...

#include <peertablemodel.h>

+ Inheritance diagram for PeerTableModel:
+ Collaboration diagram for PeerTableModel:

Public Types

enum  ColumnIndex {
  NetNodeId = 0, Address = 1, Ping = 2, Sent = 3,
  Received = 4, Subversion = 5
}
 

Public Slots

void refresh ()
 

Public Member Functions

 PeerTableModel (ClientModel *parent=0)
 
 ~PeerTableModel ()
 
const CNodeCombinedStatsgetNodeStats (int idx)
 
int getRowByNodeId (NodeId nodeid)
 
void startAutoRefresh ()
 
void stopAutoRefresh ()
 
Methods overridden from QAbstractTableModel
int rowCount (const QModelIndex &parent) const
 
int columnCount (const QModelIndex &parent) const
 
QVariant data (const QModelIndex &index, int role) const
 
QVariant headerData (int section, Qt::Orientation orientation, int role) const
 
QModelIndex index (int row, int column, const QModelIndex &parent) const
 
Qt::ItemFlags flags (const QModelIndex &index) const
 
void sort (int column, Qt::SortOrder order)
 

Private Attributes

ClientModelclientModel
 
QStringList columns
 
std::unique_ptr< PeerTablePrivpriv
 
QTimer * timer
 

Detailed Description

Qt model providing information about connected peers, similar to the "getpeerinfo" RPC call.

Used by the rpc console UI.

Definition at line 45 of file peertablemodel.h.

Member Enumeration Documentation

◆ ColumnIndex

Enumerator
NetNodeId 
Address 
Ping 
Sent 
Received 
Subversion 

Definition at line 57 of file peertablemodel.h.

Constructor & Destructor Documentation

◆ PeerTableModel()

PeerTableModel::PeerTableModel ( ClientModel parent = 0)
explicit

Definition at line 116 of file peertablemodel.cpp.

References columns, MODEL_UPDATE_DELAY, priv, refresh(), and timer.

◆ ~PeerTableModel()

PeerTableModel::~PeerTableModel ( )

Definition at line 135 of file peertablemodel.cpp.

Member Function Documentation

◆ columnCount()

int PeerTableModel::columnCount ( const QModelIndex &  parent) const

Definition at line 156 of file peertablemodel.cpp.

References columns.

◆ data()

◆ flags()

Qt::ItemFlags PeerTableModel::flags ( const QModelIndex &  index) const

Definition at line 211 of file peertablemodel.cpp.

References index().

◆ getNodeStats()

const CNodeCombinedStats * PeerTableModel::getNodeStats ( int  idx)

◆ getRowByNodeId()

int PeerTableModel::getRowByNodeId ( NodeId  nodeid)

Definition at line 242 of file peertablemodel.cpp.

References priv.

Referenced by RPCConsole::banSelectedNode(), and RPCConsole::peerLayoutChanged().

◆ headerData()

QVariant PeerTableModel::headerData ( int  section,
Qt::Orientation  orientation,
int  role 
) const

Definition at line 199 of file peertablemodel.cpp.

References columns.

◆ index()

QModelIndex PeerTableModel::index ( int  row,
int  column,
const QModelIndex &  parent 
) const

Definition at line 220 of file peertablemodel.cpp.

References data(), and priv.

Referenced by data(), and flags().

◆ refresh

void PeerTableModel::refresh ( )
slot

Definition at line 235 of file peertablemodel.cpp.

References priv.

Referenced by PeerTableModel(), and sort().

◆ rowCount()

int PeerTableModel::rowCount ( const QModelIndex &  parent) const

Definition at line 150 of file peertablemodel.cpp.

References priv.

◆ sort()

void PeerTableModel::sort ( int  column,
Qt::SortOrder  order 
)

Definition at line 251 of file peertablemodel.cpp.

References priv, and refresh().

◆ startAutoRefresh()

void PeerTableModel::startAutoRefresh ( )

Definition at line 140 of file peertablemodel.cpp.

References timer.

Referenced by RPCConsole::showEvent().

◆ stopAutoRefresh()

void PeerTableModel::stopAutoRefresh ( )

Definition at line 145 of file peertablemodel.cpp.

References timer.

Referenced by RPCConsole::hideEvent().

Member Data Documentation

◆ clientModel

ClientModel* PeerTableModel::clientModel
private

Definition at line 81 of file peertablemodel.h.

◆ columns

QStringList PeerTableModel::columns
private

Definition at line 82 of file peertablemodel.h.

Referenced by columnCount(), headerData(), and PeerTableModel().

◆ priv

std::unique_ptr<PeerTablePriv> PeerTableModel::priv
private

◆ timer

QTimer* PeerTableModel::timer
private

Definition at line 84 of file peertablemodel.h.

Referenced by PeerTableModel(), startAutoRefresh(), and stopAutoRefresh().


The documentation for this class was generated from the following files:
Released under the MIT license