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

A tree model providing data for the registered dissector tables. More...

#include <dissector_tables_model.h>

Inheritance diagram for DissectorTablesModel:

Public Types

enum  DissectorTablesColumn { colTableName = 0 , colDissectorDescription , colLast }
 Enumeration of the columns available in the model. More...
 

Public Member Functions

 DissectorTablesModel (QObject *parent=Q_NULLPTR)
 Constructs a new DissectorTablesModel.
 
virtual ~DissectorTablesModel ()
 Destroys the DissectorTablesModel.
 
QModelIndex index (int row, int column, const QModelIndex &parent=QModelIndex()) const
 Generates an index for the specified row and column.
 
QModelIndex parent (const QModelIndex &index) const
 Retrieves the parent index for the given index.
 
QVariant data (const QModelIndex &index, int role) const
 Retrieves data from the model for a given index and role.
 
int rowCount (const QModelIndex &parent=QModelIndex()) const
 Returns the number of rows under the given parent.
 
int columnCount (const QModelIndex &parent=QModelIndex()) const
 Returns the number of columns under the given parent.
 
void populate ()
 Populates the model with the currently registered dissector tables.
 

Detailed Description

A tree model providing data for the registered dissector tables.

Member Enumeration Documentation

◆ DissectorTablesColumn

Enumeration of the columns available in the model.

Enumerator
colTableName 

Column for the table name.

colDissectorDescription 

Column for the dissector description.

colLast 

Maximum column index marker.

Constructor & Destructor Documentation

◆ DissectorTablesModel()

DissectorTablesModel::DissectorTablesModel ( QObject *  parent = Q_NULLPTR)
explicit

Constructs a new DissectorTablesModel.

Parameters
parentThe parent QObject, defaults to Q_NULLPTR.

Member Function Documentation

◆ columnCount()

int DissectorTablesModel::columnCount ( const QModelIndex &  parent = QModelIndex()) const

Returns the number of columns under the given parent.

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

◆ data()

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

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

Parameters
indexThe model index.
roleThe requested data role.
Returns
The data associated with the index and role.

◆ index()

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

Generates an index for the specified row and column.

Parameters
rowThe row number.
columnThe column number.
parentThe parent index (defaults to an invalid QModelIndex).
Returns
The generated model index.

◆ parent()

QModelIndex DissectorTablesModel::parent ( const QModelIndex &  index) const

Retrieves the parent index for the given index.

Parameters
indexThe child model index.
Returns
The parent model index.

◆ rowCount()

int DissectorTablesModel::rowCount ( const QModelIndex &  parent = QModelIndex()) const

Returns the number of rows under the given parent.

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

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