Wireshark 4.7.0
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | List of all members
ExportObjectProxyModel Class Reference

A proxy model used for sorting and filtering export objects. More...

#include <export_objects_model.h>

Inheritance diagram for ExportObjectProxyModel:

Public Member Functions

 ExportObjectProxyModel (QObject *parent=Q_NULLPTR)
 Constructs a new ExportObjectProxyModel.
 
void setContentFilterString (QString contentFilter)
 Sets the filter string used for matching content types.
 
void setTextFilterString (QString textFilter)
 Sets the text filter string used for general searching.
 
void setUniqueFilter (bool unique)
 Sets the filter to determine whether to show only unique items.
 

Protected Member Functions

bool lessThan (const QModelIndex &source_left, const QModelIndex &source_right) const
 Compares two source indices to determine their sort order.
 
bool filterAcceptsRow (int source_row, const QModelIndex &source_parent) const
 Determines whether a row from the source model matches the active filters and should be displayed.
 

Detailed Description

A proxy model used for sorting and filtering export objects.

Constructor & Destructor Documentation

◆ ExportObjectProxyModel()

ExportObjectProxyModel::ExportObjectProxyModel ( QObject *  parent = Q_NULLPTR)
explicit

Constructs a new ExportObjectProxyModel.

Parameters
parentThe parent QObject, defaults to Q_NULLPTR.

Member Function Documentation

◆ filterAcceptsRow()

bool ExportObjectProxyModel::filterAcceptsRow ( int  source_row,
const QModelIndex &  source_parent 
) const
protected

Determines whether a row from the source model matches the active filters and should be displayed.

Parameters
source_rowThe row in the source model.
source_parentThe parent index in the source model.
Returns
True if the row is accepted, false otherwise.

◆ lessThan()

bool ExportObjectProxyModel::lessThan ( const QModelIndex &  source_left,
const QModelIndex &  source_right 
) const
protected

Compares two source indices to determine their sort order.

Parameters
source_leftThe first source index.
source_rightThe second source index.
Returns
True if the left item should appear before the right item.

◆ setContentFilterString()

void ExportObjectProxyModel::setContentFilterString ( QString  contentFilter)

Sets the filter string used for matching content types.

Parameters
contentFilterThe content type filter string.

◆ setTextFilterString()

void ExportObjectProxyModel::setTextFilterString ( QString  textFilter)

Sets the text filter string used for general searching.

Parameters
textFilterThe general text filter string.

◆ setUniqueFilter()

void ExportObjectProxyModel::setUniqueFilter ( bool  unique)

Sets the filter to determine whether to show only unique items.

Parameters
uniqueTrue to filter out non-unique items, false otherwise.

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