diff options
author | Gerald Combs <gerald@wireshark.org> | 2015-02-23 17:56:14 -0800 |
---|---|---|
committer | Gerald Combs <gerald@wireshark.org> | 2015-03-05 16:45:04 +0000 |
commit | f2b35a180f12575bcd4198add4a6478b4ce41802 (patch) | |
tree | a14fcab1ca616169b1649f8192250bf0f9925130 /ui/qt/related_packet_delegate.h | |
parent | a065fefe689a1c839fc74e5b253212f0efddfced (diff) | |
download | wireshark-f2b35a180f12575bcd4198add4a6478b4ce41802.tar.gz |
Qt: Add extra related packet indicator types.
Add the ability to set frame number types: none, request, or response.
Use the types to draw different related packet indicators in the packet
list.
Track the conversation in PacketListRecord. Use it to draw dashed lines
for unrelated frames.
Set frame number types for DNS and ICMP.
Instead of drawing a transparent QImage, alpha blend our foreground
color and draw directly in our painter. Blend more toward the foreground
color.
Add FRAMENUM_TYPE to checkAPIs.
Change-Id: I2495945bb436413e05d6ec697184a0b4fd5ad214
Reviewed-on: https://code.wireshark.org/review/7436
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Diffstat (limited to 'ui/qt/related_packet_delegate.h')
-rw-r--r-- | ui/qt/related_packet_delegate.h | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/ui/qt/related_packet_delegate.h b/ui/qt/related_packet_delegate.h index db8b1a617a..c33bbf2c72 100644 --- a/ui/qt/related_packet_delegate.h +++ b/ui/qt/related_packet_delegate.h @@ -26,16 +26,23 @@ #include "epan/conversation.h" -#include <QList> +#include <QHash> #include <QStyledItemDelegate> +class QPainter; +struct conversation; + class RelatedPacketDelegate : public QStyledItemDelegate { + Q_OBJECT public: - RelatedPacketDelegate(QWidget *parent = 0) : QStyledItemDelegate(parent) { clear(); } + RelatedPacketDelegate(QWidget *parent = 0); void clear(); - void addRelatedFrame(int frame_num); - void setConversationSpan(int first_frame, int last_frame); + void setCurrentFrame(guint32 current_frame) { current_frame_ = current_frame; } + void setConversation(struct conversation *conv); + +public slots: + void addRelatedFrame(int frame_num, ft_framenum_type_t framenum_type = FT_FRAMENUM_NONE); protected: void paint(QPainter *painter, const QStyleOptionViewItem &option, @@ -44,10 +51,11 @@ protected: const QModelIndex &index) const; private: - QList<int> related_frames_; - int first_frame_; - int last_frame_; + QHash<int, ft_framenum_type_t> related_frames_; + struct conversation *conv_; + guint32 current_frame_; + void drawArrow(QPainter *painter, QPoint tail, QPoint head, int head_size) const; signals: |