Wireshark 4.7.4
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
PacketListHeader Class Reference

Custom header view for the packet list. More...

#include <packet_list_header.h>

Inheritance diagram for PacketListHeader:
AdaptiveHeaderView

Signals

void resetColumnWidth (int col)
 Signal emitted to reset a column's width.
void updatePackets (bool redraw)
 Signal emitted to update the packet list.
void showColumnPreferences (QString pane_name)
 Signal emitted to show column preferences.
void editColumn (int column)
 Signal emitted to edit a specific column.
void columnsChanged ()
 Signal emitted when the columns configuration has changed.
void freezeColumnsToHere (int logicalIndex)
 Signal emitted to freeze the leftmost columns up to and including logicalIndex.
void unfreezeColumns ()

Public Member Functions

 PacketListHeader (Qt::Orientation orientation, QWidget *parent=nullptr)
 Constructs a PacketListHeader.
void showContextMenuAt (QContextMenuEvent *event)
 Public entry point used by PacketList to forward a context menu request that originated on the pinned column view's own header.
void forwardMousePressEvent (QMouseEvent *event)
 Public entry points used by PacketList to forward mouse events (used for interactive column resize) that originated on the pinned column view's own header.
void forwardMouseMoveEvent (QMouseEvent *event)
void forwardMouseReleaseEvent (QMouseEvent *event)
void setFrozenColumnCount (int frozen_column_count)
 Updates the checked/enabled state of the "freeze columns" menu item the next time the context menu opens.
Public Member Functions inherited from AdaptiveHeaderView
 AdaptiveHeaderView (Qt::Orientation orientation, QWidget *parent=nullptr)
 Constructs an AdaptiveHeaderView.
virtual QSize sizeHint () const override
 Overriding sizeHint to provide proper heights when font changes.

Protected Slots

void columnVisibilityTriggered ()
 Slot triggered to toggle column visibility.
void setAlignment (QAction *action)
 Sets the alignment of a column.
void setDisplayFormat (QAction *action)
 Sets the display format for a column.
void showColumnPrefs ()
 Shows the column preferences dialog.
void doEditColumn ()
 Initiates editing of the selected column.
void resizeToContent ()
 Resizes the column to fit its contents.
void removeColumn ()
 Removes the selected column.
void resizeToWidth ()
 Prompts to resize the column to a specific width.
void doFreezeColumnsToHere ()
void doUnfreezeColumns ()

Protected Member Functions

virtual void dropEvent (QDropEvent *event) override
 Handles drop events.
virtual void dragEnterEvent (QDragEnterEvent *event) override
 Handles drag enter events.
virtual void dragMoveEvent (QDragMoveEvent *event) override
 Handles drag move events.
virtual void mouseMoveEvent (QMouseEvent *e) override
 Handles mouse move events.
virtual void mousePressEvent (QMouseEvent *e) override
 Handles mouse press events.
virtual void contextMenuEvent (QContextMenuEvent *event) override
 Handles context menu events.
Protected Member Functions inherited from AdaptiveHeaderView
virtual void changeEvent (QEvent *event) override

Detailed Description

Custom header view for the packet list.

Constructor & Destructor Documentation

◆ PacketListHeader()

PacketListHeader::PacketListHeader ( Qt::Orientation orientation,
QWidget * parent = nullptr )

Constructs a PacketListHeader.

Parameters
orientationThe orientation of the header.
parentThe parent widget.

Member Function Documentation

◆ contextMenuEvent()

void PacketListHeader::contextMenuEvent ( QContextMenuEvent * event)
overrideprotectedvirtual

Handles context menu events.

Parameters
eventThe context menu event.

◆ dragEnterEvent()

void PacketListHeader::dragEnterEvent ( QDragEnterEvent * event)
overrideprotectedvirtual

Handles drag enter events.

Parameters
eventThe drag enter event.

◆ dragMoveEvent()

void PacketListHeader::dragMoveEvent ( QDragMoveEvent * event)
overrideprotectedvirtual

Handles drag move events.

Parameters
eventThe drag move event.

◆ dropEvent()

void PacketListHeader::dropEvent ( QDropEvent * event)
overrideprotectedvirtual

Handles drop events.

Parameters
eventThe drop event.

◆ editColumn

void PacketListHeader::editColumn ( int column)
signal

Signal emitted to edit a specific column.

Parameters
columnThe column index to edit.

◆ freezeColumnsToHere

void PacketListHeader::freezeColumnsToHere ( int logicalIndex)
signal

Signal emitted to freeze the leftmost columns up to and including logicalIndex.

Parameters
logicalIndexThe last (rightmost) column to freeze.

◆ mouseMoveEvent()

void PacketListHeader::mouseMoveEvent ( QMouseEvent * e)
overrideprotectedvirtual

Handles mouse move events.

Parameters
eThe mouse event.

◆ mousePressEvent()

void PacketListHeader::mousePressEvent ( QMouseEvent * e)
overrideprotectedvirtual

Handles mouse press events.

Parameters
eThe mouse event.

◆ resetColumnWidth

void PacketListHeader::resetColumnWidth ( int col)
signal

Signal emitted to reset a column's width.

Parameters
colThe column index to reset.

◆ setAlignment

void PacketListHeader::setAlignment ( QAction * action)
protectedslot

Sets the alignment of a column.

Parameters
actionThe action specifying the alignment.

◆ setDisplayFormat

void PacketListHeader::setDisplayFormat ( QAction * action)
protectedslot

Sets the display format for a column.

Parameters
actionThe action specifying the format.

◆ setFrozenColumnCount()

void PacketListHeader::setFrozenColumnCount ( int frozen_column_count)

Updates the checked/enabled state of the "freeze columns" menu item the next time the context menu opens.

Parameters
frozen_column_countCurrent number of frozen columns (0 = none).

◆ showColumnPreferences

void PacketListHeader::showColumnPreferences ( QString pane_name)
signal

Signal emitted to show column preferences.

Parameters
pane_nameThe name of the preference pane to show.

◆ updatePackets

void PacketListHeader::updatePackets ( bool redraw)
signal

Signal emitted to update the packet list.

Parameters
redrawTrue to force a redraw, false otherwise.

The documentation for this class was generated from the following files: