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
26#include <QElapsedTimer>
27#include <QMenu>
28#include <QTime>
29#include <QTreeView>
30#include <QPainter>
31
34class ProfileSwitcher;
35
36class QAction;
37class QTimerEvent;
38
39//
40// XXX - Wireshark supports up to 2^32-1 packets in a capture, but
41// row numbers in a QAbstractItemModel are ints, not unsigned ints,
42// so we can only have 2^31-1 rows on ILP32, LP64, and LLP64 platforms.
43// Does that mean we're permanently stuck at a maximum of 2^31-1 packets
44// per capture?
45//
46
50class PacketList : public QTreeView
51{
52 Q_OBJECT
53public:
58 explicit PacketList(QWidget *parent = 0);
59
64
78 Q_ENUM(SummaryCopyType)
79
80
85 virtual void scrollTo(const QModelIndex &index, QAbstractItemView::ScrollHint hint = EnsureVisible) override;
86
91 QMenu *conversationMenu() { return &conv_menu_; }
92
97 QMenu *colorizeMenu() { return &colorize_menu_; }
98
103 void setProtoTree(ProtoTree *proto_tree);
104
113 bool freeze(bool keep_current_frame = false);
114
124 bool thaw(bool restore_selection = false);
125
130 bool isFrozen() const { return model() == nullptr; }
131
135 void clear();
136
141 void writeRecent(FILE *rf);
142
147 bool contextMenuActive();
148
154 QString getFilterFromRowAndColumn(QModelIndex idx);
155
160 QString getFilterFromFdataAndColumn(frame_data *fdata, int column);
161
165 void resetColorized();
166
172 QString getPacketComment(unsigned c_number);
173
178 void addPacketComment(QString new_comment);
179
185 void setPacketComment(unsigned c_number, QString new_comment);
186
191 QString allPacketComments();
192
197
202
207 void setVerticalAutoScroll(bool enabled = true);
208
214 void setCaptureInProgress(bool in_progress = false, bool auto_scroll = true) { capture_in_progress_ = in_progress; tail_at_end_ = in_progress && auto_scroll; }
215
220
224 void setColumnDelegate();
225
233 void setColumnVisibility();
234
238 void resetColumns();
239
245 bool haveNextHistory(bool update_cur = false);
246
252 bool havePreviousHistory(bool update_cur = false);
253
258 void setProfileSwitcher(ProfileSwitcher *profile_switcher);
259
265 frame_data * getFDataForRow(int row) const;
266
271 bool uniqueSelectActive();
272
277 bool multiSelectActive();
278
287 QList<int> selectedRows(bool useFrameNum = false);
288
299 QList<frame_data *> selectedFrames(bool fall_back_to_current = true) const;
300
308 int selectedFrameCount(int limit = 0) const;
309
316 QString createSummaryText(int frame_num, SummaryCopyType type);
317
324
329 QStringList createHeaderPartsForAligned();
330
336
344 QList<int> createSizePartsForAligned(bool useHeader, QStringList hdr_parts, QList<int> frame_nums);
345
353 QString createHeaderSummaryForAligned(QStringList hdr_parts, QList<int> align_parts, QList<int> size_parts);
354
362 QString createSummaryForAligned(int frame_num, QList<int> align_parts, QList<int> size_parts);
363
369
374 QString createOpeningTagForHtml();
375
381
387 QString createSummaryForHtml(int frame_num);
388
393 QString createClosingTagForHtml();
394
399 void resizeAllColumns(bool onlyTimeFormatted = false);
400
410 void pinSelectedRows();
411
417 void unpinSelectedRows();
418
419 // Unpins every currently pinned packet's row.
420 void unpinAllRows();
421
429
435
441
448 void updatePinActions(QAction *pin_selected, QAction *unpin_all) const;
449
464 int pinnedRowHeight() const;
465
471 void setPinnedColumnBoundary(int column_count);
472
482 int pinnedColumnBoundary() const { return pinned_column_boundary_; }
483
491 static bool isColumnFrozen(int column, int boundary) { return column < boundary; }
492
506 void setPinnedRowViews(PinnedRowView *row_view, PinnedRowView *corner_view);
507
524 void selectRowFromOverlay(int row, int column, Qt::MouseButtons buttons,
525 Qt::KeyboardModifiers modifiers = Qt::NoModifier);
526
533 void startCellDragFromOverlay(int row, int column);
534
541 void startCellDragForSourceIndex(const QModelIndex &source_index);
542
548 void toggleFrameMarkFromClick(const QModelIndex &source_index);
549
557 void showContextMenuForRow(int row, const QPoint &global_pos);
558
570 void showContextMenuForSourceIndex(const QModelIndex &source_index, const QPoint &global_pos,
571 bool from_pinned_row_strip = false);
572
582 QPoint frozenHeaderPosToReal(const QPoint &frozen_pos) const;
583
590 void forwardHeaderContextMenu(QContextMenuEvent *event, const QPoint &header_pos);
591
596 void forwardHeaderMousePress(QMouseEvent *event, const QPoint &header_pos);
597
598 // Forwards a header mouse move (used for resize dragging).
599 void forwardHeaderMouseMove(QMouseEvent *event, const QPoint &header_pos);
600
601 // Forwards a header mouse release (used for resize dragging).
602 void forwardHeaderMouseRelease(QMouseEvent *event, const QPoint &header_pos);
603
613 void sortByColumnFromOverlay(int column);
614
619 void forwardWheelEvent(QWheelEvent *event);
620
629 void setHoveredRowFromOverlay(int row);
630
638 void setHoveredFrameNum(int frame_num);
639
646 int hoveredFrameNum() const { return hovered_frame_num_; }
647
662 void paintHoveredRow(QPainter *painter, const QTreeView *view,
663 const QStyleOptionViewItem &option, const QModelIndex &index) const;
664
665protected:
675 virtual void changeEvent(QEvent *event) override;
676
682 void selectionChanged(const QItemSelection & selected, const QItemSelection & deselected) override;
683
688 virtual void contextMenuEvent(QContextMenuEvent *event) override;
689
694 void timerEvent(QTimerEvent *event) override;
695
700 void paintEvent(QPaintEvent *event) override;
701
706 virtual void mousePressEvent (QMouseEvent *event) override;
707
712 virtual void mouseReleaseEvent (QMouseEvent *event) override;
713
718 virtual void mouseMoveEvent (QMouseEvent *event) override;
719
724 virtual void leaveEvent(QEvent *event) override;
725
730 virtual void resizeEvent(QResizeEvent *event) override;
731
736 virtual void keyPressEvent(QKeyEvent *event) override;
737
742 virtual void keyReleaseEvent(QKeyEvent *event) override;
743
748 virtual void focusInEvent(QFocusEvent *event) override;
749
755 virtual void focusOutEvent(QFocusEvent *event) override;
756
757protected slots:
764 void rowsInserted(const QModelIndex &parent, int start, int end) override;
765
772 virtual void drawRow(QPainter *painter, const QStyleOptionViewItem &option,
773 const QModelIndex &index) const override;
774
775private:
780 QModelIndexList selectedSourceIndexes() const;
781
787 void installSelectionModel();
788
795 void reconcilePinnedSelection();
796
803 void syncPinnedSelection(bool to_pinned);
804
806 PacketListModel *packet_list_model_;
807
809 PacketListProxyModel *packet_list_proxy_model_;
810
812 PacketListHeader * packet_list_header_;
813
815 ProtoTree *proto_tree_;
816
818 capture_file *cap_file_;
819
821 QMenu conv_menu_;
822
824 QMenu colorize_menu_;
825
831 void startCellDrag(frame_data *fdata, int column, const QString &cell_text);
832
834 int ctx_column_;
835
837 QByteArray column_state_;
838
840 OverlayScrollBar *overlay_sb_;
841
843 int overlay_timer_id_;
844
846 int turbo_timer_id_;
847
849 Qt::Key turbo_key_;
850
852 Qt::Key held_key_;
853
855 QElapsedTimer key_hold_elapsed_;
856
858 bool create_near_overlay_;
859
861 bool create_far_overlay_;
862
864 QVector<QRgb> overlay_colors_;
865
867 bool changing_profile_;
868
870 QModelIndex mouse_pressed_at_;
871
873 RelatedPacketDelegate related_packet_delegate_;
874
876 MultiColorPacketDelegate multi_color_delegate_;
877 TagColumnDelegate tag_column_delegate_;
878
880 QAction *show_hide_separator_;
881
883 QList<QAction *>show_hide_actions_;
884
886 bool capture_in_progress_;
887
889 bool tail_at_end_;
890
892 bool columns_changed_;
893
895 bool set_column_visibility_;
896
898 bool set_style_sheet_;
899
901 QModelIndex frozen_current_row_;
902
904 QModelIndexList frozen_selected_rows_;
905
908 PinnedRowsModel *pinned_rows_model_;
909
918 QItemSelectionModel *pinned_selection_model_;
919
925 bool syncing_selection_;
926
927 // Number of leftmost columns currently frozen/pinned, or 0.
928 int pinned_column_boundary_;
929 // The frozen-column boundary held across a clear() so redissection can
930 // restore it; see captureFileReadFinished().
931 int saved_pinned_column_boundary_;
932
933 // Overlay view showing the frozen leftmost columns for all rows.
934 PinnedColumnView *pinned_column_view_;
935
941 QSize pinned_column_view_size_;
942 bool header_drag_active_ = false;
943 void updateFrozenOverlayMask();
944
945 // Overlay view showing the pinned row's non-frozen columns.
946 PinnedRowView *pinned_row_view_;
947
948 // Overlay view showing the pinned row's frozen columns (the "corner").
949 PinnedRowView *pinned_row_corner_view_;
950
951 // Cached selection stylesheet for the overlay views when this window is active.
952 QString overlay_active_flat_style_;
953
954 // Cached selection stylesheet for the overlay views when this window is inactive.
955 QString overlay_inactive_flat_style_;
956
963 int hovered_frame_num_;
964
966 QVector<int> selection_history_;
967
969 int cur_history_;
970
972 bool in_history_;
973
975 GPtrArray *finfo_array;
976
978 ProfileSwitcher *profile_switcher_;
979
988 void updateHistory(int frame_num);
989
995 void setFrameReftime(bool set, frame_data *fdata);
996
1001 void setRecentColumnWidth(int column);
1002
1007 void drawCurrentPacket(bool scroll = true);
1008
1012 void applyRecentColumnWidths();
1013
1021 QList<QTreeView *> pinnedOverlayViews() const;
1022
1031 void repaintPinnedOverlays();
1032
1039 void mirrorSectionWidthToOverlays(int column, int width);
1040
1045 void applyOverlayActiveState();
1046
1052 bool selectionIsActive() const { return hasFocus() && isActiveWindow(); }
1053
1059 void applicationFocusChanged(QWidget *old, QWidget *now);
1060
1065 void scrollViewChanged(bool at_end);
1066
1074 QString joinSummaryRow(QStringList col_parts, int row, SummaryCopyType type);
1075
1076signals:
1079
1084
1106 void pinnedRowsCornerWidthChanged(int corner_width, bool have_pinned_rows);
1107
1116 void columnHiddenChanged(int column, bool hidden);
1117
1126 void pinnedColumnBoundaryChanged(int column_count);
1127
1132 void showColumnPreferences(QString pane_name);
1133
1138 void editColumn(int column);
1139
1144 void packetListScrolled(bool at_end);
1145
1150 void showProtocolPreferences(const QString module_name);
1151
1157 void editProtocolPreference(pref_t *pref, module_t *module);
1158
1163 void framesSelected(QList<int> frames);
1164
1170
1171public slots:
1176 void setCaptureFile(capture_file *cf);
1177
1182 void setMonospaceFont(const QFont &mono_font);
1183
1188 void setRegularFont(const QFont &regular_font);
1189
1193 void goNextPacket();
1194
1198 void goPreviousPacket();
1199
1203 void goFirstPacket();
1204
1208 void goLastPacket();
1209
1215 void goToPacket(int packet, int hf_id = -1);
1216
1220 void goNextHistoryPacket();
1221
1226
1230 void markFrame();
1231
1236 void markAllDisplayedFrames(bool set);
1237
1241 void ignoreFrame();
1242
1247 void ignoreAllDisplayedFrames(bool set);
1248
1252 void setTimeReference();
1253
1258
1262 void applyTimeShift();
1263
1267 void recolorPackets();
1268
1272 void redrawVisiblePackets();
1273
1278
1282 void colorsChanged();
1283
1287 void columnsChanged();
1288
1293 void fieldsChanged(capture_file *cf);
1294
1298 void preferencesChanged();
1299
1304 void freezePacketList(bool changing_profile);
1305
1306private slots:
1310 void columnVisibilityTriggered();
1311
1317 void sectionResized(int col, int, int new_width);
1318
1325 void sectionMoved(int logicalIndex, int oldVisualIndex, int newVisualIndex);
1326
1330 void copySummary();
1331
1335 void vScrollBarActionTriggered(int);
1336
1340 void drawFarOverlay();
1341
1345 void drawNearOverlay();
1346
1351 void updatePackets(bool redraw);
1352
1356 void ctxDecodeAsDialog();
1357
1363 void updatePinnedRowVisibility();
1364
1369 void pinnedSelectionChanged(const QItemSelection &selected, const QItemSelection &deselected);
1370
1375 void pinnedCurrentChanged(const QModelIndex &current);
1376
1388 void layoutPinnedOverlays();
1389};
1390
1391#endif // PACKET_LIST_H
struct _capture_file capture_file
Represents a capture file and its associated metadata.
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:2756
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:3363
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:2676
PinAction
What pinning or unpinning the selected packets would do.
Definition packet_list.h:423
@ UnpinRows
Definition packet_list.h:427
@ PinRows
Definition packet_list.h:425
@ PinRowsOverLimit
Definition packet_list.h:426
@ NoPinAction
Definition packet_list.h:424
void applyTimeShift()
Applies a time shift to the capture packets.
Definition packet_list.cpp:2924
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
QString createSummaryText(int frame_num, SummaryCopyType type)
Creates a summary text for a specific packet.
Definition packet_list.cpp:3314
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:3799
QString createHeaderSummaryForAligned(QStringList hdr_parts, QList< int > align_parts, QList< int > size_parts)
Creates an aligned header summary.
Definition packet_list.cpp:3400
void setTimeReference()
Toggles the time reference status on the currently selected frame.
Definition packet_list.cpp:2909
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:2874
QList< int > createAlignmentPartsForAligned()
Creates alignment parts for formatting.
Definition packet_list.cpp:3352
void setPacketComment(unsigned c_number, QString new_comment)
Sets the comment for a specific packet.
Definition packet_list.cpp:2650
void addPacketComment(QString new_comment)
Adds a new comment to the currently selected packet.
Definition packet_list.cpp:2623
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:2790
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:2358
void setCaptureInProgress(bool in_progress=false, bool auto_scroll=true)
Sets the capture in progress state.
Definition packet_list.h:214
QMenu * colorizeMenu()
Retrieves the colorize menu.
Definition packet_list.h:97
void captureFileReadFinished()
Handles the event when the capture file has finished reading.
Definition packet_list.cpp:2332
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:2535
void writeRecent(FILE *rf)
Writes recent configuration to a file.
Definition packet_list.cpp:2497
void pinSelectedRows()
Pins every currently selected row (or, if nothing is selected, the current row) so each stays visible...
Definition packet_list.cpp:3130
void deleteCommentsFromPackets()
Deletes comments from the selected packets.
Definition packet_list.cpp:2707
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:3453
QMenu * conversationMenu()
Retrieves the conversation menu.
Definition packet_list.h:91
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:2399
void goNextPacket()
Navigates to the next packet.
Definition packet_list.cpp:2772
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:3111
void goToPacket(int packet, int hf_id=-1)
Jumps directly to a specific packet number.
Definition packet_list.cpp:2829
int hoveredFrameNum() const
The frame number of the row currently tracked as hovered across all panes, or -1 if none....
Definition packet_list.h:646
int pinnedColumnBoundary() const
The current frozen-column boundary (see setPinnedColumnBoundary()), for callers that need the current...
Definition packet_list.h:482
bool isFrozen() const
Whether the packet list is frozen (see freeze()).
Definition packet_list.h:130
void showProtocolPreferences(const QString module_name)
Signal emitted to show protocol specific preferences.
void clear()
Clears the packet list.
Definition packet_list.cpp:2467
void goNextHistoryPacket()
Navigates to the next packet in the selection history.
Definition packet_list.cpp:2843
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:3054
QString getFilterFromRowAndColumn(QModelIndex idx)
Retrieves the filter string based on a given row and column.
Definition packet_list.cpp:2527
~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:2718
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:3414
QString createSummaryForHtml(int frame_num)
Creates an HTML summary for a specific packet.
Definition packet_list.cpp:3473
void setMonospaceFont(const QFont &mono_font)
Sets the monospace font used in the list.
Definition packet_list.cpp:2744
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:2852
void packetDissectionChanged()
Signal emitted when packet dissection data changes.
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:2813
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:2309
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:2821
void resetColorized()
Resets the colorized state of the packets.
Definition packet_list.cpp:2594
QString createDefaultStyleForHtml()
Retrieves the default CSS style for HTML summaries.
Definition packet_list.cpp:3441
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:3183
QString createHeaderSummaryText(SummaryCopyType type)
Creates the header summary text.
Definition packet_list.cpp:3330
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:3784
QString createClosingTagForHtml()
Creates the closing tag block for HTML summaries.
Definition packet_list.cpp:3500
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:3172
void recolorPackets()
Recolors the displayed packets based on rules.
Definition packet_list.cpp:2315
void unsetAllTimeReferences()
Unsets all time reference flags on all frames.
Definition packet_list.cpp:2917
QString createHeaderSummaryForHtml()
Creates the HTML header summary.
Definition packet_list.cpp:3458
QStringList createHeaderPartsForAligned()
Creates string parts for aligned headers.
Definition packet_list.cpp:3341
void setVerticalAutoScroll(bool enabled=true)
Enables or disables vertical auto-scrolling.
Definition packet_list.cpp:2322
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:2227
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:491
void setCaptureFile(capture_file *cf)
Sets the active capture file.
Definition packet_list.cpp:2729
QString getPacketComment(unsigned c_number)
Retrieves the comment for a specific packet.
Definition packet_list.cpp:2600
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:2522
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:3143
SummaryCopyType
Types of formats available for copying packet summaries.
Definition packet_list.h:68
@ CopyAsYAML
Copy summary as YAML format.
Definition packet_list.h:74
@ CopyAsHTML
Copy summary as HTML format.
Definition packet_list.h:76
@ CopyAsCSV
Copy summary as Comma-Separated Values (CSV).
Definition packet_list.h:72
@ CopyAsText
Copy summary as plain text.
Definition packet_list.h:70
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:3083
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:2900
void ignoreFrame()
Toggles the ignore status of the currently selected frame.
Definition packet_list.cpp:2887
void preferencesChanged()
Slot triggered when global preferences have changed.
Definition packet_list.cpp:2267
void markFrame()
Toggles the mark on the currently selected frame.
Definition packet_list.cpp:2861
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.