A delegate for rendering and editing coloring rules in a view.
More...
#include <coloring_rules_delegate.h>
|
| 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.
|
|
| | 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.
|
A delegate for rendering and editing coloring rules in a view.
◆ ColoringRulesDelegate()
| ColoringRulesDelegate::ColoringRulesDelegate |
( |
QObject * | parent = 0 | ) |
|
◆ createEditor()
| QWidget * ColoringRulesDelegate::createEditor |
( |
QWidget * | parent, |
|
|
const QStyleOptionViewItem & | option, |
|
|
const QModelIndex & | index ) const |
|
override |
Creates an editor widget for editing a coloring rule.
- Parameters
-
| parent | The parent widget. |
| option | The style options for the item. |
| index | The 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
-
| index | The model index of the invalid field. |
| errMessage | The 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
-
| painter | The painter used to render the item. |
| option | The style options for the item. |
| index | The 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
-
| editor | The editor widget. |
| index | The 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
-
| editor | The editor widget containing the modified data. |
| model | The abstract item model to update. |
| index | The 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
-
| editor | The editor widget. |
| option | The style options indicating the available space. |
| index | The model index being edited. |
◆ validField
| void ColoringRulesDelegate::validField |
( |
const QModelIndex & | index | ) |
const |
|
signal |
Signal emitted when a field contains valid data.
- Parameters
-
| index | The model index of the valid field. |
The documentation for this class was generated from the following files:
- /builds/wireshark/wireshark/ui/qt/models/coloring_rules_delegate.h
- /builds/wireshark/wireshark/ui/qt/models/coloring_rules_delegate.cpp