A delegate for selecting and editing file or directory paths in a view.
More...
#include <path_selection_delegate.h>
|
| void | pathHasChanged (QString newPath) |
| | Slot triggered when the selected path changes in the editor.
|
| |
|
| 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.
|
| |
A delegate for selecting and editing file or directory paths in a view.
◆ PathSelectionDelegate()
| PathSelectionDelegate::PathSelectionDelegate |
( |
QObject * |
parent = 0 | ) |
|
◆ createEditor()
| QWidget * PathSelectionDelegate::createEditor |
( |
QWidget * |
parent, |
|
|
const QStyleOptionViewItem & |
option, |
|
|
const QModelIndex & |
idx |
|
) |
| const |
|
overrideprotected |
Creates the custom editor widget for path selection.
- Parameters
-
| parent | The parent widget for the editor. |
| option | The style option for the item. |
| idx | The 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
-
| newPath | The newly selected path. |
◆ setEditorData()
| void PathSelectionDelegate::setEditorData |
( |
QWidget * |
editor, |
|
|
const QModelIndex & |
idx |
|
) |
| const |
|
overrideprotected |
Sets the data to be displayed in the editor.
- Parameters
-
| editor | The editor widget. |
| idx | The 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
-
| editor | The editor widget containing the updated data. |
| model | The model to update. |
| idx | The 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
-
| editor | The editor widget to update. |
| option | The style option containing the geometry information. |
| idx | The model index of the item being edited. |
The documentation for this class was generated from the following files:
- /builds/wireshark/wireshark/ui/qt/models/path_selection_delegate.h
- /builds/wireshark/wireshark/ui/qt/models/path_selection_delegate.cpp