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

Proxy model handling sorting, filtering, and column visibility for traffic data. More...

#include <traffic_tree.h>

Inheritance diagram for TrafficDataFilterProxy:

Public Types

enum  { TRAFFIC_DATA_LESS , TRAFFIC_DATA_GREATER , TRAFFIC_DATA_EQUAL }
 Types of filtering operations available for traffic data. More...
 

Public Slots

void filterForColumn (int column, int filterOn, QString filterText)
 Applies filtering criteria for a specific column.
 

Public Member Functions

 TrafficDataFilterProxy (QObject *parent=nullptr)
 Constructs a new TrafficDataFilterProxy.
 
void setColumnVisibility (int column, bool visible)
 Sets the visibility for a specific column.
 
bool columnVisible (int column) const
 Checks if a column is currently visible.
 

Protected Member Functions

virtual bool filterAcceptsRow (int source_row, const QModelIndex &source_parent) const
 Determines if a row from the source model should be included.
 
virtual bool filterAcceptsColumn (int source_column, const QModelIndex &source_parent) const
 Determines if a column from the source model should be included.
 
virtual bool lessThan (const QModelIndex &source_left, const QModelIndex &source_right) const
 Compares two items for sorting.
 

Detailed Description

Proxy model handling sorting, filtering, and column visibility for traffic data.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum

Types of filtering operations available for traffic data.

Enumerator
TRAFFIC_DATA_LESS 

Filter for values strictly less than the target.

TRAFFIC_DATA_GREATER 

Filter for values strictly greater than the target.

TRAFFIC_DATA_EQUAL 

Filter for values equal to the target.

Constructor & Destructor Documentation

◆ TrafficDataFilterProxy()

TrafficDataFilterProxy::TrafficDataFilterProxy ( QObject *  parent = nullptr)

Constructs a new TrafficDataFilterProxy.

Parameters
parentThe parent QObject, defaults to nullptr.

Member Function Documentation

◆ columnVisible()

bool TrafficDataFilterProxy::columnVisible ( int  column) const

Checks if a column is currently visible.

Parameters
columnThe column index.
Returns
True if visible, false otherwise.

◆ filterAcceptsColumn()

bool TrafficDataFilterProxy::filterAcceptsColumn ( int  source_column,
const QModelIndex &  source_parent 
) const
protectedvirtual

Determines if a column from the source model should be included.

Parameters
source_columnThe source column index.
source_parentThe source parent index.
Returns
True if the column is accepted, false otherwise.

◆ filterAcceptsRow()

bool TrafficDataFilterProxy::filterAcceptsRow ( int  source_row,
const QModelIndex &  source_parent 
) const
protectedvirtual

Determines if a row from the source model should be included.

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

◆ filterForColumn

void TrafficDataFilterProxy::filterForColumn ( int  column,
int  filterOn,
QString  filterText 
)
slot

Applies filtering criteria for a specific column.

Parameters
columnThe column index to filter.
filterOnThe filter operation type (e.g., less, greater, equal).
filterTextThe text value to filter against.

◆ lessThan()

bool TrafficDataFilterProxy::lessThan ( const QModelIndex &  source_left,
const QModelIndex &  source_right 
) const
protectedvirtual

Compares two items for sorting.

Parameters
source_leftThe left model index.
source_rightThe right model index.
Returns
True if the left item is less than the right item, false otherwise.

◆ setColumnVisibility()

void TrafficDataFilterProxy::setColumnVisibility ( int  column,
bool  visible 
)

Sets the visibility for a specific column.

Parameters
columnThe column index.
visibleTrue to show the column, false to hide it.

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