| Wireshark 4.7.3 The Wireshark network protocol analyzer

Loading...
Searching...
No Matches
coloring_rules_delegate.h
Go to the documentation of this file.
1
11
12#ifndef COLORING_RULE_DELEGATE_H
13#define COLORING_RULE_DELEGATE_H
14
15#include <config.h>
16
17#include <QStyledItemDelegate>
18#include <QModelIndex>
19
23 class ColoringRulesDelegate : public QStyledItemDelegate
24{
25 Q_OBJECT
26
27 public:
32 ColoringRulesDelegate(QObject *parent = 0);
33
41 QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem &option,
42 const QModelIndex &index) const override;
43
50 void paint(QPainter *painter, const QStyleOptionViewItem &option,
51 const QModelIndex &index) const override;
52
58 void setEditorData(QWidget *editor, const QModelIndex &index) const override;
59
66 void setModelData(QWidget *editor, QAbstractItemModel *model,
67 const QModelIndex &index) const override;
68
75 void updateEditorGeometry(QWidget *editor,
76 const QStyleOptionViewItem &option, const QModelIndex &index) const override;
77
78signals:
84 void invalidField(const QModelIndex &index, const QString& errMessage) const;
85
90 void validField(const QModelIndex &index) const;
91
92 private slots:
97 void ruleNameChanged(const QString name);
98};
99#endif // COLORING_RULE_DELEGATE_H
ColoringRulesDelegate::validField
void validField(const QModelIndex &index) const
Signal emitted when a field contains valid data.
ColoringRulesDelegate::invalidField
void invalidField(const QModelIndex &index, const QString &errMessage) const
Signal emitted when a field contains invalid data.
ColoringRulesDelegate::updateEditorGeometry
void updateEditorGeometry(QWidget *editor, const QStyleOptionViewItem &option, const QModelIndex &index) const override
Updates the geometry of the editor.
Definition coloring_rules_delegate.cpp:151
ColoringRulesDelegate::setEditorData
void setEditorData(QWidget *editor, const QModelIndex &index) const override
Sets the data for the editor from the model.
Definition coloring_rules_delegate.cpp:88
ColoringRulesDelegate::paint
void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const override
Paints the coloring rule item.
Definition coloring_rules_delegate.cpp:21
ColoringRulesDelegate::ColoringRulesDelegate
ColoringRulesDelegate(QObject *parent=0)
Constructs a new ColoringRulesDelegate.
Definition coloring_rules_delegate.cpp:17
ColoringRulesDelegate::createEditor
QWidget * createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const override
Creates an editor widget for editing a coloring rule.
Definition coloring_rules_delegate.cpp:65
ColoringRulesDelegate::setModelData
void setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const override
Sets the data in the model from the editor.
Definition coloring_rules_delegate.cpp:110