Wireshark 4.7.0
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
uat_delegate.h
Go to the documentation of this file.
1
14#ifndef UAT_DELEGATE_H
15#define UAT_DELEGATE_H
16
17#include <config.h>
18#include <epan/uat.h>
19
20#include <QStyledItemDelegate>
21#include <QModelIndex>
22
26class UatDelegate : public QStyledItemDelegate
27{
28 Q_OBJECT
29
30public:
35 UatDelegate(QObject *parent = 0);
36
44 QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const override;
45
51 void setEditorData(QWidget *editor, const QModelIndex &index) const override;
52
59 void setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const override;
60
67 void updateEditorGeometry(QWidget *editor, const QStyleOptionViewItem &option, const QModelIndex &index) const override;
68
69protected slots:
74 void pathHasChanged(QString newPath);
75
76private:
82 uat_field_t *indexToField(const QModelIndex &index) const;
83};
84#endif // UAT_DELEGATE_H
A delegate for rendering and editing fields in User Accessible Tables (UAT).
Definition uat_delegate.h:27
void setEditorData(QWidget *editor, const QModelIndex &index) const override
Sets the data to be displayed in the editor widget.
Definition uat_delegate.cpp:135
void updateEditorGeometry(QWidget *editor, const QStyleOptionViewItem &option, const QModelIndex &index) const override
Updates the geometry of the editor widget based on the style option.
Definition uat_delegate.cpp:200
void pathHasChanged(QString newPath)
Handles the event when a file or directory path has changed.
Definition uat_delegate.cpp:216
QWidget * createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const override
Creates the editor widget for the specified item.
Definition uat_delegate.cpp:44
void setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const override
Saves the data from the editor widget back into the model.
Definition uat_delegate.cpp:168
Describes a single editable field within a UAT (User Accessible Table).
Definition uat.h:234