Wireshark 4.7.3
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
ColoringRulesDelegate Class Reference

A delegate for rendering and editing coloring rules in a view. More...

#include <coloring_rules_delegate.h>

Inheritance diagram for ColoringRulesDelegate:

Signals

void invalidField (const QModelIndex &index, const QString &errMessage) const
 Signal emitted when a field contains invalid data.
void validField (const QModelIndex &index) const
 Signal emitted when a field contains valid data.

Public Member Functions

 ColoringRulesDelegate (QObject *parent=0)
 Constructs a new ColoringRulesDelegate.
QWidget * createEditor (QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const override
 Creates an editor widget for editing a coloring rule.
void paint (QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const override
 Paints the coloring rule item.
void setEditorData (QWidget *editor, const QModelIndex &index) const override
 Sets the data for the editor from the model.
void setModelData (QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const override
 Sets the data in the model from the editor.
void updateEditorGeometry (QWidget *editor, const QStyleOptionViewItem &option, const QModelIndex &index) const override
 Updates the geometry of the editor.

Detailed Description

A delegate for rendering and editing coloring rules in a view.

Constructor & Destructor Documentation

◆ ColoringRulesDelegate()

ColoringRulesDelegate::ColoringRulesDelegate ( QObject * parent = 0)

Constructs a new ColoringRulesDelegate.

Parameters
parentThe parent QObject, defaults to 0.

Member Function Documentation

◆ createEditor()

QWidget * ColoringRulesDelegate::createEditor ( QWidget * parent,
const QStyleOptionViewItem & option,
const QModelIndex & index ) const
override

Creates an editor widget for editing a coloring rule.

Parameters
parentThe parent widget.
optionThe style options for the item.
indexThe model index of the item being edited.
Returns
A pointer to the created editor widget.

◆ invalidField

void ColoringRulesDelegate::invalidField ( const QModelIndex & index,
const QString & errMessage ) const
signal

Signal emitted when a field contains invalid data.

Parameters
indexThe model index of the invalid field.
errMessageThe error message describing the invalidity.

◆ paint()

void ColoringRulesDelegate::paint ( QPainter * painter,
const QStyleOptionViewItem & option,
const QModelIndex & index ) const
override

Paints the coloring rule item.

Parameters
painterThe painter used to render the item.
optionThe style options for the item.
indexThe model index of the item to paint.

◆ setEditorData()

void ColoringRulesDelegate::setEditorData ( QWidget * editor,
const QModelIndex & index ) const
override

Sets the data for the editor from the model.

Parameters
editorThe editor widget.
indexThe model index containing the data.

◆ setModelData()

void ColoringRulesDelegate::setModelData ( QWidget * editor,
QAbstractItemModel * model,
const QModelIndex & index ) const
override

Sets the data in the model from the editor.

Parameters
editorThe editor widget containing the modified data.
modelThe abstract item model to update.
indexThe model index to update.

◆ updateEditorGeometry()

void ColoringRulesDelegate::updateEditorGeometry ( QWidget * editor,
const QStyleOptionViewItem & option,
const QModelIndex & index ) const
override

Updates the geometry of the editor.

Parameters
editorThe editor widget.
optionThe style options indicating the available space.
indexThe model index being edited.

◆ validField

void ColoringRulesDelegate::validField ( const QModelIndex & index) const
signal

Signal emitted when a field contains valid data.

Parameters
indexThe model index of the valid field.

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