TODO netlogon_user_flags_ntlmv2_enabled
[wireshark-sm.git] / ui / qt / models / uat_delegate.h
blobf9cfa92d3804c09178582937ff0560b4c3479ac8
1 /** @file
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
17 #include <config.h>
18 #include <epan/uat-int.h>
20 #include <QStyledItemDelegate>
21 #include <QModelIndex>
23 class UatDelegate : public QStyledItemDelegate
25 Q_OBJECT
27 public:
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;
35 protected slots:
36 void pathHasChanged(QString newPath);
38 private:
39 uat_field_t *indexToField(const QModelIndex &index) const;
41 #endif // UAT_DELEGATE_H