Wireshark 4.7.0
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
 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
parentOptional parent widget passed to QStyledItemDelegate.

Member Function Documentation

◆ paint()

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

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

Parameters
painterPainter to draw with; clipped to the item rectangle.
optionStyle options including the item rectangle and state flags.
indexModel 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
roleQt item data role that returns a QVariant containing a timeline_span.

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