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

Tree item representing a single protocol or protocol field in the Supported Protocols tree, storing its name, filter expression, field type, and description. More...

#include <supported_protocols_model.h>

Inheritance diagram for SupportedProtocolsItem:
ModelHelperTreeItem< SupportedProtocolsItem >

Public Member Functions

 SupportedProtocolsItem (protocol_t *proto, const char *name, const char *filter, ftenum_t ftype, const char *descr, SupportedProtocolsItem *parent)
 Constructs a supported-protocols tree item.
 
virtual ~SupportedProtocolsItem ()
 Destroys the item and all of its child items.
 
protocol_tprotocol () const
 Returns the protocol descriptor associated with this item.
 
QString name () const
 Returns the display name of the protocol or field.
 
ftenum_t type () const
 Returns the field type of this item.
 
QString filter () const
 Returns the filter expression string for this protocol or field.
 
QString description () const
 Returns the human-readable description of this protocol or field.
 
- Public Member Functions inherited from ModelHelperTreeItem< SupportedProtocolsItem >
 ModelHelperTreeItem (SupportedProtocolsItem *parent)
 Constructs a new ModelHelperTreeItem.
 
virtual ~ModelHelperTreeItem ()
 Destroys the ModelHelperTreeItem and its children.
 
void appendChild (SupportedProtocolsItem *child)
 Appends a child item to the end of the children list.
 
void prependChild (SupportedProtocolsItem *child)
 Prepends a child item to the beginning of the children list.
 
void insertChild (int row, SupportedProtocolsItem *child)
 Inserts a child item at the specified row.
 
void removeChild (int row)
 Removes and deletes the child item at the specified row.
 
SupportedProtocolsItemchild (int row)
 Retrieves the child item at the specified row.
 
int childCount () const
 Gets the total number of child items.
 
int row ()
 Gets the row index of this item relative to its parent.
 
SupportedProtocolsItemparentItem ()
 Retrieves the parent item.
 

Additional Inherited Members

- Protected Attributes inherited from ModelHelperTreeItem< SupportedProtocolsItem >
SupportedProtocolsItemparent_
 
QList< QVariant > childItems_
 

Detailed Description

Tree item representing a single protocol or protocol field in the Supported Protocols tree, storing its name, filter expression, field type, and description.

Constructor & Destructor Documentation

◆ SupportedProtocolsItem()

SupportedProtocolsItem::SupportedProtocolsItem ( protocol_t proto,
const char *  name,
const char *  filter,
ftenum_t  ftype,
const char *  descr,
SupportedProtocolsItem parent 
)

Constructs a supported-protocols tree item.

Parameters
protoPointer to the protocol_t descriptor; nullptr for field items.
nameDisplay name of the protocol or field.
filterFilter expression string (e.g. "tcp", "tcp.port").
ftypeField type enum value (e.g. FT_UINT16, FT_STRING).
descrHuman-readable description of the protocol or field.
parentParent item in the tree; nullptr for root-level items.

Member Function Documentation

◆ description()

QString SupportedProtocolsItem::description ( ) const
inline

Returns the human-readable description of this protocol or field.

Returns
Description string.

◆ filter()

QString SupportedProtocolsItem::filter ( ) const
inline

Returns the filter expression string for this protocol or field.

Returns
Filter string (e.g. "tcp.port").

◆ name()

QString SupportedProtocolsItem::name ( ) const
inline

Returns the display name of the protocol or field.

Returns
Name string.

◆ protocol()

protocol_t * SupportedProtocolsItem::protocol ( ) const
inline

Returns the protocol descriptor associated with this item.

Returns
Pointer to the protocol_t, or nullptr for field-only items.

◆ type()

ftenum_t SupportedProtocolsItem::type ( ) const
inline

Returns the field type of this item.

Returns
ftenum_t value (e.g. FT_UINT16, FT_NONE for protocols).

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