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>
|
| 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.
|
| |
Item delegate that paints a horizontal timeline bar inside a table or tree cell, using timeline_span data retrieved from a configurable model role.
◆ TimelineDelegate()
| TimelineDelegate::TimelineDelegate |
( |
QWidget * |
parent = 0 | ) |
|
Constructs the TimelineDelegate.
- Parameters
-
| parent | Optional parent widget passed to QStyledItemDelegate. |
◆ 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
-
| 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