| Wireshark 4.7.3 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 override
| Retrieves the number of rows in the model.
virtual int | columnCount (const QModelIndex &parent=QModelIndex()) const override
| Retrieves the number of columns in the model.
virtual QVariant | data (const QModelIndex &index, int role=Qt::DisplayRole) const override
| 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 override
| 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

  parent | The parent QObject.

## Member Function Documentation

## ◆ addRecord()

void ManufTableModel::addRecord | ( | struct ws_manuf * | ptr | ) |

Adds a new manufacturer record to the model.

Parameters

  ptr | Pointer to the manufacturer structure to add.

## ◆ columnCount()

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

Retrieves the number of columns in the model.

Parameters

  parent | The parent model index, defaults to QModelIndex().

Returns
  The number of columns.

## ◆ data()

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

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

Parameters

  index | The model index.
  role | The display role.

Returns
  The data as a QVariant.

## ◆ headerData()

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

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

Parameters

  section | The section (column or row) index.
  orientation | The orientation (horizontal or vertical).
  role | The display role.

Returns
  The header data as a QVariant.

## ◆ rowCount()

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

Retrieves the number of rows in the model.

Parameters

  parent | The parent model index, defaults to QModelIndex().

Returns
  The number of rows.

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

- /builds/wireshark/wireshark/ui/qt/models/manuf_table_model.h
- /builds/wireshark/wireshark/ui/qt/models/manuf_table_model.cpp