3 * Wireshark - Network traffic analyzer
4 * By Gerald Combs <gerald@wireshark.org>
5 * Copyright 1998 Gerald Combs
7 * SPDX-License-Identifier: GPL-2.0-or-later
10 #ifndef RELATED_PACKET_DELEGATE_H
11 #define RELATED_PACKET_DELEGATE_H
15 #include "epan/conversation.h"
18 #include <QStyledItemDelegate>
23 class RelatedPacketDelegate
: public QStyledItemDelegate
27 RelatedPacketDelegate(QWidget
*parent
= 0);
29 void setCurrentFrame(uint32_t current_frame
);
30 void setConversation(struct conversation
*conv
);
33 void addRelatedFrame(int frame_num
, ft_framenum_type_t framenum_type
= FT_FRAMENUM_NONE
);
36 void paint(QPainter
*painter
, const QStyleOptionViewItem
&option
,
37 const QModelIndex
&index
) const;
38 QSize
sizeHint(const QStyleOptionViewItem
&option
,
39 const QModelIndex
&index
) const;
42 QHash
<int, ft_framenum_type_t
> related_frames_
;
43 struct conversation
*conv_
;
44 uint32_t current_frame_
;
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;
51 #endif // RELATED_PACKET_DELEGATE_H