| Wireshark 4.7.3 The Wireshark network protocol analyzer

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

Represents a single packet or group item in the expert information tree. More...

`#include <expert_info_model.h>`

## Public Member Functions
| ExpertPacketItem (const expert_info_t &expert_info, column_info *cinfo, ExpertPacketItem *parent)
| Constructs a new ExpertPacketItem.
virtual | ~ExpertPacketItem ()
| Destroys the ExpertPacketItem.
unsigned int | packetNum () const
| Retrieves the packet number.
int | group () const
| Retrieves the expert group ID.
int | severity () const
| Retrieves the severity level.
int | hfId () const
| Retrieves the header field ID.
QString | protocol () const
| Retrieves the protocol name.
QString | summary () const
| Retrieves the summary text.
QString | colInfo () const
| Retrieves the column info text.
QString | groupKey (bool group_by_summary)
| Generates a grouping key for this specific item.
void | appendChild (ExpertPacketItem *child, QString hash)
| Appends a child item to this item.
ExpertPacketItem * | child (int row)
| Retrieves the child item at a specific row.
ExpertPacketItem * | child (QString hash)
| Retrieves the child item associated with a specific hash.
int | childCount () const
| Gets the number of children this item has.
int | row () const
| Gets the row index of this item relative to its parent.
ExpertPacketItem * | parentItem ()
| Retrieves the parent of this item.

## Static Public Member Functions
static QString | groupKey (bool group_by_summary, int severity, int group, QString protocol, int expert_hf)
| Generates a grouping key based on item properties.

## Detailed Description

Represents a single packet or group item in the expert information tree.

## Constructor & Destructor Documentation

## ◆ ExpertPacketItem()

ExpertPacketItem::ExpertPacketItem | ( | const expert_info_t & | expert_info,
|  | column_info * | cinfo,
|  | ExpertPacketItem * | parent )

Constructs a new ExpertPacketItem.

Parameters

  expert_info | The expert information structure.
  cinfo | The column information.
  parent | The parent item in the tree.

## Member Function Documentation

## ◆ appendChild()

void ExpertPacketItem::appendChild | ( | ExpertPacketItem * | child,
|  | QString | hash )

Appends a child item to this item.

Parameters

  child | The child item to append.
  hash | The hash key to associate with the child.

## ◆ child() [1/2]

ExpertPacketItem * ExpertPacketItem::child | ( | int | row | ) |

Retrieves the child item at a specific row.

Parameters

  row | The row index of the child.

Returns
  A pointer to the child ExpertPacketItem.

## ◆ child() [2/2]

ExpertPacketItem * ExpertPacketItem::child | ( | QString | hash | ) |

Retrieves the child item associated with a specific hash.

Parameters

  hash | The hash key of the child.

Returns
  A pointer to the child ExpertPacketItem, or null if not found.

## ◆ childCount()

int ExpertPacketItem::childCount | ( |  | ) | const

Gets the number of children this item has.

Returns
  The child count.

## ◆ colInfo()

QString ExpertPacketItem::colInfo | ( |  | ) | const
| inline

Retrieves the column info text.

Returns
  The column info string.

## ◆ group()

int ExpertPacketItem::group | ( |  | ) | const
| inline

Retrieves the expert group ID.

Returns
  The group ID.

## ◆ groupKey() [1/2]

QString ExpertPacketItem::groupKey | ( | bool | group_by_summary | ) |

Generates a grouping key for this specific item.

Parameters

  group_by_summary | True to include the summary in the grouping key.

Returns
  The generated group key string.

## ◆ groupKey() [2/2]

QString ExpertPacketItem::groupKey | ( | bool | group_by_summary,
|  | int | severity,
|  | int | group,
|  | QString | protocol,
|  | int | expert_hf )
| static

Generates a grouping key based on item properties.

Parameters

  group_by_summary | True to include the summary in the grouping key.
  severity | The severity level.
  group | The group ID.
  protocol | The protocol string.
  expert_hf | The header field ID.

Returns
  The generated group key string.

## ◆ hfId()

int ExpertPacketItem::hfId | ( |  | ) | const
| inline

Retrieves the header field ID.

Returns
  The header field ID.

## ◆ packetNum()

unsigned int ExpertPacketItem::packetNum | ( |  | ) | const
| inline

Retrieves the packet number.

Returns
  The packet number.

## ◆ parentItem()

ExpertPacketItem * ExpertPacketItem::parentItem | ( |  | ) |

Retrieves the parent of this item.

Returns
  A pointer to the parent ExpertPacketItem.

## ◆ protocol()

QString ExpertPacketItem::protocol | ( |  | ) | const
| inline

Retrieves the protocol name.

Returns
  The protocol string.

## ◆ row()

int ExpertPacketItem::row | ( |  | ) | const

Gets the row index of this item relative to its parent.

Returns
  The row index.

## ◆ severity()

int ExpertPacketItem::severity | ( |  | ) | const
| inline

Retrieves the severity level.

Returns
  The severity level.

## ◆ summary()

QString ExpertPacketItem::summary | ( |  | ) | const
| inline

Retrieves the summary text.

Returns
  The summary string.

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

- /builds/wireshark/wireshark/ui/qt/models/expert_info_model.h
- /builds/wireshark/wireshark/ui/qt/models/expert_info_model.cpp