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

A delegate for selecting and editing file or directory paths in a view. More...

#include <path_selection_delegate.h>

Inheritance diagram for PathSelectionDelegate:

Public Member Functions

 PathSelectionDelegate (QObject *parent=0)
 Constructs a new PathSelectionDelegate.
 

Protected Slots

void pathHasChanged (QString newPath)
 Slot triggered when the selected path changes in the editor.
 

Protected Member Functions

QWidget * createEditor (QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &idx) const override
 Creates the custom editor widget for path selection.
 
void updateEditorGeometry (QWidget *editor, const QStyleOptionViewItem &option, const QModelIndex &idx) const override
 Updates the geometry of the editor to fit the item.
 
void setEditorData (QWidget *editor, const QModelIndex &idx) const override
 Sets the data to be displayed in the editor.
 
void setModelData (QWidget *editor, QAbstractItemModel *model, const QModelIndex &idx) const override
 Saves the data from the editor back into the model.
 

Detailed Description

A delegate for selecting and editing file or directory paths in a view.

Constructor & Destructor Documentation

◆ PathSelectionDelegate()

PathSelectionDelegate::PathSelectionDelegate ( QObject *  parent = 0)

Constructs a new PathSelectionDelegate.

Parameters
parentThe parent object, defaults to 0.

Member Function Documentation

◆ createEditor()

QWidget * PathSelectionDelegate::createEditor ( QWidget *  parent,
const QStyleOptionViewItem &  option,
const QModelIndex &  idx 
) const
overrideprotected

Creates the custom editor widget for path selection.

Parameters
parentThe parent widget for the editor.
optionThe style option for the item.
idxThe model index of the item being edited.
Returns
A pointer to the created editor widget.

◆ pathHasChanged

void PathSelectionDelegate::pathHasChanged ( QString  newPath)
protectedslot

Slot triggered when the selected path changes in the editor.

Parameters
newPathThe newly selected path.

◆ setEditorData()

void PathSelectionDelegate::setEditorData ( QWidget *  editor,
const QModelIndex &  idx 
) const
overrideprotected

Sets the data to be displayed in the editor.

Parameters
editorThe editor widget.
idxThe model index containing the data to set.

◆ setModelData()

void PathSelectionDelegate::setModelData ( QWidget *  editor,
QAbstractItemModel *  model,
const QModelIndex &  idx 
) const
overrideprotected

Saves the data from the editor back into the model.

Parameters
editorThe editor widget containing the updated data.
modelThe model to update.
idxThe model index of the item being edited.

◆ updateEditorGeometry()

void PathSelectionDelegate::updateEditorGeometry ( QWidget *  editor,
const QStyleOptionViewItem &  option,
const QModelIndex &  idx 
) const
overrideprotected

Updates the geometry of the editor to fit the item.

Parameters
editorThe editor widget to update.
optionThe style option containing the geometry information.
idxThe model index of the item being edited.

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