Wireshark 4.7.0
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
 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
parentOptional parent QObject.

Member Function Documentation

◆ filterAcceptsRow()

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

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

Parameters
sourceRowRow index in the source model to evaluate.
sourceParentParent 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
filterTypeThe ext_toolbar_item_t value to accept.

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