79 virtual void scrollTo(
const QModelIndex &index, QAbstractItemView::ScrollHint hint = EnsureVisible)
override;
107 bool freeze(
bool keep_current_frame =
false);
118 bool thaw(
bool restore_selection =
false);
196 void setCaptureInProgress(
bool in_progress =
false,
bool auto_scroll =
true) { capture_in_progress_ = in_progress; tail_at_end_ = in_progress && auto_scroll; }
356 void selectionChanged(
const QItemSelection & selected,
const QItemSelection & deselected)
override;
398 virtual void resizeEvent(QResizeEvent *event)
override;
419 void rowsInserted(
const QModelIndex &parent,
int start,
int end)
override;
427 virtual void drawRow(QPainter *painter,
const QStyleOptionViewItem &option,
428 const QModelIndex &index)
const override;
447 QMenu colorize_menu_;
453 QByteArray column_state_;
459 int overlay_timer_id_;
462 bool create_near_overlay_;
465 bool create_far_overlay_;
468 QVector<QRgb> overlay_colors_;
471 bool changing_profile_;
474 QModelIndex mouse_pressed_at_;
483 QAction *show_hide_separator_;
486 QList<QAction *>show_hide_actions_;
489 bool capture_in_progress_;
495 bool columns_changed_;
498 bool set_column_visibility_;
501 bool set_style_sheet_;
504 QModelIndex frozen_current_row_;
507 QModelIndexList frozen_selected_rows_;
510 QVector<int> selection_history_;
519 GPtrArray *finfo_array;
529 void setFrameReftime(
bool set,
frame_data *fdata);
534 void setColumnVisibility();
540 void setRecentColumnWidth(
int column);
545 void drawCurrentPacket();
550 void applyRecentColumnWidths();
556 void scrollViewChanged(
bool at_end);
565 QString joinSummaryRow(QStringList col_parts,
int row,
SummaryCopyType type);
755 void columnVisibilityTriggered();
762 void sectionResized(
int col,
int,
int new_width);
770 void sectionMoved(
int logicalIndex,
int oldVisualIndex,
int newVisualIndex);
780 void vScrollBarActionTriggered(
int);
785 void drawFarOverlay();
790 void drawNearOverlay();
796 void updatePackets(
bool redraw);
801 void ctxDecodeAsDialog();
A delegate for rendering multi-colored packet items in a view.
Definition multi_color_packet_delegate.h:25
The main packet list view for displaying captured packets.
Definition packet_list.h:45
void setRegularFont(const QFont ®ular_font)
Sets the regular font used in the list.
Definition packet_list.cpp:1657
bool uniqueSelectActive()
Checks if a single unique selection is currently active.
Definition packet_list.cpp:422
QString createSummaryText(QModelIndex idx, SummaryCopyType type)
Creates a summary text for a specific index.
Definition packet_list.cpp:1971
QString allPacketComments()
Retrieves all packet comments in the capture.
Definition packet_list.cpp:1588
void applyTimeShift()
Applies a time shift to the capture packets.
Definition packet_list.cpp:1846
void timerEvent(QTimerEvent *event) override
Handles timer events.
Definition packet_list.cpp:792
void resizeAllColumns(bool onlyTimeFormatted=false)
Resizes all columns to fit their content.
Definition packet_list.cpp:2487
QString createHeaderSummaryForAligned(QStringList hdr_parts, QList< int > align_parts, QList< int > size_parts)
Creates an aligned header summary.
Definition packet_list.cpp:2054
void setTimeReference()
Toggles the time reference status on the currently selected frame.
Definition packet_list.cpp:1832
virtual void mouseMoveEvent(QMouseEvent *event) override
Handles mouse move events.
Definition packet_list.cpp:839
virtual void keyPressEvent(QKeyEvent *event) override
Handles key press events.
Definition packet_list.cpp:921
void markAllDisplayedFrames(bool set)
Marks or unmarks all displayed frames.
Definition packet_list.cpp:1781
QList< int > createAlignmentPartsForAligned()
Creates alignment parts for formatting.
Definition packet_list.cpp:2008
void setPacketComment(unsigned c_number, QString new_comment)
Sets the comment for a specific packet.
Definition packet_list.cpp:1564
void addPacketComment(QString new_comment)
Adds a new comment to the currently selected packet.
Definition packet_list.cpp:1538
void resetColumns()
Resets the columns to their default state.
Definition packet_list.cpp:1131
void goPreviousPacket()
Navigates to the previous packet.
Definition packet_list.cpp:1681
void setProfileSwitcher(ProfileSwitcher *profile_switcher)
Sets the profile switcher for the packet list.
Definition packet_list.cpp:1172
void redrawVisiblePackets()
Fully redraws all visible packets.
Definition packet_list.cpp:1120
bool freeze(bool keep_current_frame=false)
Disable and clear the packet list.
Definition packet_list.cpp:1325
void setCaptureInProgress(bool in_progress=false, bool auto_scroll=true)
Sets the capture in progress state.
Definition packet_list.h:196
QMenu * colorizeMenu()
Retrieves the colorize menu.
Definition packet_list.h:91
void captureFileReadFinished()
Handles the event when the capture file has finished reading.
Definition packet_list.cpp:1312
virtual void mousePressEvent(QMouseEvent *event) override
Handles mouse press events.
Definition packet_list.cpp:813
void writeRecent(FILE *rf)
Writes recent configuration to a file.
Definition packet_list.cpp:1411
QList< int > createSizePartsForAligned(bool useHeader, QStringList hdr_parts, QList< int > rows)
Creates size parts for aligned formatting.
Definition packet_list.cpp:2019
void deleteCommentsFromPackets()
Deletes comments from the selected packets.
Definition packet_list.cpp:1619
void colorsChanged()
Slot triggered when global color configurations change.
Definition packet_list.cpp:313
bool havePreviousHistory(bool update_cur=false)
Checks if there is a previous packet in the selection history.
Definition packet_list.cpp:1155
virtual void focusInEvent(QFocusEvent *event) override
Handles focus in events.
Definition packet_list.cpp:1007
virtual void contextMenuEvent(QContextMenuEvent *event) override
Handles context menu events.
Definition packet_list.cpp:601
virtual void scrollTo(const QModelIndex &index, QAbstractItemView::ScrollHint hint=EnsureVisible) override
Scrolls the view to the given index.
Definition packet_list.cpp:300
void editColumn(int column)
Signal emitted to trigger editing for a specific column.
QString createOpeningTagForHtml()
Creates the opening tag block for HTML summaries.
Definition packet_list.cpp:2106
QMenu * conversationMenu()
Retrieves the conversation menu.
Definition packet_list.h:85
void setColumnDelegate()
Sets the column delegate for the view.
Definition packet_list.cpp:1046
bool haveNextHistory(bool update_cur=false)
Checks if there is a next packet in the selection history.
Definition packet_list.cpp:1137
bool thaw(bool restore_selection=false)
Enable and restore the packet list.
Definition packet_list.cpp:1353
void goNextPacket()
Navigates to the next packet.
Definition packet_list.cpp:1663
virtual void drawRow(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const override
Custom drawing logic for a row.
Definition packet_list.cpp:402
void setProtoTree(ProtoTree *proto_tree)
Sets the protocol tree.
Definition packet_list.cpp:414
void goToPacket(int packet, int hf_id=-1)
Jumps directly to a specific packet number.
Definition packet_list.cpp:1720
void showProtocolPreferences(const QString module_name)
Signal emitted to show protocol specific preferences.
void clear()
Clears the packet list.
Definition packet_list.cpp:1395
void goNextHistoryPacket()
Navigates to the next packet in the selection history.
Definition packet_list.cpp:1734
bool multiSelectActive()
Checks if multiple selections are currently active.
Definition packet_list.cpp:427
QString getFilterFromRowAndColumn(QModelIndex idx)
Retrieves the filter string based on a given row and column.
Definition packet_list.cpp:1441
~PacketList()
Destroys the PacketList object.
Definition packet_list.cpp:292
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:1629
void setMonospaceFont(const QFont &mono_font)
Sets the monospace font used in the list.
Definition packet_list.cpp:1652
virtual void mouseReleaseEvent(QMouseEvent *event) override
Handles mouse release events.
Definition packet_list.cpp:833
void goPreviousHistoryPacket()
Navigates to the previous packet in the selection history.
Definition packet_list.cpp:1743
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:432
void columnsChanged()
Slot triggered when the column configuration changes.
Definition packet_list.cpp:1186
void goFirstPacket()
Navigates to the very first packet.
Definition packet_list.cpp:1704
void selectionChanged(const QItemSelection &selected, const QItemSelection &deselected) override
Handles selection change events.
Definition packet_list.cpp:471
void freezePacketList(bool changing_profile)
Slot to trigger freezing the packet list state.
Definition packet_list.cpp:1289
void redrawVisiblePacketsDontSelectCurrent()
Redraws all visible packets without modifying the current selection.
Definition packet_list.cpp:1127
void goLastPacket()
Navigates to the very last packet.
Definition packet_list.cpp:1712
void resetColorized()
Resets the colorized state of the packets.
Definition packet_list.cpp:1509
QString createDefaultStyleForHtml()
Retrieves the default CSS style for HTML summaries.
Definition packet_list.cpp:2094
QString createHeaderSummaryText(SummaryCopyType type)
Creates the header summary text.
Definition packet_list.cpp:1986
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:2469
QString createClosingTagForHtml()
Creates the closing tag block for HTML summaries.
Definition packet_list.cpp:2152
QString createSummaryForAligned(QModelIndex idx, QList< int > align_parts, QList< int > size_parts)
Creates an aligned summary for a specific index.
Definition packet_list.cpp:2068
void recolorPackets()
Recolors the displayed packets based on rules.
Definition packet_list.cpp:1295
void unsetAllTimeReferences()
Unsets all time reference flags on all frames.
Definition packet_list.cpp:1839
QString createHeaderSummaryForHtml()
Creates the HTML header summary.
Definition packet_list.cpp:2111
QStringList createHeaderPartsForAligned()
Creates string parts for aligned headers.
Definition packet_list.cpp:1997
void setVerticalAutoScroll(bool enabled=true)
Enables or disables vertical auto-scrolling.
Definition packet_list.cpp:1302
void fieldsChanged(capture_file *cf)
Slot triggered when global fields configuration changes.
Definition packet_list.cpp:1207
void fieldSelected(FieldInformation *finfo)
Signal emitted when a specific field is selected.
void paintEvent(QPaintEvent *event) override
Handles paint events.
Definition packet_list.cpp:804
void setCaptureFile(capture_file *cf)
Sets the active capture file.
Definition packet_list.cpp:1640
QString getPacketComment(unsigned c_number)
Retrieves the comment for a specific packet.
Definition packet_list.cpp:1515
QString createSummaryForHtml(QModelIndex idx)
Creates an HTML summary for a specific index.
Definition packet_list.cpp:2126
bool contextMenuActive()
Checks if the context menu is currently active.
Definition packet_list.cpp:1436
SummaryCopyType
Types of formats available for copying packet summaries.
Definition packet_list.h:62
@ CopyAsYAML
Copy summary as YAML format.
Definition packet_list.h:68
@ CopyAsHTML
Copy summary as HTML format.
Definition packet_list.h:70
@ CopyAsCSV
Copy summary as Comma-Separated Values (CSV).
Definition packet_list.h:66
@ CopyAsText
Copy summary as plain text.
Definition packet_list.h:64
virtual void resizeEvent(QResizeEvent *event) override
Handles resize events.
Definition packet_list.cpp:1029
void framesSelected(QList< int > frames)
Signal emitted when multiple frames are selected.
void ignoreAllDisplayedFrames(bool set)
Ignores or un-ignores all displayed frames.
Definition packet_list.cpp:1823
void ignoreFrame()
Toggles the ignore status of the currently selected frame.
Definition packet_list.cpp:1794
void preferencesChanged()
Slot triggered when global preferences have changed.
Definition packet_list.cpp:1247
void markFrame()
Toggles the mark on the currently selected frame.
Definition packet_list.cpp:1752
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:1180
A Qt item model representing the list of packets in a capture file.
Definition packet_list_model.h:36
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
DIAG_OFF_PEDANTIC struct _frame_data frame_data
Frame data structure.
Represents a capture file and its associated metadata.
Definition cfile.h:84
Represents a preference module grouping related preferences under a named, hierarchical entry in the ...
Definition prefs-int.h:27