Wireshark 4.7.0
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
related_packet_delegate.h
Go to the documentation of this file.
1
10#ifndef RELATED_PACKET_DELEGATE_H
11#define RELATED_PACKET_DELEGATE_H
12
13#include <config.h>
14
15#include "epan/conversation.h"
16
17#include <QHash>
18#include <QStyledItemDelegate>
19
20class QPainter;
21struct conversation;
22
28class RelatedPacketDelegate : public QStyledItemDelegate
29{
30 Q_OBJECT
31public:
36 RelatedPacketDelegate(QWidget *parent = 0);
37
41 void clear();
42
51 void setCurrentFrame(uint32_t current_frame);
52
58 void setConversation(struct conversation *conv);
59
60public slots:
67 void addRelatedFrame(int frame_num, ft_framenum_type_t framenum_type = FT_FRAMENUM_NONE);
68
69protected:
76 void initStyleOption(QStyleOptionViewItem *option,
77 const QModelIndex &index) const;
78
85 void paint(QPainter *painter, const QStyleOptionViewItem &option,
86 const QModelIndex &index) const;
87
94 QSize sizeHint(const QStyleOptionViewItem &option,
95 const QModelIndex &index) const;
96
97private:
98 QHash<int, ft_framenum_type_t> related_frames_;
99 struct conversation *conv_;
100 uint32_t current_frame_;
109 void drawArrow(QPainter *painter, const QPoint tail, const QPoint head, int head_size) const;
110
118 void drawChevrons(QPainter *painter, const QPoint tail, const QPoint head, int head_size) const;
119
125 void drawCheckMark(QPainter *painter, const QRect bbox) const;
126};
127
128#endif // RELATED_PACKET_DELEGATE_H
enum ft_framenum_type ft_framenum_type_t
Convenience typedef for ft_framenum_type.
Definition ftypes.h:208
@ FT_FRAMENUM_NONE
Definition ftypes.h:197
Definition conversation.h:229