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

A table model for managing and displaying MAC address manufacturer data. More...

#include <manuf_table_model.h>

Inheritance diagram for ManufTableModel:

Public Types

enum  { COL_MAC_PREFIX , COL_SHORT_NAME , COL_VENDOR_NAME , NUM_COLS }
 Enumeration of the columns available in the table. More...
 

Public Member Functions

 ManufTableModel (QObject *parent)
 Constructs a new ManufTableModel.
 
 ~ManufTableModel ()
 Destroys the ManufTableModel.
 
virtual int rowCount (const QModelIndex &parent=QModelIndex()) const
 Retrieves the number of rows in the model.
 
virtual int columnCount (const QModelIndex &parent=QModelIndex()) const
 Retrieves the number of columns in the model.
 
virtual QVariant data (const QModelIndex &index, int role=Qt::DisplayRole) const
 Retrieves the data stored under the given role for the item referred to by the index.
 
virtual QVariant headerData (int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const
 Retrieves the header data for the given section, orientation, and role.
 
void addRecord (struct ws_manuf *ptr)
 Adds a new manufacturer record to the model.
 
void clear ()
 Clears all records from the model.
 

Detailed Description

A table model for managing and displaying MAC address manufacturer data.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum

Enumeration of the columns available in the table.

Enumerator
COL_MAC_PREFIX 

The column displaying the MAC address prefix.

COL_SHORT_NAME 

The column displaying the short name.

COL_VENDOR_NAME 

The column displaying the full vendor name.

NUM_COLS 

The total number of columns.

Constructor & Destructor Documentation

◆ ManufTableModel()

ManufTableModel::ManufTableModel ( QObject *  parent)

Constructs a new ManufTableModel.

Parameters
parentThe parent QObject.

Member Function Documentation

◆ addRecord()

void ManufTableModel::addRecord ( struct ws_manuf ptr)

Adds a new manufacturer record to the model.

Parameters
ptrPointer to the manufacturer structure to add.

◆ columnCount()

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

Retrieves the number of columns in the model.

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

◆ data()

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

Retrieves the data stored under the given role for the item referred to by the index.

Parameters
indexThe model index.
roleThe display role.
Returns
The data as a QVariant.

◆ headerData()

QVariant ManufTableModel::headerData ( int  section,
Qt::Orientation  orientation,
int  role = Qt::DisplayRole 
) const
virtual

Retrieves the header data for the given section, orientation, and role.

Parameters
sectionThe section (column or row) index.
orientationThe orientation (horizontal or vertical).
roleThe display role.
Returns
The header data as a QVariant.

◆ rowCount()

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

Retrieves the number of rows in the model.

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

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