Wireshark 4.7.0
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
Public Member Functions | List of all members
AdvancedPrefDelegate Class Reference

Item delegate providing in-place editors for the Advanced Preferences table. More...

#include <pref_delegate.h>

Inheritance diagram for AdvancedPrefDelegate:

Public Member Functions

 AdvancedPrefDelegate (QObject *parent=0)
 Construct an AdvancedPrefDelegate.
 
QWidget * createEditor (QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const
 Create an editor widget appropriate for the preference at index.
 
void setEditorData (QWidget *editor, const QModelIndex &index) const
 Populate the editor with the current preference value.
 
void setModelData (QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const
 Write the editor's current value back to the model.
 

Detailed Description

Item delegate providing in-place editors for the Advanced Preferences table.

Constructor & Destructor Documentation

◆ AdvancedPrefDelegate()

AdvancedPrefDelegate::AdvancedPrefDelegate ( QObject *  parent = 0)

Construct an AdvancedPrefDelegate.

Parameters
parentThe parent QObject.

Member Function Documentation

◆ createEditor()

QWidget * AdvancedPrefDelegate::createEditor ( QWidget *  parent,
const QStyleOptionViewItem &  option,
const QModelIndex &  index 
) const

Create an editor widget appropriate for the preference at index.

Parameters
parentThe parent widget for the editor.
optionStyle options for the editor's geometry.
indexThe model index of the cell being edited.
Returns
The editor widget; ownership is transferred to the view.

◆ setEditorData()

void AdvancedPrefDelegate::setEditorData ( QWidget *  editor,
const QModelIndex &  index 
) const

Populate the editor with the current preference value.

Parameters
editorThe editor widget returned by createEditor().
indexThe model index whose data should be loaded into the editor.

◆ setModelData()

void AdvancedPrefDelegate::setModelData ( QWidget *  editor,
QAbstractItemModel *  model,
const QModelIndex &  index 
) const

Write the editor's current value back to the model.

Parameters
editorThe editor widget whose value should be committed.
modelThe model to update.
indexThe model index to write to.

The documentation for this class was generated from the following files: