3 * Delegates for editing various field types in a UAT record.
5 * Copyright 2016 Peter Wu <peter@lekensteyn.nl>
7 * Wireshark - Network traffic analyzer
8 * By Gerald Combs <gerald@wireshark.org>
9 * Copyright 1998 Gerald Combs
11 * SPDX-License-Identifier: GPL-2.0-or-later
14 #ifndef UAT_DELEGATE_H
15 #define UAT_DELEGATE_H
18 #include <epan/uat-int.h>
20 #include <QStyledItemDelegate>
21 #include <QModelIndex>
23 class UatDelegate
: public QStyledItemDelegate
28 UatDelegate(QObject
*parent
= 0);
30 QWidget
*createEditor(QWidget
*parent
, const QStyleOptionViewItem
&option
, const QModelIndex
&index
) const override
;
31 void setEditorData(QWidget
*editor
, const QModelIndex
&index
) const override
;
32 void setModelData(QWidget
*editor
, QAbstractItemModel
*model
, const QModelIndex
&index
) const override
;
33 void updateEditorGeometry(QWidget
*editor
, const QStyleOptionViewItem
&option
, const QModelIndex
&index
) const override
;
36 void pathHasChanged(QString newPath
);
39 uat_field_t
*indexToField(const QModelIndex
&index
) const;
41 #endif // UAT_DELEGATE_H