Wireshark 5.1.0
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
packet_list.h
Go to the documentation of this file.
1
9
10#ifndef PACKET_LIST_H
11#define PACKET_LIST_H
12
13#include "data_source_tab.h"
16#include "proto_tree.h"
20#include <ui/qt/models/tag_column_delegate.h>
25#include "capture_event.h"
26
27#include <QElapsedTimer>
28#include <QMenu>
29#include <QTime>
30#include <QTreeView>
31#include <QPainter>
32
35class ProfileSwitcher;
36
37class QAction;
38class QTimerEvent;
39
40//
41// XXX - Wireshark supports up to 2^32-1 packets in a capture, but
42// row numbers in a QAbstractItemModel are ints, not unsigned ints,
43// so we can only have 2^31-1 rows on ILP32, LP64, and LLP64 platforms.
44// Does that mean we're permanently stuck at a maximum of 2^31-1 packets
45// per capture?
46//
47
51class PacketList : public QTreeView
52{
53 Q_OBJECT
54public:
59 explicit PacketList(QWidget *parent = 0);
60
65
79 Q_ENUM(SummaryCopyType)
80
81
86 virtual void scrollTo(const QModelIndex &index, QAbstractItemView::ScrollHint hint = EnsureVisible) override;
87
92 QMenu *conversationMenu() { return &conv_menu_; }
93
98 QMenu *colorizeMenu() { return &colorize_menu_; }
99
104 void setProtoTree(ProtoTree *proto_tree);
105
114 bool freeze(bool keep_current_frame = false);
115
125 bool thaw(bool restore_selection = false);
126
131 bool isFrozen() const { return model() == nullptr; }
132
136 void clear();
137
142 void writeRecent(FILE *rf);
143
148 bool contextMenuActive();
149
155 QString getFilterFromRowAndColumn(QModelIndex idx);
156
161 QString getFilterFromFdataAndColumn(frame_data *fdata, int column);
162
166 void resetColorized();
167
173 QString getPacketComment(unsigned c_number);
174
179 void addPacketComment(QString new_comment);
180
186 void setPacketComment(unsigned c_number, QString new_comment);
187
192 QString allPacketComments();
193
198
203
208 void setVerticalAutoScroll(bool enabled = true);
209
215 void setCaptureInProgress(bool in_progress = false, bool auto_scroll = true) { capture_in_progress_ = in_progress; tail_at_end_ = in_progress && auto_scroll; }
216
223
229 void captureFileReloadPending() { reload_pending_ = true; }
230
234 void setColumnDelegate();
235
243 void setColumnVisibility();
244
248 void resetColumns();
249
255 bool haveNextHistory(bool update_cur = false);
256
262 bool havePreviousHistory(bool update_cur = false);
263
268 void setProfileSwitcher(ProfileSwitcher *profile_switcher);
269
275 frame_data * getFDataForRow(int row) const;
276
281 bool uniqueSelectActive();
282
287 bool multiSelectActive();
288
297 QList<int> selectedRows(bool useFrameNum = false);
298
309 QList<frame_data *> selectedFrames(bool fall_back_to_current = true) const;
310
318 int selectedFrameCount(int limit = 0) const;
319
326 QString createSummaryText(int frame_num, SummaryCopyType type);
327
334
339 QStringList createHeaderPartsForAligned();
340
346
354 QList<int> createSizePartsForAligned(bool useHeader, QStringList hdr_parts, QList<int> frame_nums);
355
363 QString createHeaderSummaryForAligned(QStringList hdr_parts, QList<int> align_parts, QList<int> size_parts);
364
372 QString createSummaryForAligned(int frame_num, QList<int> align_parts, QList<int> size_parts);
373
379
384 QString createOpeningTagForHtml();
385
391
397 QString createSummaryForHtml(int frame_num);
398
403 QString createClosingTagForHtml();
404
409 void resizeAllColumns(bool onlyTimeFormatted = false);
410
420 void pinSelectedRows();
421
427 void unpinSelectedRows();
428
429 // Unpins every currently pinned packet's row.
430 void unpinAllRows();
431
439
445
451
458 void updatePinActions(QAction *pin_selected, QAction *unpin_all) const;
459
474 int pinnedRowHeight() const;
475
481 void setPinnedColumnBoundary(int column_count);
482
492 int pinnedColumnBoundary() const { return pinned_column_boundary_; }
493
501 static bool isColumnFrozen(int column, int boundary) { return column < boundary; }
502
516 void setPinnedRowViews(PinnedRowView *row_view, PinnedRowView *corner_view);
517
534 void selectRowFromOverlay(int row, int column, Qt::MouseButtons buttons,
535 Qt::KeyboardModifiers modifiers = Qt::NoModifier);
536
543 void startCellDragFromOverlay(int row, int column);
544
551 void startCellDragForSourceIndex(const QModelIndex &source_index);
552
558 void toggleFrameMarkFromClick(const QModelIndex &source_index);
559
567 void showContextMenuForRow(int row, const QPoint &global_pos);
568
580 void showContextMenuForSourceIndex(const QModelIndex &source_index, const QPoint &global_pos,
581 bool from_pinned_row_strip = false);
582
592 QPoint frozenHeaderPosToReal(const QPoint &frozen_pos) const;
593
600 void forwardHeaderContextMenu(QContextMenuEvent *event, const QPoint &header_pos);
601
606 void forwardHeaderMousePress(QMouseEvent *event, const QPoint &header_pos);
607
608 // Forwards a header mouse move (used for resize dragging).
609 void forwardHeaderMouseMove(QMouseEvent *event, const QPoint &header_pos);
610
611 // Forwards a header mouse release (used for resize dragging).
612 void forwardHeaderMouseRelease(QMouseEvent *event, const QPoint &header_pos);
613
623 void sortByColumnFromOverlay(int column);
624
629 void forwardWheelEvent(QWheelEvent *event);
630
639 void setHoveredRowFromOverlay(int row);
640
648 void setHoveredFrameNum(int frame_num);
649
656 int hoveredFrameNum() const { return hovered_frame_num_; }
657
672 void paintHoveredRow(QPainter *painter, const QTreeView *view,
673 const QStyleOptionViewItem &option, const QModelIndex &index) const;
674
675protected:
685 virtual void changeEvent(QEvent *event) override;
686
692 void selectionChanged(const QItemSelection & selected, const QItemSelection & deselected) override;
693
698 virtual void contextMenuEvent(QContextMenuEvent *event) override;
699
704 void timerEvent(QTimerEvent *event) override;
705
710 void paintEvent(QPaintEvent *event) override;
711
716 virtual void mousePressEvent (QMouseEvent *event) override;
717
722 virtual void mouseReleaseEvent (QMouseEvent *event) override;
723
728 virtual void mouseMoveEvent (QMouseEvent *event) override;
729
734 virtual void leaveEvent(QEvent *event) override;
735
740 virtual void resizeEvent(QResizeEvent *event) override;
741
746 virtual void keyPressEvent(QKeyEvent *event) override;
747
752 virtual void keyReleaseEvent(QKeyEvent *event) override;
753
758 virtual void focusInEvent(QFocusEvent *event) override;
759
765 virtual void focusOutEvent(QFocusEvent *event) override;
766
767protected slots:
774 void rowsInserted(const QModelIndex &parent, int start, int end) override;
775
782 virtual void drawRow(QPainter *painter, const QStyleOptionViewItem &option,
783 const QModelIndex &index) const override;
784
785private:
790 QModelIndexList selectedSourceIndexes() const;
791
797 void installSelectionModel();
798
805 void reconcilePinnedSelection();
806
813 void syncPinnedSelection(bool to_pinned);
814
816 PacketListModel *packet_list_model_;
817
819 PacketListProxyModel *packet_list_proxy_model_;
820
822 PacketListHeader * packet_list_header_;
823
825 ProtoTree *proto_tree_;
826
828 capture_file *cap_file_;
829
831 QMenu conv_menu_;
832
834 QMenu colorize_menu_;
835
841 void startCellDrag(frame_data *fdata, int column, const QString &cell_text);
842
844 int ctx_column_;
845
847 QByteArray column_state_;
848
850 OverlayScrollBar *overlay_sb_;
851
853 int overlay_timer_id_;
854
856 int turbo_timer_id_;
857
859 Qt::Key turbo_key_;
860
862 Qt::Key held_key_;
863
865 QElapsedTimer key_hold_elapsed_;
866
868 bool create_near_overlay_;
869
871 bool create_far_overlay_;
872
874 QVector<QRgb> overlay_colors_;
875
877 bool changing_profile_;
878
880 QModelIndex mouse_pressed_at_;
881
883 RelatedPacketDelegate related_packet_delegate_;
884
886 MultiColorPacketDelegate multi_color_delegate_;
887 TagColumnDelegate tag_column_delegate_;
888
890 QAction *show_hide_separator_;
891
893 QList<QAction *>show_hide_actions_;
894
896 bool capture_in_progress_;
897
899 bool tail_at_end_;
900
902 bool columns_changed_;
903
905 bool set_column_visibility_;
906
908 bool set_style_sheet_;
909
911 QModelIndex frozen_current_row_;
912
914 QModelIndexList frozen_selected_rows_;
915
918 PinnedRowsModel *pinned_rows_model_;
919
928 QItemSelectionModel *pinned_selection_model_;
929
935 bool syncing_selection_;
936
937 // Number of leftmost columns currently frozen/pinned, or 0.
938 int pinned_column_boundary_;
939 // The file is being closed and reopened to reload it, so keep
940 // pinned_rows_model_'s saved pins; see setCaptureFile().
941 bool reload_pending_;
942
943 // Overlay view showing the frozen leftmost columns for all rows.
944 PinnedColumnView *pinned_column_view_;
945
951 QSize pinned_column_view_size_;
952 bool header_drag_active_ = false;
953 void updateFrozenOverlayMask();
954
955 // Overlay view showing the pinned row's non-frozen columns.
956 PinnedRowView *pinned_row_view_;
957
958 // Overlay view showing the pinned row's frozen columns (the "corner").
959 PinnedRowView *pinned_row_corner_view_;
960
961 // Cached selection stylesheet for the overlay views when this window is active.
962 QString overlay_active_flat_style_;
963
964 // Cached selection stylesheet for the overlay views when this window is inactive.
965 QString overlay_inactive_flat_style_;
966
973 int hovered_frame_num_;
974
976 QVector<int> selection_history_;
977
979 int cur_history_;
980
982 bool in_history_;
983
985 GPtrArray *finfo_array;
986
988 ProfileSwitcher *profile_switcher_;
989
998 void updateHistory(int frame_num);
999
1005 void setFrameReftime(bool set, frame_data *fdata);
1006
1011 void setRecentColumnWidth(int column);
1012
1017 void drawCurrentPacket(bool scroll = true);
1018
1022 void applyRecentColumnWidths();
1023
1031 QList<QTreeView *> pinnedOverlayViews() const;
1032
1041 void repaintPinnedOverlays();
1042
1049 void mirrorSectionWidthToOverlays(int column, int width);
1050
1055 void applyOverlayActiveState();
1056
1062 bool selectionIsActive() const { return hasFocus() && isActiveWindow(); }
1063
1069 void applicationFocusChanged(QWidget *old, QWidget *now);
1070
1075 void scrollViewChanged(bool at_end);
1076
1084 QString joinSummaryRow(QStringList col_parts, int row, SummaryCopyType type);
1085
1086signals:
1089
1094
1116 void pinnedRowsCornerWidthChanged(int corner_width, bool have_pinned_rows);
1117
1126 void columnHiddenChanged(int column, bool hidden);
1127
1136 void pinnedColumnBoundaryChanged(int column_count);
1137
1142 void showColumnPreferences(QString pane_name);
1143
1148 void editColumn(int column);
1149
1154 void packetListScrolled(bool at_end);
1155
1160 void showProtocolPreferences(const QString module_name);
1161
1167 void editProtocolPreference(pref_t *pref, module_t *module);
1168
1173 void framesSelected(QList<int> frames);
1174
1180
1181public slots:
1186 void setCaptureFile(capture_file *cf);
1187
1192 void setMonospaceFont(const QFont &mono_font);
1193
1198 void setRegularFont(const QFont &regular_font);
1199
1203 void goNextPacket();
1204
1208 void goPreviousPacket();
1209
1213 void goFirstPacket();
1214
1218 void goLastPacket();
1219
1225 void goToPacket(int packet, int hf_id = -1);
1226
1230 void goNextHistoryPacket();
1231
1236
1240 void markFrame();
1241
1246 void markAllDisplayedFrames(bool set);
1247
1251 void ignoreFrame();
1252
1257 void ignoreAllDisplayedFrames(bool set);
1258
1262 void setTimeReference();
1263
1268
1272 void applyTimeShift();
1273
1277 void recolorPackets();
1278
1282 void redrawVisiblePackets();
1283
1288
1292 void colorsChanged();
1293
1297 void columnsChanged();
1298
1303 void fieldsChanged(capture_file *cf);
1304
1308 void preferencesChanged();
1309
1314 void freezePacketList(bool changing_profile);
1315
1316private slots:
1320 void columnVisibilityTriggered();
1321
1327 void sectionResized(int col, int, int new_width);
1328
1335 void sectionMoved(int logicalIndex, int oldVisualIndex, int newVisualIndex);
1336
1340 void copySummary();
1341
1345 void vScrollBarActionTriggered(int);
1346
1350 void drawFarOverlay();
1351
1355 void drawNearOverlay();
1356
1361 void updatePackets(bool redraw);
1362
1366 void ctxDecodeAsDialog();
1367
1373 void updatePinnedRowVisibility();
1374
1379 void pinnedSelectionChanged(const QItemSelection &selected, const QItemSelection &deselected);
1380
1385 void pinnedCurrentChanged(const QModelIndex &current);
1386
1398 void layoutPinnedOverlays();
1399};
1400
1401#endif // PACKET_LIST_H
struct _capture_file capture_file
Represents a capture file and its associated metadata.
Context
Defines the operational context of the event.
Definition capture_event.h:29
Represents information about a dissected packet field.
Definition field_information.h:26
A delegate for rendering multi-colored packet items in a view.
Definition multi_color_packet_delegate.h:40
A custom scroll bar with overlay images for packet representation.
Definition overlay_scroll_bar.h:21
Custom header view for the packet list.
Definition packet_list_header.h:27
void setRegularFont(const QFont &regular_font)
Sets the regular font used in the list.
Definition packet_list.cpp:2750
void forwardHeaderMousePress(QMouseEvent *event, const QPoint &header_pos)
Forwards a header mouse press (used for resize dragging) from the pinned column view's own header to ...
Definition packet_list.cpp:1486
void showContextMenuForRow(int row, const QPoint &global_pos)
Shows this view's context menu for a row already resolved by an overlay view's own indexAt(),...
Definition packet_list.cpp:1439
bool uniqueSelectActive()
Checks if a single unique selection is currently active.
Definition packet_list.cpp:729
QList< int > createSizePartsForAligned(bool useHeader, QStringList hdr_parts, QList< int > frame_nums)
Creates size parts for aligned formatting.
Definition packet_list.cpp:3357
void forwardWheelEvent(QWheelEvent *event)
Forwards a wheel scroll event from a pinned overlay view so scrolling stays perfectly in sync with th...
Definition packet_list.cpp:1516
QString allPacketComments()
Retrieves all packet comments in the capture.
Definition packet_list.cpp:2664
PinAction
What pinning or unpinning the selected packets would do.
Definition packet_list.h:433
@ UnpinRows
Definition packet_list.h:437
@ PinRows
Definition packet_list.h:435
@ PinRowsOverLimit
Definition packet_list.h:436
@ NoPinAction
Definition packet_list.h:434
void applyTimeShift()
Applies a time shift to the capture packets.
Definition packet_list.cpp:2918
void timerEvent(QTimerEvent *event) override
Handles timer events.
Definition packet_list.cpp:1313
void columnHiddenChanged(int column, bool hidden)
Emitted from setColumnVisibility() for every column whenever any column's visibility changes,...
virtual void focusOutEvent(QFocusEvent *event) override
Handles focus out events. Needed to stops turbo mode navigation if we lose focus.
Definition packet_list.cpp:1812
QPoint frozenHeaderPosToReal(const QPoint &frozen_pos) const
Translates a position local to the pinned column view's own header (PinnedColumnHeader,...
Definition packet_list.cpp:1461
void captureFileReloadPending()
Handles the event when the capture file is about to be closed and reopened to reload the same records...
Definition packet_list.h:229
QString createSummaryText(int frame_num, SummaryCopyType type)
Creates a summary text for a specific packet.
Definition packet_list.cpp:3308
void setHoveredFrameNum(int frame_num)
Same as setHoveredRowFromOverlay(), but given the frame number directly rather than a row to resolve ...
Definition packet_list.cpp:1657
void resizeAllColumns(bool onlyTimeFormatted=false)
Resizes all columns to fit their content.
Definition packet_list.cpp:3793
QString createHeaderSummaryForAligned(QStringList hdr_parts, QList< int > align_parts, QList< int > size_parts)
Creates an aligned header summary.
Definition packet_list.cpp:3394
void setTimeReference()
Toggles the time reference status on the currently selected frame.
Definition packet_list.cpp:2903
virtual void mouseMoveEvent(QMouseEvent *event) override
Handles mouse move events.
Definition packet_list.cpp:1541
PacketList(QWidget *parent=0)
Constructs a new PacketList object.
Definition packet_list.cpp:266
virtual void keyPressEvent(QKeyEvent *event) override
Handles key press events.
Definition packet_list.cpp:1668
void markAllDisplayedFrames(bool set)
Marks or unmarks all displayed frames.
Definition packet_list.cpp:2868
QList< int > createAlignmentPartsForAligned()
Creates alignment parts for formatting.
Definition packet_list.cpp:3346
void setPacketComment(unsigned c_number, QString new_comment)
Sets the comment for a specific packet.
Definition packet_list.cpp:2638
void addPacketComment(QString new_comment)
Adds a new comment to the currently selected packet.
Definition packet_list.cpp:2611
void resetColumns()
Resets the columns to their default state.
Definition packet_list.cpp:2113
void goPreviousPacket()
Navigates to the previous packet.
Definition packet_list.cpp:2784
void setHoveredRowFromOverlay(int row)
Updates which row is considered "hovered" from a pinned overlay view's own mouse-move event,...
Definition packet_list.cpp:1651
void setProfileSwitcher(ProfileSwitcher *profile_switcher)
Sets the profile switcher for the packet list.
Definition packet_list.cpp:2178
void redrawVisiblePackets()
Fully redraws all visible packets.
Definition packet_list.cpp:2101
bool freeze(bool keep_current_frame=false)
Disable and clear the packet list.
Definition packet_list.cpp:2353
void setCaptureInProgress(bool in_progress=false, bool auto_scroll=true)
Sets the capture in progress state.
Definition packet_list.h:215
QMenu * colorizeMenu()
Retrieves the colorize menu.
Definition packet_list.h:98
virtual void mousePressEvent(QMouseEvent *event) override
Handles mouse press events.
Definition packet_list.cpp:1337
QString getFilterFromFdataAndColumn(frame_data *fdata, int column)
Same as getFilterFromRowAndColumn(), but for a frame that may not have a row in this (filtered) view,...
Definition packet_list.cpp:2523
void writeRecent(FILE *rf)
Writes recent configuration to a file.
Definition packet_list.cpp:2485
void pinSelectedRows()
Pins every currently selected row (or, if nothing is selected, the current row) so each stays visible...
Definition packet_list.cpp:3124
void deleteCommentsFromPackets()
Deletes comments from the selected packets.
Definition packet_list.cpp:2695
void colorsChanged()
Slot triggered when global color configurations change.
Definition packet_list.cpp:513
bool havePreviousHistory(bool update_cur=false)
Checks if there is a previous packet in the selection history.
Definition packet_list.cpp:2137
void setColumnVisibility()
Updates the visibility of columns, including propagating global column-hidden state to the pinned-col...
Definition packet_list.cpp:1832
int selectedFrameCount(int limit=0) const
Counts the selected packets, as selectedFrames(false) would return, stopping early once the count rea...
Definition packet_list.cpp:739
virtual void focusInEvent(QFocusEvent *event) override
Handles focus in events.
Definition packet_list.cpp:1790
QList< frame_data * > selectedFrames(bool fall_back_to_current=true) const
The selected packets: the union of the rows selected in this view and the pinned rows selected in the...
Definition packet_list.cpp:839
void startCellDragFromOverlay(int row, int column)
Starts a cell drag (filter, or selected-rows text) for the given row/column, exactly as dragging that...
Definition packet_list.cpp:1559
virtual void contextMenuEvent(QContextMenuEvent *event) override
Handles context menu events.
Definition packet_list.cpp:1059
void toggleFrameMarkFromClick(const QModelIndex &source_index)
Toggles the mark on a packet in response to a middle click, in this view or one of the pinned overlay...
Definition packet_list.cpp:1351
virtual void scrollTo(const QModelIndex &index, QAbstractItemView::ScrollHint hint=EnsureVisible) override
Scrolls the view to the given index.
Definition packet_list.cpp:490
void editColumn(int column)
Signal emitted to trigger editing for a specific column.
void paintHoveredRow(QPainter *painter, const QTreeView *view, const QStyleOptionViewItem &option, const QModelIndex &index) const
Paints the hover highlight over one row of view.
Definition packet_list.cpp:679
void selectRowFromOverlay(int row, int column, Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers=Qt::NoModifier)
Selects/marks a row as if the user had clicked it directly in this view, given a row already resolved...
Definition packet_list.cpp:1381
void showContextMenuForSourceIndex(const QModelIndex &source_index, const QPoint &global_pos, bool from_pinned_row_strip=false)
Shows this view's context menu for a packet given by its index in the source PacketListModel....
Definition packet_list.cpp:1068
QString createOpeningTagForHtml()
Creates the opening tag block for HTML summaries.
Definition packet_list.cpp:3447
QMenu * conversationMenu()
Retrieves the conversation menu.
Definition packet_list.h:92
void setColumnDelegate()
Sets the column delegate for the view.
Definition packet_list.cpp:1854
bool haveNextHistory(bool update_cur=false)
Checks if there is a next packet in the selection history.
Definition packet_list.cpp:2119
void pinnedRowsCornerWidthChanged(int corner_width, bool have_pinned_rows)
Emitted whenever the width needed for the pinned-row strip's "corner" (the frozen-column portion,...
bool thaw(bool restore_selection=false)
Enable and restore the packet list.
Definition packet_list.cpp:2394
void goNextPacket()
Navigates to the next packet.
Definition packet_list.cpp:2766
virtual void drawRow(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const override
Custom drawing logic for a row.
Definition packet_list.cpp:655
void setProtoTree(ProtoTree *proto_tree)
Sets the protocol tree.
Definition packet_list.cpp:721
void togglePinSelectedRows()
Pins the selected packets, or unpins them if they're all pinned already (see selectedRowsPinAction())...
Definition packet_list.cpp:3105
void goToPacket(int packet, int hf_id=-1)
Jumps directly to a specific packet number.
Definition packet_list.cpp:2823
int hoveredFrameNum() const
The frame number of the row currently tracked as hovered across all panes, or -1 if none....
Definition packet_list.h:656
int pinnedColumnBoundary() const
The current frozen-column boundary (see setPinnedColumnBoundary()), for callers that need the current...
Definition packet_list.h:492
bool isFrozen() const
Whether the packet list is frozen (see freeze()).
Definition packet_list.h:131
void showProtocolPreferences(const QString module_name)
Signal emitted to show protocol specific preferences.
void clear()
Clears the packet list.
Definition packet_list.cpp:2462
void goNextHistoryPacket()
Navigates to the next packet in the selection history.
Definition packet_list.cpp:2837
bool multiSelectActive()
Checks if multiple selections are currently active.
Definition packet_list.cpp:734
PinAction selectedRowsPinAction() const
What toggling the pinning of the selected packets (see selectedFrames()) would do.
Definition packet_list.cpp:3048
QString getFilterFromRowAndColumn(QModelIndex idx)
Retrieves the filter string based on a given row and column.
Definition packet_list.cpp:2515
~PacketList()
Destroys the PacketList object.
Definition packet_list.cpp:482
void packetListScrolled(bool at_end)
Signal emitted when the packet list has been scrolled.
void deleteAllPacketComments()
Deletes all packet comments in the capture.
Definition packet_list.cpp:2706
QString createSummaryForAligned(int frame_num, QList< int > align_parts, QList< int > size_parts)
Creates an aligned summary for a specific packet.
Definition packet_list.cpp:3408
QString createSummaryForHtml(int frame_num)
Creates an HTML summary for a specific packet.
Definition packet_list.cpp:3467
void setMonospaceFont(const QFont &mono_font)
Sets the monospace font used in the list.
Definition packet_list.cpp:2738
virtual void mouseReleaseEvent(QMouseEvent *event) override
Handles mouse release events.
Definition packet_list.cpp:1365
void goPreviousHistoryPacket()
Navigates to the previous packet in the selection history.
Definition packet_list.cpp:2846
void packetDissectionChanged()
Signal emitted when packet dissection data changes.
void captureFileReadFinished(CaptureEvent::Context context)
Handles the event when the capture file has finished reading.
Definition packet_list.cpp:2331
QList< int > selectedRows(bool useFrameNum=false)
Retrieves a list of selected row numbers.
Definition packet_list.cpp:809
virtual void keyReleaseEvent(QKeyEvent *event) override
Handles key release events.
Definition packet_list.cpp:1776
void columnsChanged()
Slot triggered when the column configuration changes.
Definition packet_list.cpp:2192
void goFirstPacket()
Navigates to the very first packet.
Definition packet_list.cpp:2807
void selectionChanged(const QItemSelection &selected, const QItemSelection &deselected) override
Handles selection change events.
Definition packet_list.cpp:1024
void freezePacketList(bool changing_profile)
Slot to trigger freezing the packet list state.
Definition packet_list.cpp:2308
void redrawVisiblePacketsDontSelectCurrent()
Redraws all visible packets without modifying the current selection.
Definition packet_list.cpp:2108
void goLastPacket()
Navigates to the very last packet.
Definition packet_list.cpp:2815
void resetColorized()
Resets the colorized state of the packets.
Definition packet_list.cpp:2582
QString createDefaultStyleForHtml()
Retrieves the default CSS style for HTML summaries.
Definition packet_list.cpp:3435
void forwardHeaderContextMenu(QContextMenuEvent *event, const QPoint &header_pos)
Forwards a header context menu request from the pinned column view's own header.
Definition packet_list.cpp:1472
void setPinnedColumnBoundary(int column_count)
Freezes the leftmost columns so they stay visible while the view is scrolled horizontally.
Definition packet_list.cpp:3177
QString createHeaderSummaryText(SummaryCopyType type)
Creates the header summary text.
Definition packet_list.cpp:3324
void editProtocolPreference(pref_t *pref, module_t *module)
Signal emitted to edit a specific protocol preference.
void rowsInserted(const QModelIndex &parent, int start, int end) override
Slot triggered when rows are inserted into the model.
Definition packet_list.cpp:3778
QString createClosingTagForHtml()
Creates the closing tag block for HTML summaries.
Definition packet_list.cpp:3494
int pinnedRowHeight() const
The height of a single row in this view, for sizing the pinned-row strip to exactly N rows (see Pinne...
Definition packet_list.cpp:3166
void recolorPackets()
Recolors the displayed packets based on rules.
Definition packet_list.cpp:2314
void unsetAllTimeReferences()
Unsets all time reference flags on all frames.
Definition packet_list.cpp:2911
QString createHeaderSummaryForHtml()
Creates the HTML header summary.
Definition packet_list.cpp:3452
QStringList createHeaderPartsForAligned()
Creates string parts for aligned headers.
Definition packet_list.cpp:3335
void setVerticalAutoScroll(bool enabled=true)
Enables or disables vertical auto-scrolling.
Definition packet_list.cpp:2321
void startCellDragForSourceIndex(const QModelIndex &source_index)
As startCellDragFromOverlay(), for a cell given by its index in the source PacketListModel....
Definition packet_list.cpp:1568
void sortByColumnFromOverlay(int column)
Sorts by the given column as if its header section had been clicked directly, toggling order if it's ...
Definition packet_list.cpp:1521
void fieldsChanged(capture_file *cf)
Slot triggered when global fields configuration changes.
Definition packet_list.cpp:2226
void fieldSelected(FieldInformation *finfo)
Signal emitted when a specific field is selected.
void paintEvent(QPaintEvent *event) override
Handles paint events.
Definition packet_list.cpp:1328
static bool isColumnFrozen(int column, int boundary)
The single shared definition of "column i is frozen" given a frozen-column boundary,...
Definition packet_list.h:501
void setCaptureFile(capture_file *cf)
Sets the active capture file.
Definition packet_list.cpp:2717
QString getPacketComment(unsigned c_number)
Retrieves the comment for a specific packet.
Definition packet_list.cpp:2588
virtual void changeEvent(QEvent *event) override
Handles window-activation changes.
Definition packet_list.cpp:617
bool contextMenuActive()
Checks if the context menu is currently active.
Definition packet_list.cpp:2510
void setPinnedRowViews(PinnedRowView *row_view, PinnedRowView *corner_view)
Supplies the pinned-row-strip overlay views for this view to manage the content/properties of (model,...
Definition packet_list.cpp:424
void unpinSelectedRows()
Unpins every currently selected row (or, if nothing is selected, the current row) that is currently p...
Definition packet_list.cpp:3137
SummaryCopyType
Types of formats available for copying packet summaries.
Definition packet_list.h:69
@ CopyAsYAML
Copy summary as YAML format.
Definition packet_list.h:75
@ CopyAsHTML
Copy summary as HTML format.
Definition packet_list.h:77
@ CopyAsCSV
Copy summary as Comma-Separated Values (CSV).
Definition packet_list.h:73
@ CopyAsText
Copy summary as plain text.
Definition packet_list.h:71
void pinnedRowsChanged()
Emitted when packets are pinned or unpinned.
virtual void resizeEvent(QResizeEvent *event) override
Handles resize events.
Definition packet_list.cpp:1824
virtual void leaveEvent(QEvent *event) override
Clears the tracked hover row when the mouse leaves this view (and, by extension, all pinned overlay v...
Definition packet_list.cpp:1640
void framesSelected(QList< int > frames)
Signal emitted when multiple frames are selected.
void updatePinActions(QAction *pin_selected, QAction *unpin_all) const
Sets the text and enabled state of the main window's pin actions to match the selection and the pinne...
Definition packet_list.cpp:3077
void pinnedColumnBoundaryChanged(int column_count)
Emitted from setPinnedColumnBoundary() whenever the frozen- column boundary changes,...
void ignoreAllDisplayedFrames(bool set)
Ignores or un-ignores all displayed frames.
Definition packet_list.cpp:2894
void ignoreFrame()
Toggles the ignore status of the currently selected frame.
Definition packet_list.cpp:2881
void preferencesChanged()
Slot triggered when global preferences have changed.
Definition packet_list.cpp:2266
void markFrame()
Toggles the mark on the currently selected frame.
Definition packet_list.cpp:2855
void showColumnPreferences(QString pane_name)
Signal emitted to show preferences for a specific pane.
frame_data * getFDataForRow(int row) const
Retrieves the frame data for a specific row.
Definition packet_list.cpp:2186
A Qt item model representing the list of packets in a capture file.
Definition packet_list_model.h:36
A proxy model exposing the packets of a PacketListModel that pass the display filter,...
Definition packet_list_proxy_model.h:42
A QTreeView clone showing only a leftmost run of columns from a shared model, used to keep "frozen" c...
Definition pinned_column_view.h:34
A QTreeView clone that shows every row of a PinnedRowsModel (i.e. every currently pinned packet,...
Definition pinned_row_view.h:32
A proxy model exposing only a chosen set of "pinned" packets from a PacketListModel,...
Definition pinned_rows_model.h:39
Monitors incoming packets and automatically switches the active configuration profile when a packet m...
Definition profile_switcher.h:38
A tree view for displaying protocol dissection details.
Definition proto_tree.h:30
Definition tag_column_delegate.h:24
DIAG_OFF_PEDANTIC struct _frame_data frame_data
Frame data structure.