A proxy model used for filtering and sorting the enabled protocols model.
More...
#include <enabled_protocols_model.h>
|
| bool | lessThan (const QModelIndex &source_left, const QModelIndex &source_right) const override |
| | Compares two source indices to determine their sort order.
|
| |
A proxy model used for filtering and sorting the enabled protocols model.
◆ EnableType
Defines the action type when batch enabling/disabling items.
| Enumerator |
|---|
| Enable | Enable items.
|
| Disable | Disable items.
|
| Invert | Invert the enable state.
|
◆ SearchType
Defines the search filtering scope.
| Enumerator |
|---|
| EveryWhere | Search all text fields.
|
| OnlyProtocol | Search only protocol names.
|
| OnlyDescription | Search only protocol descriptions.
|
| EnabledItems | Show only enabled items.
|
| DisabledItems | Show only disabled items.
|
◆ EnabledProtocolsProxyModel()
| EnabledProtocolsProxyModel::EnabledProtocolsProxyModel |
( |
QObject * |
parent = Q_NULLPTR | ) |
|
|
explicit |
◆ filterAcceptsRow()
| bool EnabledProtocolsProxyModel::filterAcceptsRow |
( |
int |
sourceRow, |
|
|
const QModelIndex & |
sourceParent |
|
) |
| const |
|
overridevirtual |
Determines whether a row from the source model should be displayed.
- Parameters
-
| sourceRow | The row in the source model. |
| sourceParent | The parent index in the source model. |
- Returns
- True if the row is accepted, false otherwise.
◆ flags()
| Qt::ItemFlags EnabledProtocolsProxyModel::flags |
( |
const QModelIndex & |
index | ) |
const |
|
overridevirtual |
Retrieves item flags, taking into account any proxy state modifications.
- Parameters
-
| index | The proxy model index. |
- Returns
- The item flags.
◆ lessThan()
| bool EnabledProtocolsProxyModel::lessThan |
( |
const QModelIndex & |
source_left, |
|
|
const QModelIndex & |
source_right |
|
) |
| const |
|
overrideprotected |
Compares two source indices to determine their sort order.
- Parameters
-
| source_left | The first source index. |
| source_right | The second source index. |
- Returns
- True if the left item should appear before the right item.
◆ setFilter()
Sets the active filter criteria.
- Parameters
-
| filter | The text/pattern to filter by. |
| type | The search scope for the text. |
| protocolType | The specific protocol type (e.g., Any, Standard) to filter by. |
◆ setItemsEnable()
Applies an enable/disable action to a parent item and all its children.
- Parameters
-
| enable | The action to apply (Enable, Disable, Invert). |
| parent | The parent model index to act upon (defaults to root). |
The documentation for this class was generated from the following files:
- /builds/wireshark/wireshark/ui/qt/models/enabled_protocols_model.h
- /builds/wireshark/wireshark/ui/qt/models/enabled_protocols_model.cpp