| Wireshark 4.7.3 The Wireshark network protocol analyzer

Loading...
Searching...
No Matches
Public Member Functions | List of all members
PluginIfTypeSortFilterProxyModel Class Reference

Sort/filter proxy that restricts a PluginIfTypeModel to a single item type. More...

`#include <pluginifdemo_main.h>`

Inheritance diagram for PluginIfTypeSortFilterProxyModel:

## Public Member Functions
| PluginIfTypeSortFilterProxyModel (QObject *parent=0)
| Constructs the proxy model with no active filter.
bool | filterAcceptsRow (int sourceRow, const QModelIndex &sourceParent) const override
| Determines whether the given source row should be included in the filtered view.
void | setFilterElement (ext_toolbar_item_t filterType)
| Sets the item type to filter on; only rows matching this type will be shown.

## Detailed Description

Sort/filter proxy that restricts a PluginIfTypeModel to a single item type.

## Constructor & Destructor Documentation

## ◆ PluginIfTypeSortFilterProxyModel()

PluginIfTypeSortFilterProxyModel::PluginIfTypeSortFilterProxyModel | ( | QObject * | parent = 0 | ) |

Constructs the proxy model with no active filter.

Parameters

  parent | Optional parent QObject.

## Member Function Documentation

## ◆ filterAcceptsRow()

bool PluginIfTypeSortFilterProxyModel::filterAcceptsRow | ( | int | sourceRow,
|  | const QModelIndex & | sourceParent ) const
| override

Determines whether the given source row should be included in the filtered view.

Parameters

  sourceRow | Row index in the source model to evaluate.
  sourceParent | Parent index in the source model (unused for list models).

Returns
  `true` if the row's item type matches the active filter; `false` otherwise.

## ◆ setFilterElement()

void PluginIfTypeSortFilterProxyModel::setFilterElement | ( | ext_toolbar_item_t | filterType | ) |

Sets the item type to filter on; only rows matching this type will be shown.

Parameters

  filterType | The ext_toolbar_item_t value to accept.

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

- /builds/wireshark/wireshark/plugins/ui/pluginifdemo/ui/pluginifdemo_main.h
- /builds/wireshark/wireshark/plugins/ui/pluginifdemo/ui/pluginifdemo_main.cpp