Dash Core  0.12.2.1
P2P Digital Currency
PeerTableModel Class Reference

#include <peertablemodel.h>

+ Inheritance diagram for PeerTableModel:

Public Types

enum  ColumnIndex { NetNodeId = 0, Address = 1, Subversion = 2, Ping = 3 }
 

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 43 of file peertablemodel.h.

Member Enumeration Documentation

◆ ColumnIndex

Enumerator
NetNodeId 
Address 
Subversion 
Ping 

Definition at line 55 of file peertablemodel.h.

Constructor & Destructor Documentation

◆ PeerTableModel()

PeerTableModel::PeerTableModel ( ClientModel parent = 0)
explicit

Definition at line 112 of file peertablemodel.cpp.

◆ ~PeerTableModel()

PeerTableModel::~PeerTableModel ( )

Definition at line 131 of file peertablemodel.cpp.

Member Function Documentation

◆ columnCount()

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

Definition at line 152 of file peertablemodel.cpp.

◆ data()

QVariant PeerTableModel::data ( const QModelIndex &  index,
int  role 
) const

Definition at line 158 of file peertablemodel.cpp.

Referenced by index().

◆ flags()

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

Definition at line 197 of file peertablemodel.cpp.

◆ getNodeStats()

const CNodeCombinedStats * PeerTableModel::getNodeStats ( int  idx)

◆ getRowByNodeId()

int PeerTableModel::getRowByNodeId ( NodeId  nodeid)

◆ headerData()

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

Definition at line 185 of file peertablemodel.cpp.

◆ index()

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

Definition at line 206 of file peertablemodel.cpp.

Referenced by data(), and flags().

◆ refresh

void PeerTableModel::refresh ( )
slot

Definition at line 221 of file peertablemodel.cpp.

Referenced by PeerTableModel(), and sort().

◆ rowCount()

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

Definition at line 146 of file peertablemodel.cpp.

◆ sort()

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

Definition at line 237 of file peertablemodel.cpp.

◆ startAutoRefresh()

void PeerTableModel::startAutoRefresh ( )

Definition at line 136 of file peertablemodel.cpp.

Referenced by RPCConsole::showEvent().

◆ stopAutoRefresh()

void PeerTableModel::stopAutoRefresh ( )

Definition at line 141 of file peertablemodel.cpp.

Referenced by RPCConsole::hideEvent().

Member Data Documentation

◆ clientModel

ClientModel* PeerTableModel::clientModel
private

Definition at line 77 of file peertablemodel.h.

◆ columns

QStringList PeerTableModel::columns
private

Definition at line 78 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 80 of file peertablemodel.h.

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


The documentation for this class was generated from the following files: