Wireshark 4.7.0
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
multi_color_packet_delegate.h
Go to the documentation of this file.
1
13#ifndef MULTI_COLOR_PACKET_DELEGATE_H
14#define MULTI_COLOR_PACKET_DELEGATE_H
15
16#include <config.h>
17#include <QStyledItemDelegate>
18
19class QPainter;
20
21class MultiColorPacketDelegate : public QStyledItemDelegate
22{
23 Q_OBJECT
24public:
25 MultiColorPacketDelegate(QWidget *parent = 0);
26
27protected:
28 void paint(QPainter *painter, const QStyleOptionViewItem &option,
29 const QModelIndex &index) const override;
30
31private:
33 QColor calculateForeground(const QList<QColor> &backgrounds) const;
34
36 void drawStripedBackground(QPainter *painter, const QStyleOptionViewItem &option,
37 const QList<QColor> &colors) const;
38
40 void drawShiftRightBackground(QPainter *painter, const QStyleOptionViewItem &option,
41 const QList<QColor> &colors) const;
42};
43
44#endif // MULTI_COLOR_PACKET_DELEGATE_H
Definition multi_color_packet_delegate.h:22