12#ifndef DECODE_AS_DELEGATE_H
13#define DECODE_AS_DELEGATE_H
19#include <QStyledItemDelegate>
60 QWidget *
createEditor(QWidget *parent,
const QStyleOptionViewItem &option,
61 const QModelIndex &index)
const override;
72 void destroyEditor(QWidget *editor,
const QModelIndex &index)
const override;
83 void setEditorData(QWidget *editor,
const QModelIndex &index)
const override;
95 void setModelData(QWidget *editor, QAbstractItemModel *model,
96 const QModelIndex &index)
const override;
99 void updateEditorGeometry(QWidget *editor,
100 const QStyleOptionViewItem &option,
const QModelIndex &index)
const;
110 DecodeAsItem *indexToField(
const QModelIndex &index)
const;
119 void collectDAProtocols(QSet<QString> &all_protocols,
120 QList<QString> ¤t_list)
const;
125 void cachePacketProtocols();
145 static void decodeAddProtocol(
const char *table_name,
const char *proto_name,
146 void *value,
void *user_data);
149 QList<packet_proto_data_t> packet_proto_list_;
Item delegate providing in-place editors for the Decode As table.
Definition decode_as_delegate.h:38
QWidget * createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const override
Create an editor widget for the cell at index.
Definition decode_as_delegate.cpp:140
void setEditorData(QWidget *editor, const QModelIndex &index) const override
Populate the editor with the current model data.
Definition decode_as_delegate.cpp:317
void setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const override
Write the editor's current value back to the model.
Definition decode_as_delegate.cpp:347
void destroyEditor(QWidget *editor, const QModelIndex &index) const override
Destroy the editor widget created by createEditor().
Definition decode_as_delegate.cpp:306
Represents a single "Decode As" mapping entry in the UI.
Definition decode_as_model.h:30
struct _packet_proto_data_t packet_proto_data_t
Per-layer protocol data collected from the currently selected packet.
Represents a capture file and its associated metadata.
Definition cfile.h:84
Per-layer protocol data collected from the currently selected packet.
Definition decode_as_delegate.h:27
uint8_t curr_layer_num
Definition decode_as_delegate.h:30
const char * proto_name
Definition decode_as_delegate.h:28
const char * table_ui_name
Definition decode_as_delegate.h:29