Tree model that exposes all registered Wireshark protocols and their fields, organised as a parent–child hierarchy suitable for display in the Supported Protocols dialog.
More...
#include <supported_protocols_model.h>
|
| | SupportedProtocolsModel (QObject *parent=Q_NULLPTR) |
| | Constructs an empty model; call populate() to load protocol data.
|
| |
|
virtual | ~SupportedProtocolsModel () |
| | Destroys the model and all tree items.
|
| |
| int | fieldCount () |
| | Returns the total number of protocol fields loaded by populate().
|
| |
| QModelIndex | index (int row, int column, const QModelIndex &parent=QModelIndex()) const |
| | Returns the model index for the item at row and column under parent.
|
| |
| QModelIndex | parent (const QModelIndex &index) const |
| | Returns the parent index of the item at index.
|
| |
| QVariant | data (const QModelIndex &index, int role) const |
| | Returns data for the given model index and role.
|
| |
| QVariant | headerData (int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const |
| | Returns column header labels for the supported-protocols table.
|
| |
| int | rowCount (const QModelIndex &parent=QModelIndex()) const |
| | Returns the number of child rows under parent.
|
| |
| int | columnCount (const QModelIndex &parent=QModelIndex()) const |
| | Returns the number of columns in the model.
|
| |
|
void | populate () |
| | Populates the model by iterating all registered protocols and their fields; must be called before the model is used in a view.
|
| |
Tree model that exposes all registered Wireshark protocols and their fields, organised as a parent–child hierarchy suitable for display in the Supported Protocols dialog.
◆ SupportedProtocolsColumn
Column indices for the supported-protocols tree view.
| Enumerator |
|---|
| colName | Protocol or field name.
|
| colFilter | Filter expression string.
|
| colType | Field type as a human-readable string.
|
| colDescription | Description of the protocol or field.
|
| colLast | Sentinel value; total number of columns.
|
◆ SupportedProtocolsModel()
| SupportedProtocolsModel::SupportedProtocolsModel |
( |
QObject * |
parent = Q_NULLPTR | ) |
|
|
explicit |
Constructs an empty model; call populate() to load protocol data.
- Parameters
-
| parent | Optional parent QObject. |
◆ columnCount()
| int SupportedProtocolsModel::columnCount |
( |
const QModelIndex & |
parent = QModelIndex() | ) |
const |
Returns the number of columns in the model.
- Parameters
-
- Returns
- Number of columns (colLast).
◆ data()
| QVariant SupportedProtocolsModel::data |
( |
const QModelIndex & |
index, |
|
|
int |
role |
|
) |
| const |
Returns data for the given model index and role.
- Parameters
-
| index | Model index of the cell to query. |
| role | Qt item data role. |
- Returns
- The requested data, or an invalid QVariant if not applicable.
◆ fieldCount()
| int SupportedProtocolsModel::fieldCount |
( |
| ) |
|
|
inline |
Returns the total number of protocol fields loaded by populate().
- Returns
- Field count across all protocols.
◆ headerData()
| QVariant SupportedProtocolsModel::headerData |
( |
int |
section, |
|
|
Qt::Orientation |
orientation, |
|
|
int |
role = Qt::DisplayRole |
|
) |
| const |
Returns column header labels for the supported-protocols table.
- Parameters
-
| section | Column index. |
| orientation | Qt::Horizontal for column headers. |
| role | Qt item data role. |
- Returns
- Header label string, or an invalid QVariant if not applicable.
◆ index()
| QModelIndex SupportedProtocolsModel::index |
( |
int |
row, |
|
|
int |
column, |
|
|
const QModelIndex & |
parent = QModelIndex() |
|
) |
| const |
Returns the model index for the item at row and column under parent.
- Parameters
-
| row | Row within the parent item. |
| column | Column index. |
| parent | Parent model index; invalid index for top-level items. |
- Returns
- Model index for the requested item.
◆ parent()
| QModelIndex SupportedProtocolsModel::parent |
( |
const QModelIndex & |
index | ) |
const |
Returns the parent index of the item at index.
- Parameters
-
- Returns
- Parent model index, or an invalid index for top-level items.
◆ rowCount()
| int SupportedProtocolsModel::rowCount |
( |
const QModelIndex & |
parent = QModelIndex() | ) |
const |
Returns the number of child rows under parent.
- Parameters
-
| parent | Parent model index; invalid index for the root. |
- Returns
- Number of child items.
The documentation for this class was generated from the following files:
- /builds/wireshark/wireshark/ui/qt/models/supported_protocols_model.h
- /builds/wireshark/wireshark/ui/qt/models/supported_protocols_model.cpp