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

A delegate for rendering and editing column types and properties in a view. More...

#include <column_list_model.h>

Inheritance diagram for ColumnTypeDelegate:

Public Member Functions

 ColumnTypeDelegate (QObject *parent=Q_NULLPTR)
 Constructs a new ColumnTypeDelegate.
 
QWidget * createEditor (QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const override
 Creates an editor widget for a given index.
 
void setEditorData (QWidget *editor, const QModelIndex &index) const override
 Sets the data for the editor from the model.
 
void setModelData (QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const override
 Sets the data in the model from the editor.
 
void updateEditorGeometry (QWidget *editor, const QStyleOptionViewItem &option, const QModelIndex &index) const override
 Updates the geometry of the editor widget based on available space.
 

Static Public Member Functions

static QString displayDesc (char display)
 Retrieves the display description for a given display format character.
 
static QString alignDesc (char xalign)
 Retrieves the alignment description for a given alignment character.
 

Detailed Description

A delegate for rendering and editing column types and properties in a view.

Constructor & Destructor Documentation

◆ ColumnTypeDelegate()

ColumnTypeDelegate::ColumnTypeDelegate ( QObject *  parent = Q_NULLPTR)

Constructs a new ColumnTypeDelegate.

Parameters
parentThe parent QObject, defaults to Q_NULLPTR.

Member Function Documentation

◆ alignDesc()

QString ColumnTypeDelegate::alignDesc ( char  xalign)
static

Retrieves the alignment description for a given alignment character.

Parameters
xalignThe alignment character.
Returns
The descriptive alignment string.

◆ createEditor()

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

Creates an editor widget for a given index.

Parameters
parentThe parent widget.
optionThe style options for the view item.
indexThe model index being edited.
Returns
A pointer to the created editor widget.

◆ displayDesc()

QString ColumnTypeDelegate::displayDesc ( char  display)
static

Retrieves the display description for a given display format character.

Parameters
displayThe format character.
Returns
The descriptive string.

◆ setEditorData()

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

Sets the data for the editor from the model.

Parameters
editorThe editor widget.
indexThe model index containing the data.

◆ setModelData()

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

Sets the data in the model from the editor.

Parameters
editorThe editor widget containing the modified data.
modelThe abstract item model to update.
indexThe model index being updated.

◆ updateEditorGeometry()

void ColumnTypeDelegate::updateEditorGeometry ( QWidget *  editor,
const QStyleOptionViewItem &  option,
const QModelIndex &  index 
) const
override

Updates the geometry of the editor widget based on available space.

Parameters
editorThe editor widget.
optionThe style options detailing available space.
indexThe model index being edited.

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