Wireshark 4.7.3
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
StringPreference Class Reference
Inheritance diagram for StringPreference:
WiresharkPreference FloatPreference IntPreference PasswordPreference UIntPreference

Public Member Functions

 StringPreference (QObject *parent=Q_NULLPTR)
virtual QWidget * editor (QWidget *parent, const QStyleOptionViewItem &, const QModelIndex &) override
 Creates and returns an editor widget for the preference at index.
virtual void setData (QWidget *editor, const QModelIndex &index) override
 Populates the editor widget with the current preference value from the model at index.
virtual void setModelData (QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) override
 Writes the editor's current value back to the model.
Public Member Functions inherited from WiresharkPreference
Q_INVOKABLE WiresharkPreference (QObject *parent=Q_NULLPTR)
 Constructs a WiresharkPreference with no associated PrefsItem.
void setPrefsItem (PrefsItem *item)
 Associates a PrefsItem with this preference editor.

Additional Inherited Members

Protected Member Functions inherited from WiresharkPreference
PrefsItemprefsItem () const
 Returns the PrefsItem associated with this preference editor.

Member Function Documentation

◆ editor()

virtual QWidget * StringPreference::editor ( QWidget * parent,
const QStyleOptionViewItem & option,
const QModelIndex & index )
inlineoverridevirtual

Creates and returns an editor widget for the preference at index.

Parameters
parentParent widget for the created editor.
optionStyle options for the cell being edited.
indexModel index of the preference cell.
Returns
Pointer to the newly created editor widget, or nullptr if no inline editor is provided by this preference type.

Reimplemented from WiresharkPreference.

Reimplemented in PasswordPreference.

◆ setData()

virtual void StringPreference::setData ( QWidget * editor,
const QModelIndex & index )
inlineoverridevirtual

Populates the editor widget with the current preference value from the model at index.

Parameters
editorThe editor widget previously returned by editor().
indexModel index of the preference being edited.

Reimplemented from WiresharkPreference.

◆ setModelData()

virtual void StringPreference::setModelData ( QWidget * editor,
QAbstractItemModel * model,
const QModelIndex & index )
inlineoverridevirtual

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

Parameters
editorThe editor widget containing the new value.
modelThe model to update.
indexModel index of the preference cell to update.

Reimplemented from WiresharkPreference.


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