A delegate for rendering multi-colored packet items in a view.
More...
#include <multi_color_packet_delegate.h>
|
| void | paint (QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const override |
| | Renders the item using the given painter and style option.
|
A delegate for rendering multi-colored packet items in a view.
◆ MultiColorPacketDelegate()
| MultiColorPacketDelegate::MultiColorPacketDelegate |
( |
QWidget * | parent = 0 | ) |
|
◆ paint()
| void MultiColorPacketDelegate::paint |
( |
QPainter * | painter, |
|
|
const QStyleOptionViewItem & | option, |
|
|
const QModelIndex & | index ) const |
|
overrideprotected |
Renders the item using the given painter and style option.
- Parameters
-
| painter | The painter used to draw the item. |
| option | The style option specifying how the item should be drawn. |
| index | The model index of the item to be drawn. |
◆ paintMultiColorBackground()
| bool MultiColorPacketDelegate::paintMultiColorBackground |
( |
QPainter * | painter, |
|
|
const QStyleOptionViewItem & | option, |
|
|
const QModelIndex & | index, |
|
|
QColor * | fg_out = nullptr ) const |
Paint only the multi-color row background for an item.
Lets other delegates (e.g. TagColumnDelegate) draw this column's slice of the row-wide stripe / shift-right pattern before painting their own content on top.
- Parameters
-
| fg_out | If non-null, receives the foreground color to use. |
- Returns
- true if a multi-color background was drawn; false if the item doesn't qualify (the caller should paint its normal background).
The documentation for this class was generated from the following files: