Bitcoin Core  27.99.0
P2P Digital Currency
Public Types | Public Member Functions | List of all members
BanTableModel Class Reference

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

#include <bantablemodel.h>

Inheritance diagram for BanTableModel:
[legend]
Collaboration diagram for BanTableModel:
[legend]

Public Types

enum  ColumnIndex { Address = 0 , Bantime = 1 }
 

Public Member Functions

 BanTableModel (interfaces::Node &node, QObject *parent)
 
 ~BanTableModel ()
 
void startAutoRefresh ()
 
void stopAutoRefresh ()
 

Methods overridden from QAbstractTableModel

interfaces::Nodem_node
 
QStringList columns
 
std::unique_ptr< BanTablePrivpriv
 
int rowCount (const QModelIndex &parent) const override
 
int columnCount (const QModelIndex &parent) const override
 
QVariant data (const QModelIndex &index, int role) const override
 
QVariant headerData (int section, Qt::Orientation orientation, int role) const override
 
QModelIndex index (int row, int column, const QModelIndex &parent) const override
 
Qt::ItemFlags flags (const QModelIndex &index) const override
 
void sort (int column, Qt::SortOrder order) override
 
bool shouldShow ()
 
bool unban (const QModelIndex &index)
 
void refresh ()
 

Detailed Description

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

Used by the rpc console UI.

Definition at line 43 of file bantablemodel.h.

Member Enumeration Documentation

◆ ColumnIndex

Enumerator
Address 
Bantime 

Definition at line 53 of file bantablemodel.h.

Constructor & Destructor Documentation

◆ BanTableModel()

BanTableModel::BanTableModel ( interfaces::Node node,
QObject *  parent 
)
explicit

Definition at line 81 of file bantablemodel.cpp.

Here is the call graph for this function:

◆ ~BanTableModel()

BanTableModel::~BanTableModel ( )
default

Member Function Documentation

◆ columnCount()

int BanTableModel::columnCount ( const QModelIndex &  parent) const
override

Definition at line 102 of file bantablemodel.cpp.

◆ data()

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

Definition at line 110 of file bantablemodel.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ flags()

Qt::ItemFlags BanTableModel::flags ( const QModelIndex &  index) const
override

Definition at line 145 of file bantablemodel.cpp.

Here is the call graph for this function:

◆ headerData()

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

Definition at line 133 of file bantablemodel.cpp.

◆ index()

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

Definition at line 153 of file bantablemodel.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ refresh

void BanTableModel::refresh ( )
slot

Definition at line 163 of file bantablemodel.cpp.

Here is the caller graph for this function:

◆ rowCount()

int BanTableModel::rowCount ( const QModelIndex &  parent) const
override

Definition at line 94 of file bantablemodel.cpp.

◆ shouldShow()

bool BanTableModel::shouldShow ( )

Definition at line 177 of file bantablemodel.cpp.

Here is the caller graph for this function:

◆ sort()

void BanTableModel::sort ( int  column,
Qt::SortOrder  order 
)
override

Definition at line 170 of file bantablemodel.cpp.

Here is the call graph for this function:

◆ startAutoRefresh()

void BanTableModel::startAutoRefresh ( )

◆ stopAutoRefresh()

void BanTableModel::stopAutoRefresh ( )

◆ unban()

bool BanTableModel::unban ( const QModelIndex &  index)

Definition at line 182 of file bantablemodel.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ columns

QStringList BanTableModel::columns
private

Definition at line 78 of file bantablemodel.h.

◆ m_node

interfaces::Node& BanTableModel::m_node
private

Definition at line 77 of file bantablemodel.h.

◆ priv

std::unique_ptr<BanTablePriv> BanTableModel::priv
private

Definition at line 79 of file bantablemodel.h.


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