| Wireshark 4.7.3 The Wireshark network protocol analyzer

Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | List of all members
TimelineDelegate Class Reference

Item delegate that paints a horizontal timeline bar inside a table or tree cell, using timeline_span data retrieved from a configurable model role. More...

`#include <timeline_delegate.h>`

Inheritance diagram for TimelineDelegate:

## Public Member Functions
| TimelineDelegate (QWidget *parent=0)
| Constructs the TimelineDelegate.
void | setDataRole (int role)
| Sets the model role from which timeline_span data is retrieved during painting.

## Protected Member Functions
void | paint (QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const override
| Paints the timeline bar for the cell at `index` using the span geometry stored in the configured data role.

## Detailed Description

Item delegate that paints a horizontal timeline bar inside a table or tree cell, using timeline_span data retrieved from a configurable model role.

## Constructor & Destructor Documentation

## ◆ TimelineDelegate()

TimelineDelegate::TimelineDelegate | ( | QWidget * | parent = 0 | ) |

Constructs the TimelineDelegate.

Parameters

  parent | Optional parent widget passed to QStyledItemDelegate.

## Member Function Documentation

## ◆ paint()

void TimelineDelegate::paint | ( | QPainter * | painter,
|  | const QStyleOptionViewItem & | option,
|  | const QModelIndex & | index ) const
| override protected

Paints the timeline bar for the cell at `index` using the span geometry stored in the configured data role.

Parameters

  painter | Painter to draw with; clipped to the item rectangle.
  option | Style options including the item rectangle and state flags.
  index | Model index of the cell being painted.

## ◆ setDataRole()

void TimelineDelegate::setDataRole | ( | int | role | ) |

Sets the model role from which timeline_span data is retrieved during painting.

Parameters

  role | Qt item data role that returns a QVariant containing a timeline_span.

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

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