|
Wireshark 4.7.0
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 | 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 | 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. | |
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 | |
| 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 | resizeEvent (QResizeEvent *event) override |
| Handles resize events. | |
| virtual void | keyPressEvent (QKeyEvent *event) override |
| Handles key press events. | |
| virtual void | focusInEvent (QFocusEvent *event) override |
| Handles focus in events. | |
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.
|
inline |
Retrieves the colorize menu.
| 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 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. |
|
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. |
|
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. |
| 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. |
|
overrideprotected |
Handles selection change events.
| selected | The newly selected items. |
| deselected | The newly deselected items. |
|
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. |
|
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::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. |
|
signal |
Signal emitted to show protocol specific preferences.
| module_name | The protocol module name. |
| 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::writeRecent | ( | FILE * | rf | ) |
Writes recent configuration to a file.
| rf | The file pointer to write to. |