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

Represents a single coloring rule item in a tree model. More...

#include <coloring_rules_model.h>

Inheritance diagram for ColoringRuleItem:
ModelHelperTreeItem< ColoringRuleItem >

Public Member Functions

 ColoringRuleItem (bool disabled, QString name, QString filter, QColor foreground, QColor background, ColoringRuleItem *parent)
 Constructs a new ColoringRuleItem.
 
virtual ~ColoringRuleItem ()
 Destroys the ColoringRuleItem.
 
 ColoringRuleItem (color_filter_t *colorf, ColoringRuleItem *parent)
 Constructs a new ColoringRuleItem from a core color filter structure.
 
 ColoringRuleItem (const ColoringRuleItem &item)
 Copy constructor for ColoringRuleItem.
 
ColoringRuleItemoperator= (ColoringRuleItem &rhs)
 Assignment operator for ColoringRuleItem.
 
- Public Member Functions inherited from ModelHelperTreeItem< ColoringRuleItem >
 ModelHelperTreeItem (ColoringRuleItem *parent)
 Constructs a new ModelHelperTreeItem.
 
virtual ~ModelHelperTreeItem ()
 Destroys the ModelHelperTreeItem and its children.
 
void appendChild (ColoringRuleItem *child)
 Appends a child item to the end of the children list.
 
void prependChild (ColoringRuleItem *child)
 Prepends a child item to the beginning of the children list.
 
void insertChild (int row, ColoringRuleItem *child)
 Inserts a child item at the specified row.
 
void removeChild (int row)
 Removes and deletes the child item at the specified row.
 
ColoringRuleItemchild (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.
 
ColoringRuleItemparentItem ()
 Retrieves the parent item.
 

Public Attributes

bool disabled_
 Indicates if the rule is currently disabled.
 
QString name_
 The display name of the rule.
 
QString filter_
 The display filter string associated with the rule.
 
QColor foreground_
 The foreground color applied by the rule.
 
QColor background_
 The background color applied by the rule.
 

Additional Inherited Members

- Protected Attributes inherited from ModelHelperTreeItem< ColoringRuleItem >
ColoringRuleItemparent_
 
QList< QVariant > childItems_
 

Detailed Description

Represents a single coloring rule item in a tree model.

Constructor & Destructor Documentation

◆ ColoringRuleItem() [1/3]

ColoringRuleItem::ColoringRuleItem ( bool  disabled,
QString  name,
QString  filter,
QColor  foreground,
QColor  background,
ColoringRuleItem parent 
)

Constructs a new ColoringRuleItem.

Parameters
disabledTrue if the rule is disabled.
nameThe name of the rule.
filterThe filter string for the rule.
foregroundThe foreground color.
backgroundThe background color.
parentThe parent rule item.

◆ ColoringRuleItem() [2/3]

ColoringRuleItem::ColoringRuleItem ( color_filter_t colorf,
ColoringRuleItem parent 
)

Constructs a new ColoringRuleItem from a core color filter structure.

Parameters
colorfPointer to the core color filter.
parentThe parent rule item.

◆ ColoringRuleItem() [3/3]

ColoringRuleItem::ColoringRuleItem ( const ColoringRuleItem item)

Copy constructor for ColoringRuleItem.

Parameters
itemThe item to copy.

Member Function Documentation

◆ operator=()

ColoringRuleItem & ColoringRuleItem::operator= ( ColoringRuleItem rhs)

Assignment operator for ColoringRuleItem.

Parameters
rhsThe item to assign from.
Returns
A reference to this item.

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