Item delegate providing in-place editors for the Decode As table.
More...
#include <decode_as_delegate.h>
|
| | DecodeAsDelegate (QObject *parent=0, capture_file *cf=NULL) |
| | Construct a DecodeAsDelegate.
|
| |
| QWidget * | createEditor (QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const override |
| | Create an editor widget for the cell at index.
|
| |
| void | destroyEditor (QWidget *editor, const QModelIndex &index) const override |
| | Destroy the editor widget created by createEditor().
|
| |
| void | setEditorData (QWidget *editor, const QModelIndex &index) const override |
| | Populate the editor with the current model data.
|
| |
| void | setModelData (QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const override |
| | Write the editor's current value back to the model.
|
| |
Item delegate providing in-place editors for the Decode As table.
◆ DecodeAsDelegate()
| DecodeAsDelegate::DecodeAsDelegate |
( |
QObject * |
parent = 0, |
|
|
capture_file * |
cf = NULL |
|
) |
| |
Construct a DecodeAsDelegate.
- Parameters
-
| parent | The parent QObject. |
| cf | The currently open capture file, used to interrogate the selected packet for its protocol layers. May be NULL. |
◆ createEditor()
| QWidget * DecodeAsDelegate::createEditor |
( |
QWidget * |
parent, |
|
|
const QStyleOptionViewItem & |
option, |
|
|
const QModelIndex & |
index |
|
) |
| const |
|
override |
Create an editor widget for the cell at index.
Returns a QComboBox populated with dissector table selector values (for the selector column) or dissector handle names (for the codec column). Falls back to QStyledItemDelegate for other columns.
- Parameters
-
| parent | The parent widget for the editor. |
| option | Style options for the editor's viewport rect. |
| index | The model index of the cell being edited. |
- Returns
- The editor widget; ownership is transferred to the view.
◆ destroyEditor()
| void DecodeAsDelegate::destroyEditor |
( |
QWidget * |
editor, |
|
|
const QModelIndex & |
index |
|
) |
| const |
|
override |
Destroy the editor widget created by createEditor().
Performs any cleanup required before the editor is deleted, then delegates to QStyledItemDelegate::destroyEditor().
- Parameters
-
| editor | The editor widget to destroy. |
| index | The model index the editor was associated with. |
◆ setEditorData()
| void DecodeAsDelegate::setEditorData |
( |
QWidget * |
editor, |
|
|
const QModelIndex & |
index |
|
) |
| const |
|
override |
Populate the editor with the current model data.
Sets the current selection of the selector or dissector combo box to match the value stored at index in the model.
- Parameters
-
| editor | The editor widget returned by createEditor(). |
| index | The model index whose data should be loaded. |
◆ setModelData()
| void DecodeAsDelegate::setModelData |
( |
QWidget * |
editor, |
|
|
QAbstractItemModel * |
model, |
|
|
const QModelIndex & |
index |
|
) |
| const |
|
override |
Write the editor's current value back to the model.
Reads the selected item from the selector or dissector combo box and stores it into model at index.
- Parameters
-
| editor | The editor widget whose value should be committed. |
| model | The model to update. |
| index | The model index to write to. |
The documentation for this class was generated from the following files:
- /builds/wireshark/wireshark/ui/qt/models/decode_as_delegate.h
- /builds/wireshark/wireshark/ui/qt/models/decode_as_delegate.cpp