Sort/filter proxy model for SupportedProtocolsModel that performs case-insensitive substring filtering across name, filter, type, and description columns, and provides natural sorting for each column.
More...
#include <supported_protocols_model.h>
|
| | SupportedProtocolsProxyModel (QObject *parent=Q_NULLPTR) |
| | Constructs the proxy model.
|
| |
| virtual bool | filterAcceptsRow (int sourceRow, const QModelIndex &sourceParent) const |
| | Determines whether the source row should be visible given the current filter.
|
| |
| void | setFilter (const QString &filter) |
| | Sets the text filter used to match protocols and fields. An empty string shows all items.
|
| |
Sort/filter proxy model for SupportedProtocolsModel that performs case-insensitive substring filtering across name, filter, type, and description columns, and provides natural sorting for each column.
◆ SupportedProtocolsProxyModel()
| SupportedProtocolsProxyModel::SupportedProtocolsProxyModel |
( |
QObject * |
parent = Q_NULLPTR | ) |
|
|
explicit |
Constructs the proxy model.
- Parameters
-
| parent | Optional parent QObject. |
◆ filterAcceptItem()
Tests whether a single SupportedProtocolsItem matches the current filter.
- Parameters
-
- Returns
true if any of the item's visible fields contain the filter string.
◆ filterAcceptsRow()
| bool SupportedProtocolsProxyModel::filterAcceptsRow |
( |
int |
sourceRow, |
|
|
const QModelIndex & |
sourceParent |
|
) |
| const |
|
virtual |
Determines whether the source row should be visible given the current filter.
- Parameters
-
| sourceRow | Row index in the source model. |
| sourceParent | Parent index in the source model. |
- Returns
true if the row or any of its descendants match the filter.
◆ lessThan()
| bool SupportedProtocolsProxyModel::lessThan |
( |
const QModelIndex & |
source_left, |
|
|
const QModelIndex & |
source_right |
|
) |
| const |
|
protected |
Compares two source rows for sorting using the active sort column.
- Parameters
-
| source_left | Index of the left-hand item in the source model. |
| source_right | Index of the right-hand item in the source model. |
- Returns
true if source_left should sort before source_right.
◆ setFilter()
| void SupportedProtocolsProxyModel::setFilter |
( |
const QString & |
filter | ) |
|
Sets the text filter used to match protocols and fields. An empty string shows all items.
- Parameters
-
| filter | Case-insensitive substring to match against item data. |
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