Wireshark 4.5.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
23class RelatedPacketDelegate : public QStyledItemDelegate
24{
25 Q_OBJECT
26public:
27 RelatedPacketDelegate(QWidget *parent = 0);
28 void clear();
29 void setCurrentFrame(uint32_t current_frame);
30 void setConversation(struct conversation *conv);
31
32public slots:
33 void addRelatedFrame(int frame_num, ft_framenum_type_t framenum_type = FT_FRAMENUM_NONE);
34
35protected:
36 void paint(QPainter *painter, const QStyleOptionViewItem &option,
37 const QModelIndex &index) const;
38 QSize sizeHint(const QStyleOptionViewItem &option,
39 const QModelIndex &index) const;
40
41private:
42 QHash<int, ft_framenum_type_t> related_frames_;
43 struct conversation *conv_;
44 uint32_t current_frame_;
45
46 void drawArrow(QPainter *painter, const QPoint tail, const QPoint head, int head_size) const;
47 void drawChevrons(QPainter *painter, const QPoint tail, const QPoint head, int head_size) const;
48 void drawCheckMark(QPainter *painter, const QRect bbox) const;
49};
50
51#endif // RELATED_PACKET_DELEGATE_H
Definition conversation.h:224