|
Wireshark 4.7.4
The Wireshark network protocol analyzer
|
The main packet list view for displaying captured packets. More...
#include <packet_list.h>
Public Types | |
| enum | SummaryCopyType { CopyAsText , CopyAsCSV , CopyAsYAML , CopyAsHTML } |
| Types of formats available for copying packet summaries. More... | |
Public Slots | |
| void | setCaptureFile (capture_file *cf) |
| Sets the active capture file. | |
| void | setMonospaceFont (const QFont &mono_font) |
| Sets the monospace font used in the list. | |
| void | setRegularFont (const QFont ®ular_font) |
| Sets the regular font used in the list. | |
| void | goNextPacket () |
| Navigates to the next packet. | |
| void | goPreviousPacket () |
| Navigates to the previous packet. | |
| void | goFirstPacket () |
| Navigates to the very first packet. | |
| void | goLastPacket () |
| Navigates to the very last packet. | |
| void | goToPacket (int packet, int hf_id=-1) |
| Jumps directly to a specific packet number. | |
| void | goNextHistoryPacket () |
| Navigates to the next packet in the selection history. | |
| void | goPreviousHistoryPacket () |
| Navigates to the previous packet in the selection history. | |
| void | markFrame () |
| Toggles the mark on the currently selected frame. | |
| void | markAllDisplayedFrames (bool set) |
| Marks or unmarks all displayed frames. | |
| void | ignoreFrame () |
| Toggles the ignore status of the currently selected frame. | |
| void | ignoreAllDisplayedFrames (bool set) |
| Ignores or un-ignores all displayed frames. | |
| void | setTimeReference () |
| Toggles the time reference status on the currently selected frame. | |
| void | unsetAllTimeReferences () |
| Unsets all time reference flags on all frames. | |
| void | applyTimeShift () |
| Applies a time shift to the capture packets. | |
| void | recolorPackets () |
| Recolors the displayed packets based on rules. | |
| void | redrawVisiblePackets () |
| Fully redraws all visible packets. | |
| void | redrawVisiblePacketsDontSelectCurrent () |
| Redraws all visible packets without modifying the current selection. | |
| void | colorsChanged () |
| Slot triggered when global color configurations change. | |
| void | columnsChanged () |
| Slot triggered when the column configuration changes. | |
| void | fieldsChanged (capture_file *cf) |
| Slot triggered when global fields configuration changes. | |
| void | preferencesChanged () |
| Slot triggered when global preferences have changed. | |
| void | freezePacketList (bool changing_profile) |
| Slot to trigger freezing the packet list state. | |
Signals | |
| void | packetDissectionChanged () |
| Signal emitted when packet dissection data changes. | |
| 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, matching the pinned column boundary) changes, so the owning PacketListPane can resize the corner widget in its layout to match, and whenever whether any rows are pinned at all may have changed, so the pane can show/hide the whole strip. Emitted from layoutPinnedOverlays(), which already runs whenever column widths, the pinned column boundary, or the pinned row set change. | |
| void | columnHiddenChanged (int column, bool hidden) |
| Emitted from setColumnVisibility() for every column whenever any column's visibility changes, so PacketListPane can mirror it onto duplicate_header_ (a bare QHeaderView with no setColumnHidden() of its own the way a full QTreeView-based overlay has). | |
| void | pinnedColumnBoundaryChanged (int column_count) |
| Emitted from setPinnedColumnBoundary() whenever the frozen- column boundary changes, so PacketListPane can split duplicate_header_ into frozen/non-frozen halves the same way pinned_column_view_/pinned_row_view_/pinned_row_corner_view_ already split their own column visibility around pinned_column_boundary_. | |
| void | showColumnPreferences (QString pane_name) |
| Signal emitted to show preferences for a specific pane. | |
| void | editColumn (int column) |
| Signal emitted to trigger editing for a specific column. | |
| void | packetListScrolled (bool at_end) |
| Signal emitted when the packet list has been scrolled. | |
| void | showProtocolPreferences (const QString module_name) |
| Signal emitted to show protocol specific preferences. | |
| void | editProtocolPreference (pref_t *pref, module_t *module) |
| Signal emitted to edit a specific protocol preference. | |
| void | framesSelected (QList< int > frames) |
| Signal emitted when multiple frames are selected. | |
| void | fieldSelected (FieldInformation *finfo) |
| Signal emitted when a specific field is selected. | |
Public Member Functions | |
| PacketList (QWidget *parent=0) | |
| Constructs a new PacketList object. | |
| ~PacketList () | |
| Destroys the PacketList object. | |
| virtual void | scrollTo (const QModelIndex &index, QAbstractItemView::ScrollHint hint=EnsureVisible) override |
| Scrolls the view to the given index. | |
| QMenu * | conversationMenu () |
| Retrieves the conversation menu. | |
| QMenu * | colorizeMenu () |
| Retrieves the colorize menu. | |
| void | setProtoTree (ProtoTree *proto_tree) |
| Sets the protocol tree. | |
| bool | freeze (bool keep_current_frame=false) |
| Disable and clear the packet list. | |
| bool | thaw (bool restore_selection=false) |
| Enable and restore the packet list. | |
| void | clear () |
| Clears the packet list. | |
| void | writeRecent (FILE *rf) |
| Writes recent configuration to a file. | |
| bool | contextMenuActive () |
| Checks if the context menu is currently active. | |
| QString | getFilterFromRowAndColumn (QModelIndex idx) |
| Retrieves the filter string based on a given row and column. | |
| void | resetColorized () |
| Resets the colorized state of the packets. | |
| QString | getPacketComment (unsigned c_number) |
| Retrieves the comment for a specific packet. | |
| void | addPacketComment (QString new_comment) |
| Adds a new comment to the currently selected packet. | |
| void | setPacketComment (unsigned c_number, QString new_comment) |
| Sets the comment for a specific packet. | |
| QString | allPacketComments () |
| Retrieves all packet comments in the capture. | |
| void | deleteCommentsFromPackets () |
| Deletes comments from the selected packets. | |
| void | deleteAllPacketComments () |
| Deletes all packet comments in the capture. | |
| void | setVerticalAutoScroll (bool enabled=true) |
| Enables or disables vertical auto-scrolling. | |
| void | setCaptureInProgress (bool in_progress=false, bool auto_scroll=true) |
| Sets the capture in progress state. | |
| void | captureFileReadFinished () |
| Handles the event when the capture file has finished reading. | |
| void | setColumnDelegate () |
| Sets the column delegate for the view. | |
| void | setColumnVisibility () |
| Updates the visibility of columns, including propagating global column-hidden state to the pinned-column/pinned-row overlay views (which PacketListHeader::columnVisibilityTriggered() needs to do explicitly, since toggling a column's checkbox there only ever hides that section on the real header itself). | |
| void | resetColumns () |
| Resets the columns to their default state. | |
| bool | haveNextHistory (bool update_cur=false) |
| Checks if there is a next packet in the selection history. | |
| bool | havePreviousHistory (bool update_cur=false) |
| Checks if there is a previous packet in the selection history. | |
| void | setProfileSwitcher (ProfileSwitcher *profile_switcher) |
| Sets the profile switcher for the packet list. | |
| frame_data * | getFDataForRow (int row) const |
| Retrieves the frame data for a specific row. | |
| bool | uniqueSelectActive () |
| Checks if a single unique selection is currently active. | |
| bool | multiSelectActive () |
| Checks if multiple selections are currently active. | |
| QList< int > | selectedRows (bool useFrameNum=false) |
| Retrieves a list of selected row numbers. | |
| QString | createSummaryText (QModelIndex idx, SummaryCopyType type) |
| Creates a summary text for a specific index. | |
| QString | createHeaderSummaryText (SummaryCopyType type) |
| Creates the header summary text. | |
| QStringList | createHeaderPartsForAligned () |
| Creates string parts for aligned headers. | |
| QList< int > | createAlignmentPartsForAligned () |
| Creates alignment parts for formatting. | |
| QList< int > | createSizePartsForAligned (bool useHeader, QStringList hdr_parts, QList< int > rows) |
| Creates size parts for aligned formatting. | |
| QString | createHeaderSummaryForAligned (QStringList hdr_parts, QList< int > align_parts, QList< int > size_parts) |
| Creates an aligned header summary. | |
| QString | createSummaryForAligned (QModelIndex idx, QList< int > align_parts, QList< int > size_parts) |
| Creates an aligned summary for a specific index. | |
| QString | createDefaultStyleForHtml () |
| Retrieves the default CSS style for HTML summaries. | |
| QString | createOpeningTagForHtml () |
| Creates the opening tag block for HTML summaries. | |
| QString | createHeaderSummaryForHtml () |
| Creates the HTML header summary. | |
| QString | createSummaryForHtml (QModelIndex idx) |
| Creates an HTML summary for a specific index. | |
| QString | createClosingTagForHtml () |
| Creates the closing tag block for HTML summaries. | |
| void | resizeAllColumns (bool onlyTimeFormatted=false) |
| Resizes all columns to fit their content. | |
| void | pinRow (int frame_num) |
| Pins a packet's row so that it stays visible (stacked with any other pinned rows, ordered to match the active sort) while the view is scrolled vertically. Up to PinnedRowsModel::kMaxPinnedRows packets may be pinned at once; additional pins beyond that are ignored. | |
| void | unpinRow (int frame_num) |
| Unpins a single packet's row, if pinned. | |
| void | unpinAllRows () |
| int | pinnedRowHeight () const |
| The height of a single row in this view, for sizing the pinned-row strip to exactly N rows (see PinnedRowView::sizeHint()). | |
| void | setPinnedColumnBoundary (int column_count) |
| Freezes the leftmost columns so they stay visible while the view is scrolled horizontally. | |
| int | pinnedColumnBoundary () const |
| The current frozen-column boundary (see setPinnedColumnBoundary()), for callers that need the current value rather than reacting to pinnedColumnBoundaryChanged() – e.g. PacketListPane resyncing its duplicate header pair's frozen/ non-frozen column split right before showing it, which may need to reflect a boundary set well before anything was ever pinned. | |
| 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, column widths, styles, fonts, delegates, column visibility). The views themselves are owned and positioned by the owning PacketListPane, which constructs them as siblings of this view in a normal layout above it – QTreeView reserves viewport space for its own header internally and reasserts that reservation on every geometry pass, so this content couldn't be reserved space as overlay children of PacketList itself via setViewportMargins()/setGeometry(). | |
| void | selectRowFromOverlay (int row, int column, Qt::MouseButtons buttons) |
| Selects/marks a row as if the user had clicked it directly in this view, given a row already resolved by the overlay view's own (always-correct, since it's local) indexAt(). Avoids translating pixel coordinates between two independently laid-out QTreeViews, whose row geometry can drift by a row even when visually aligned. | |
| void | selectFrameFromOverlay (int frame_num) |
| Same as selectRowFromOverlay(), but given a frame/packet number directly rather than a row in this view's own model. | |
| void | showContextMenuForRow (int row, const QPoint &global_pos, bool from_pinned_row_strip=false) |
| Shows this view's context menu for a row already resolved by an overlay view's own indexAt(), rather than translating pixel coordinates across views (see selectRowFromOverlay()). | |
| void | showContextMenuForFrame (int frame_num, const QPoint &global_pos, bool from_pinned_row_strip=true) |
| Same as showContextMenuForRow(), but given a frame/packet number directly for a pinned packet that's been filtered out of the primary view (see selectFrameFromOverlay() for why a row-based lookup can't reach it). | |
| QPoint | frozenHeaderPosToReal (const QPoint &frozen_pos) const |
| Translates a position local to the pinned column view's own header (PinnedColumnHeader, which never scrolls and always shows frozen columns at their unscrolled logical positions) into the equivalent position in this view's real header's own coordinate space, which does scroll horizontally. Used by PinnedColumnHeader before calling any of the forwardHeader*() methods below, all of which require header_pos already in the real header's space. | |
| void | forwardHeaderContextMenu (QContextMenuEvent *event, const QPoint &header_pos) |
| Forwards a header context menu request from the pinned column view's own header. | |
| 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 this view's real header. | |
| void | forwardHeaderMouseMove (QMouseEvent *event, const QPoint &header_pos) |
| void | forwardHeaderMouseRelease (QMouseEvent *event, const QPoint &header_pos) |
| void | sortByColumnFromOverlay (int column) |
| Sorts by the given column as if its header section had been clicked directly, toggling order if it's already the sorted column. Used because a plain click on the pinned column view's own header doesn't reliably trigger QHeaderView's built-in click-to-sort machinery once its press/release events are being forwarded here for resize-drag support. | |
| void | forwardWheelEvent (QWheelEvent *event) |
| Forwards a wheel scroll event from a pinned overlay view so scrolling stays perfectly in sync with the primary view. | |
| void | setHoveredRowFromOverlay (int row) |
| Updates which row is considered "hovered" from a pinned overlay view's own mouse-move event, so the hover highlight shows across the whole logical row (both frozen and non-frozen panes) rather than only in whichever pane the mouse happens to be over. | |
| void | setHoveredFrameNum (int frame_num) |
| Same as setHoveredRowFromOverlay(), but given the frame number directly rather than a row to resolve via getFDataForRow(). | |
| int | hoveredFrameNum () const |
| The frame number of the row currently tracked as hovered across all panes, or -1 if none. Used by the pinned overlay views' drawRow() overrides to manually paint the hover highlight, since Qt's native per-widget hover state doesn't span separate widgets. | |
| int | currentFrameNum () const |
| The frame number of the currently selected packet, or -1 if none. Reflects cap_file_->current_frame, which cf_select_packet() keeps correct regardless of whether the selection was made through a normal click (a row in this view's own model) or through selectFrameFromOverlay() (a pinned packet with no row here at all, e.g. filtered out) – unlike selectedRows(), which can only ever list rows that exist in this view's own model, and so comes back empty for the latter case even though a packet really is selected. Used by PinnedRowView::drawRow() so the pinned strip's own selection highlight tracks the real selection in both cases. | |
Static Public Member Functions | |
| static bool | isColumnFrozen (int column, int boundary) |
| The single shared definition of "column i is frozen" given a frozen-column boundary, used everywhere that rule needs to be applied (this class and PacketListPane, which splits its duplicate header pair the same way) so the rule itself only has one place to change. | |
Protected Slots | |
| void | rowsInserted (const QModelIndex &parent, int start, int end) override |
| Slot triggered when rows are inserted into the model. | |
| virtual void | drawRow (QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const override |
| Custom drawing logic for a row. | |
Protected Member Functions | |
| virtual void | changeEvent (QEvent *event) override |
| Handles window-activation changes. | |
| void | selectionChanged (const QItemSelection &selected, const QItemSelection &deselected) override |
| Handles selection change events. | |
| virtual void | contextMenuEvent (QContextMenuEvent *event) override |
| Handles context menu events. | |
| void | timerEvent (QTimerEvent *event) override |
| Handles timer events. | |
| void | paintEvent (QPaintEvent *event) override |
| Handles paint events. | |
| virtual void | mousePressEvent (QMouseEvent *event) override |
| Handles mouse press events. | |
| virtual void | mouseReleaseEvent (QMouseEvent *event) override |
| Handles mouse release events. | |
| virtual void | mouseMoveEvent (QMouseEvent *event) override |
| Handles mouse move events. | |
| virtual void | leaveEvent (QEvent *event) override |
| Clears the tracked hover row when the mouse leaves this view (and, by extension, all pinned overlay views showing the same row). | |
| virtual void | resizeEvent (QResizeEvent *event) override |
| Handles resize events. | |
| virtual void | keyPressEvent (QKeyEvent *event) override |
| Handles key press events. | |
| virtual void | keyReleaseEvent (QKeyEvent *event) override |
| Handles key release events. | |
| virtual void | focusInEvent (QFocusEvent *event) override |
| Handles focus in events. | |
| virtual void | focusOutEvent (QFocusEvent *event) override |
| Handles focus out events. Needed to stops turbo mode navigation if we lose focus. | |
The main packet list view for displaying captured packets.
|
explicit |
Constructs a new PacketList object.
| parent | The parent widget. |
| void PacketList::addPacketComment | ( | QString | new_comment | ) |
Adds a new comment to the currently selected packet.
| new_comment | The comment text to add. |
| QString PacketList::allPacketComments | ( | ) |
Retrieves all packet comments in the capture.
|
overrideprotectedvirtual |
Handles window-activation changes.
Qt's :active/:!active stylesheet pseudo-states resolve per-widget based on which widget currently has focus, which doesn't track cleanly across the pinned overlay views (separate QTreeView instances). Instead, this view's own window-active state is applied to all of them directly whenever it changes.
|
inline |
Retrieves the colorize menu.
|
signal |
Emitted from setColumnVisibility() for every column whenever any column's visibility changes, so PacketListPane can mirror it onto duplicate_header_ (a bare QHeaderView with no setColumnHidden() of its own the way a full QTreeView-based overlay has).
| column | The column (logical index) whose visibility changed. |
| hidden | The column's new hidden state. |
| bool PacketList::contextMenuActive | ( | ) |
Checks if the context menu is currently active.
|
overrideprotectedvirtual |
Handles context menu events.
| event | The context menu event. |
|
inline |
Retrieves the conversation menu.
| QList< int > PacketList::createAlignmentPartsForAligned | ( | ) |
Creates alignment parts for formatting.
| QString PacketList::createClosingTagForHtml | ( | ) |
Creates the closing tag block for HTML summaries.
| QString PacketList::createDefaultStyleForHtml | ( | ) |
Retrieves the default CSS style for HTML summaries.
| QStringList PacketList::createHeaderPartsForAligned | ( | ) |
Creates string parts for aligned headers.
| QString PacketList::createHeaderSummaryForAligned | ( | QStringList | hdr_parts, |
| QList< int > | align_parts, | ||
| QList< int > | size_parts ) |
Creates an aligned header summary.
| hdr_parts | The header parts. |
| align_parts | The alignment parts. |
| size_parts | The size parts. |
| QString PacketList::createHeaderSummaryForHtml | ( | ) |
Creates the HTML header summary.
| QString PacketList::createHeaderSummaryText | ( | SummaryCopyType | type | ) |
Creates the header summary text.
| type | The format type for the summary. |
| QString PacketList::createOpeningTagForHtml | ( | ) |
Creates the opening tag block for HTML summaries.
| QList< int > PacketList::createSizePartsForAligned | ( | bool | useHeader, |
| QStringList | hdr_parts, | ||
| QList< int > | rows ) |
Creates size parts for aligned formatting.
| useHeader | True to include the header in size calculation. |
| hdr_parts | The header parts. |
| rows | The list of rows to evaluate. |
| QString PacketList::createSummaryForAligned | ( | QModelIndex | idx, |
| QList< int > | align_parts, | ||
| QList< int > | size_parts ) |
Creates an aligned summary for a specific index.
| idx | The model index. |
| align_parts | The alignment parts. |
| size_parts | The size parts. |
| QString PacketList::createSummaryForHtml | ( | QModelIndex | idx | ) |
Creates an HTML summary for a specific index.
| idx | The model index. |
| QString PacketList::createSummaryText | ( | QModelIndex | idx, |
| SummaryCopyType | type ) |
Creates a summary text for a specific index.
| idx | The model index. |
| type | The format type for the summary. |
|
overrideprotectedvirtualslot |
Custom drawing logic for a row.
| painter | The painter object. |
| option | The style option. |
| index | The model index. |
|
signal |
Signal emitted to trigger editing for a specific column.
| column | The column index to edit. |
|
signal |
Signal emitted to edit a specific protocol preference.
| pref | Pointer to the preference to edit. |
| module | Pointer to the related module. |
|
slot |
Slot triggered when global fields configuration changes.
| cf | Pointer to the capture file. |
|
signal |
Signal emitted when a specific field is selected.
| finfo | Pointer to the selected field information. |
|
overrideprotectedvirtual |
Handles focus in events.
| event | The focus event. |
|
overrideprotectedvirtual |
Handles focus out events. Needed to stops turbo mode navigation if we lose focus.
| event | The focus event. |
| void PacketList::forwardHeaderContextMenu | ( | QContextMenuEvent * | event, |
| const QPoint & | header_pos ) |
Forwards a header context menu request from the pinned column view's own header.
| event | The original context menu event. |
| header_pos | The equivalent position in this view's header. |
|
signal |
Signal emitted when multiple frames are selected.
| frames | List of selected frame numbers. |
| bool PacketList::freeze | ( | bool | keep_current_frame = false | ) |
Disable and clear the packet list.
| keep_current_frame | If true, keep the selected frame. Disable packet list widget updates, clear the detail and byte views, and disconnect the model. |
|
slot |
Slot to trigger freezing the packet list state.
| changing_profile | True if the freeze is due to a profile change. |
| frame_data * PacketList::getFDataForRow | ( | int | row | ) | const |
Retrieves the frame data for a specific row.
| row | The row index. |
| QString PacketList::getFilterFromRowAndColumn | ( | QModelIndex | idx | ) |
Retrieves the filter string based on a given row and column.
| idx | The model index indicating the row and column. |
| QString PacketList::getPacketComment | ( | unsigned | c_number | ) |
Retrieves the comment for a specific packet.
| c_number | The frame number of the packet. |
|
slot |
Jumps directly to a specific packet number.
| packet | The packet number to go to. |
| hf_id | Optional header field id to highlight. |
| bool PacketList::haveNextHistory | ( | bool | update_cur = false | ) |
Checks if there is a next packet in the selection history.
| update_cur | True to update the current history pointer. |
| bool PacketList::havePreviousHistory | ( | bool | update_cur = false | ) |
Checks if there is a previous packet in the selection history.
| update_cur | True to update the current history pointer. |
|
slot |
Ignores or un-ignores all displayed frames.
| set | True to ignore all, false to un-ignore all. |
|
overrideprotectedvirtual |
Handles key press events.
| event | The key event. |
|
overrideprotectedvirtual |
Handles key release events.
| event | The key event. |
|
slot |
Marks or unmarks all displayed frames.
| set | True to mark all, false to unmark all. |
|
overrideprotectedvirtual |
Handles mouse move events.
| event | The mouse event. |
|
overrideprotectedvirtual |
Handles mouse press events.
| event | The mouse event. |
|
overrideprotectedvirtual |
Handles mouse release events.
| event | The mouse event. |
| bool PacketList::multiSelectActive | ( | ) |
Checks if multiple selections are currently active.
|
signal |
Signal emitted when the packet list has been scrolled.
| at_end | True if the scroll position is at the very bottom. |
|
overrideprotected |
Handles paint events.
| event | The paint event. |
|
inline |
The current frozen-column boundary (see setPinnedColumnBoundary()), for callers that need the current value rather than reacting to pinnedColumnBoundaryChanged() – e.g. PacketListPane resyncing its duplicate header pair's frozen/ non-frozen column split right before showing it, which may need to reflect a boundary set well before anything was ever pinned.
|
signal |
Emitted from setPinnedColumnBoundary() whenever the frozen- column boundary changes, so PacketListPane can split duplicate_header_ into frozen/non-frozen halves the same way pinned_column_view_/pinned_row_view_/pinned_row_corner_view_ already split their own column visibility around pinned_column_boundary_.
| column_count | Number of leftmost columns now frozen, or 0. |
| int PacketList::pinnedRowHeight | ( | ) | const |
The height of a single row in this view, for sizing the pinned-row strip to exactly N rows (see PinnedRowView::sizeHint()).
Deliberately queried from this view rather than from the (separately laid-out) PinnedRowView itself: sizeHintForRow() only returns a real answer once a view has actually laid out that row, and the pinned-row views start hidden and may still have an empty model the first time a row is pinned, whereas this primary view is already showing real rows by the time there's anything to pin at all.
|
signal |
Emitted whenever the width needed for the pinned-row strip's "corner" (the frozen-column portion, matching the pinned column boundary) changes, so the owning PacketListPane can resize the corner widget in its layout to match, and whenever whether any rows are pinned at all may have changed, so the pane can show/hide the whole strip. Emitted from layoutPinnedOverlays(), which already runs whenever column widths, the pinned column boundary, or the pinned row set change.
have_pinned_rows is passed explicitly rather than left for PacketListPane to infer from the row views' own isVisible(): those views are nested inside the very strip widget this signal controls the visibility of, and QWidget::isVisible() reflects actual on-screen visibility (requiring every ancestor to also be visible), not just a widget's own explicit show/hide flag – so deriving the strip's visibility from its own (still-hidden) children's isVisible() can never become true.
| corner_width | The width, in pixels, of the frozen-column portion. |
| have_pinned_rows | Whether at least one row is currently pinned. |
| void PacketList::pinRow | ( | int | frame_num | ) |
Pins a packet's row so that it stays visible (stacked with any other pinned rows, ordered to match the active sort) while the view is scrolled vertically. Up to PinnedRowsModel::kMaxPinnedRows packets may be pinned at once; additional pins beyond that are ignored.
| frame_num | The frame number of the packet to pin. |
| void PacketList::resizeAllColumns | ( | bool | onlyTimeFormatted = false | ) |
Resizes all columns to fit their content.
| onlyTimeFormatted | True to only resize time-formatted columns. |
|
overrideprotectedvirtual |
Handles resize events.
| event | The resize event. |
|
overrideprotectedslot |
Slot triggered when rows are inserted into the model.
| parent | The parent model index. |
| start | The starting row index. |
| end | The ending row index. |
|
overridevirtual |
Scrolls the view to the given index.
| index | The model index to scroll to. |
| hint | The scroll hint to use. |
| QList< int > PacketList::selectedRows | ( | bool | useFrameNum = false | ) |
Retrieves a list of selected row numbers.
| useFrameNum | True to return frame numbers instead of row indices. |
| void PacketList::selectFrameFromOverlay | ( | int | frame_num | ) |
Same as selectRowFromOverlay(), but given a frame/packet number directly rather than a row in this view's own model.
Used by PinnedRowView for a pinned packet that's been filtered out of the primary view entirely: such a packet has no row here at all, so model()->index(row, column) (what selectRowFromOverlay() uses) can never resolve to it. Selection itself is not actually a QModelIndex-level concept underneath – cf_select_packet() takes a frame_data* directly and works purely against the capture file's own frame array, independent of the display filter – so this bypasses the model entirely and drives that directly, then emits framesSelected() the same way selectionChanged() normally would.
| frame_num | The frame/packet number to select. |
|
overrideprotected |
Handles selection change events.
| selected | The newly selected items. |
| deselected | The newly deselected items. |
| void PacketList::selectRowFromOverlay | ( | int | row, |
| int | column, | ||
| Qt::MouseButtons | buttons ) |
Selects/marks a row as if the user had clicked it directly in this view, given a row already resolved by the overlay view's own (always-correct, since it's local) indexAt(). Avoids translating pixel coordinates between two independently laid-out QTreeViews, whose row geometry can drift by a row even when visually aligned.
| row | The row index (in this view's current row numbering). |
| column | The column that was clicked, for consistency with a direct click (used e.g. for context/copy actions). |
| buttons | The mouse buttons held during the press. |
|
slot |
Sets the active capture file.
| cf | Pointer to the capture file. |
|
inline |
Sets the capture in progress state.
| in_progress | True if a capture is running, false otherwise. |
| auto_scroll | True to enable auto-scrolling during capture. |
| void PacketList::setHoveredFrameNum | ( | int | frame_num | ) |
Same as setHoveredRowFromOverlay(), but given the frame number directly rather than a row to resolve via getFDataForRow().
Used by PinnedRowView, whose rows can represent a pinned packet that's been filtered out of the primary view entirely – such a packet has no row there at all, so a row-based lookup can never resolve to it (getFDataForRow() only searches visible rows), even though the frame number to highlight is already known directly from PinnedRowView's own model index.
| frame_num | The frame number to mark as hovered, or -1 for none. |
| void PacketList::setHoveredRowFromOverlay | ( | int | row | ) |
Updates which row is considered "hovered" from a pinned overlay view's own mouse-move event, so the hover highlight shows across the whole logical row (both frozen and non-frozen panes) rather than only in whichever pane the mouse happens to be over.
| row | The row index (in this view's current row numbering) under the mouse in the overlay view, or -1 if the mouse left it. |
|
slot |
Sets the monospace font used in the list.
| mono_font | The chosen monospace font. |
| void PacketList::setPacketComment | ( | unsigned | c_number, |
| QString | new_comment ) |
Sets the comment for a specific packet.
| c_number | The frame number of the packet. |
| new_comment | The comment text to set. |
| void PacketList::setPinnedColumnBoundary | ( | int | column_count | ) |
Freezes the leftmost columns so they stay visible while the view is scrolled horizontally.
| column_count | Number of leftmost columns to freeze; 0 clears it. |
| void PacketList::setPinnedRowViews | ( | PinnedRowView * | row_view, |
| PinnedRowView * | corner_view ) |
Supplies the pinned-row-strip overlay views for this view to manage the content/properties of (model, column widths, styles, fonts, delegates, column visibility). The views themselves are owned and positioned by the owning PacketListPane, which constructs them as siblings of this view in a normal layout above it – QTreeView reserves viewport space for its own header internally and reasserts that reservation on every geometry pass, so this content couldn't be reserved space as overlay children of PacketList itself via setViewportMargins()/setGeometry().
| row_view | The overlay view showing pinned rows' non-frozen columns. |
| corner_view | The overlay view showing pinned rows' frozen columns. |
| void PacketList::setProfileSwitcher | ( | ProfileSwitcher * | profile_switcher | ) |
Sets the profile switcher for the packet list.
| profile_switcher | Pointer to the profile switcher. |
| void PacketList::setProtoTree | ( | ProtoTree * | proto_tree | ) |
Sets the protocol tree.
| proto_tree | Pointer to the protocol tree. |
|
slot |
Sets the regular font used in the list.
| regular_font | The chosen regular font. |
| void PacketList::setVerticalAutoScroll | ( | bool | enabled = true | ) |
Enables or disables vertical auto-scrolling.
| enabled | True to enable auto-scrolling, false to disable. |
|
signal |
Signal emitted to show preferences for a specific pane.
| pane_name | The name of the preferences pane. |
| void PacketList::showContextMenuForFrame | ( | int | frame_num, |
| const QPoint & | global_pos, | ||
| bool | from_pinned_row_strip = true ) |
Same as showContextMenuForRow(), but given a frame/packet number directly for a pinned packet that's been filtered out of the primary view (see selectFrameFromOverlay() for why a row-based lookup can't reach it).
| frame_num | The frame/packet number to show the menu for. |
| global_pos | Where to actually pop up the menu on screen. |
| from_pinned_row_strip | See showContextMenuForRow(); always true in practice for this overload, since only PinnedRowView (never PinnedColumnView) ever needs the frame-number-based path (see its own comment for why). |
| void PacketList::showContextMenuForRow | ( | int | row, |
| const QPoint & | global_pos, | ||
| bool | from_pinned_row_strip = false ) |
Shows this view's context menu for a row already resolved by an overlay view's own indexAt(), rather than translating pixel coordinates across views (see selectRowFromOverlay()).
| row | The row index (in this view's current row numbering). |
| global_pos | Where to actually pop up the menu on screen. |
| from_pinned_row_strip | Whether this request originated from the pinned-row strip (PinnedRowView) specifically, rather than the frozen-column overlay (PinnedColumnView) or the primary view – used to show "Unpin All Rows" only there. |
|
signal |
Signal emitted to show protocol specific preferences.
| module_name | The protocol module name. |
| void PacketList::sortByColumnFromOverlay | ( | int | column | ) |
Sorts by the given column as if its header section had been clicked directly, toggling order if it's already the sorted column. Used because a plain click on the pinned column view's own header doesn't reliably trigger QHeaderView's built-in click-to-sort machinery once its press/release events are being forwarded here for resize-drag support.
| column | The logical column index that was clicked. |
| bool PacketList::thaw | ( | bool | restore_selection = false | ) |
Enable and restore the packet list.
Enable packet list widget updates and reconnect the model.
| restore_selection | If true, redissect the previously selected packet. This includes filling in the detail and byte views. |
|
overrideprotected |
Handles timer events.
| event | The timer event. |
| bool PacketList::uniqueSelectActive | ( | ) |
Checks if a single unique selection is currently active.
| void PacketList::unpinRow | ( | int | frame_num | ) |
Unpins a single packet's row, if pinned.
| frame_num | The frame number of the packet to unpin. |
| void PacketList::writeRecent | ( | FILE * | rf | ) |
Writes recent configuration to a file.
| rf | The file pointer to write to. |