| Wireshark 4.7.3 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

  parent | The 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

  xalign | The 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

  parent | The parent widget.
  option | The style options for the view item.
  index | The 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

  display | The 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

  editor | The editor widget.
  index | The 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

  editor | The editor widget containing the modified data.
  model | The abstract item model to update.
  index | The 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

  editor | The editor widget.
  option | The style options detailing available space.
  index | The model index being edited.

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

- /builds/wireshark/wireshark/ui/qt/models/column_list_model.h
- /builds/wireshark/wireshark/ui/qt/models/column_list_model.cpp