Wireshark 4.7.0
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
Public Member Functions | List of all members
CaptureInfoModel Class Reference

A table model for displaying active capture information and statistics. More...

#include <capture_info_dialog.h>

Inheritance diagram for CaptureInfoModel:

Public Member Functions

 CaptureInfoModel (struct _capture_info *cap_info, QObject *parent=Q_NULLPTR)
 Constructs a new CaptureInfoModel.
 
virtual ~CaptureInfoModel ()
 Destroys the CaptureInfoModel.
 
void updateInfo ()
 Updates the model with the latest capture information.
 
virtual int rowCount (const QModelIndex &parent=QModelIndex()) const
 Returns the number of rows under the given parent.
 
virtual int columnCount (const QModelIndex &parent=QModelIndex()) const
 Returns the number of columns under the given parent.
 
virtual QVariant data (const QModelIndex &index, int role=Qt::DisplayRole) const
 Retrieves data from the model for the given index and role.
 

Detailed Description

A table model for displaying active capture information and statistics.

Constructor & Destructor Documentation

◆ CaptureInfoModel()

CaptureInfoModel::CaptureInfoModel ( struct _capture_info cap_info,
QObject *  parent = Q_NULLPTR 
)
explicit

Constructs a new CaptureInfoModel.

Parameters
cap_infoPointer to the capture information structure.
parentThe parent QObject, defaults to Q_NULLPTR.

Member Function Documentation

◆ columnCount()

int CaptureInfoModel::columnCount ( const QModelIndex &  parent = QModelIndex()) const
virtual

Returns the number of columns under the given parent.

Parameters
parentThe parent model index (defaults to an invalid QModelIndex).
Returns
The number of columns in the model.

◆ data()

QVariant CaptureInfoModel::data ( const QModelIndex &  index,
int  role = Qt::DisplayRole 
) const
virtual

Retrieves data from the model for the given index and role.

Parameters
indexThe model index to retrieve data for.
roleThe role for which the data is requested (defaults to Qt::DisplayRole).
Returns
The data associated with the index and role.

◆ rowCount()

int CaptureInfoModel::rowCount ( const QModelIndex &  parent = QModelIndex()) const
virtual

Returns the number of rows under the given parent.

Parameters
parentThe parent model index (defaults to an invalid QModelIndex).
Returns
The number of rows in the model.

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