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