12 #ifndef DECODE_AS_DELEGATE_H
13 #define DECODE_AS_DELEGATE_H
19 #include <QStyledItemDelegate>
25 const char* proto_name;
26 const char* table_ui_name;
27 uint8_t curr_layer_num;
35 QWidget *createEditor(QWidget *parent,
const QStyleOptionViewItem &option,
36 const QModelIndex &index)
const override;
37 void destroyEditor(QWidget *editor,
const QModelIndex &index)
const override;
38 void setEditorData(QWidget *editor,
const QModelIndex &index)
const override;
39 void setModelData(QWidget *editor, QAbstractItemModel *model,
40 const QModelIndex &index)
const override;
43 void updateEditorGeometry(QWidget *editor,
44 const QStyleOptionViewItem &option,
const QModelIndex &index)
const;
48 DecodeAsItem *indexToField(
const QModelIndex &index)
const;
49 void collectDAProtocols(QSet<QString>& all_protocols, QList<QString>& current_list)
const;
50 void cachePacketProtocols();
53 static void decodeAddProtocol(
const char *table_name,
const char *proto_name,
void *value,
void *user_data);
56 QList<packet_proto_data_t> packet_proto_list_;
Definition: decode_as_delegate.h:31
Definition: decode_as_model.h:27
Definition: decode_as_delegate.h:24