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

A proxy model used for sorting and filtering expert information data. More...

#include <expert_info_proxy_model.h>

Inheritance diagram for ExpertInfoProxyModel:

Public Types

enum  SeverityMode { Group , Packet }
 Defines the mode for displaying and evaluating severities. More...
 
enum  ExpertProxyColumn {
  colProxySeverity = 0 , colProxySummary , colProxyGroup , colProxyProtocol ,
  colProxyCount , colProxyLast
}
 Enumerates the columns exposed by the proxy model. More...
 

Public Member Functions

 ExpertInfoProxyModel (QObject *parent=0)
 Constructs a new ExpertInfoProxyModel.
 
QVariant data (const QModelIndex &index, int role) const
 Retrieves data from the proxy model for a given index and role.
 
QVariant headerData (int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const
 Retrieves the header data for a specific section and role.
 
int columnCount (const QModelIndex &parent=QModelIndex()) const
 Returns the number of columns under a given parent.
 
bool hasChildren (const QModelIndex &parent=QModelIndex()) const
 Checks if a given parent index has any child elements.
 
virtual bool filterAcceptsRow (int sourceRow, const QModelIndex &sourceParent) const
 Determines whether a row from the source model should be displayed.
 
void setSeverityMode (enum SeverityMode mode)
 Sets the severity mode for the proxy model.
 
void setSeverityFilter (int severity, bool hide)
 Sets whether a specific severity level should be hidden or shown.
 
void setSummaryFilter (const QString &filter)
 Sets the text filter used to filter items by their summary.
 

Protected Member Functions

bool lessThan (const QModelIndex &source_left, const QModelIndex &source_right) const
 Compares two source indices to determine their sort order.
 
bool filterAcceptItem (ExpertPacketItem &item) const
 Checks if an individual expert packet item matches the current filter criteria.
 

Protected Attributes

enum SeverityMode severityMode_
 
QList< int > hidden_severities_
 
QString textFilter_
 

Detailed Description

A proxy model used for sorting and filtering expert information data.

Member Enumeration Documentation

◆ ExpertProxyColumn

Enumerates the columns exposed by the proxy model.

Enumerator
colProxySeverity 

Severity column.

colProxySummary 

Summary text column.

colProxyGroup 

Group ID column.

colProxyProtocol 

Protocol string column.

colProxyCount 

Event count column.

colProxyLast 

End of proxy columns marker.

◆ SeverityMode

Defines the mode for displaying and evaluating severities.

Enumerator
Group 

Mode for evaluating severity at the group level.

Packet 

Mode for evaluating severity at the individual packet level.

Constructor & Destructor Documentation

◆ ExpertInfoProxyModel()

ExpertInfoProxyModel::ExpertInfoProxyModel ( QObject *  parent = 0)

Constructs a new ExpertInfoProxyModel.

Parameters
parentThe parent QObject, defaults to 0.

Member Function Documentation

◆ columnCount()

int ExpertInfoProxyModel::columnCount ( const QModelIndex &  parent = QModelIndex()) const

Returns the number of columns under a given parent.

Parameters
parentThe parent model index (defaults to an invalid QModelIndex).
Returns
The number of columns.

◆ data()

QVariant ExpertInfoProxyModel::data ( const QModelIndex &  index,
int  role 
) const

Retrieves data from the proxy model for a given index and role.

Parameters
indexThe proxy model index.
roleThe data role requested.
Returns
The data associated with the index and role.

◆ filterAcceptItem()

bool ExpertInfoProxyModel::filterAcceptItem ( ExpertPacketItem item) const
protected

Checks if an individual expert packet item matches the current filter criteria.

Parameters
itemThe expert packet item to check.
Returns
True if the item is accepted, false otherwise.

◆ filterAcceptsRow()

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

Determines whether a row from the source model should be displayed.

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

◆ hasChildren()

bool ExpertInfoProxyModel::hasChildren ( const QModelIndex &  parent = QModelIndex()) const

Checks if a given parent index has any child elements.

Parameters
parentThe parent model index (defaults to an invalid QModelIndex).
Returns
True if the parent has children, false otherwise.

◆ headerData()

QVariant ExpertInfoProxyModel::headerData ( int  section,
Qt::Orientation  orientation,
int  role = Qt::DisplayRole 
) const

Retrieves the header data for a specific section and role.

Parameters
sectionThe column or row section.
orientationThe orientation of the header.
roleThe data role requested (defaults to Qt::DisplayRole).
Returns
The header data.

◆ lessThan()

bool ExpertInfoProxyModel::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.

◆ setSeverityFilter()

void ExpertInfoProxyModel::setSeverityFilter ( int  severity,
bool  hide 
)

Sets whether a specific severity level should be hidden or shown.

Parameters
severityThe severity level identifier.
hideTrue to hide the severity, false to show it.

◆ setSeverityMode()

void ExpertInfoProxyModel::setSeverityMode ( enum SeverityMode  mode)

Sets the severity mode for the proxy model.

Parameters
modeThe severity mode to apply.

◆ setSummaryFilter()

void ExpertInfoProxyModel::setSummaryFilter ( const QString &  filter)

Sets the text filter used to filter items by their summary.

Parameters
filterThe filter text or regular expression.

Member Data Documentation

◆ hidden_severities_

QList<int> ExpertInfoProxyModel::hidden_severities_
protected

A list of severity levels that are currently hidden.

◆ severityMode_

enum SeverityMode ExpertInfoProxyModel::severityMode_
protected

The current severity evaluation mode.

◆ textFilter_

QString ExpertInfoProxyModel::textFilter_
protected

The current text filter applied to summaries.


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