Wireshark 5.1.0
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
PinnedOverlayView Namespace Reference

Setup shared by PinnedColumnView and PinnedRowView, the two QTreeView-based overlay panes used to keep frozen columns/pinned rows visible alongside the primary packet list. Factored out so a fix to one overlay's base configuration (or its boundary-divider widget) can't be applied to only one of the two views by mistake. More...

Classes

class  FixedRowHeightDelegate
 Delegate wrapper reporting a caller-supplied row height. Some styles (Breeze) size rows by the view's frame shape, so an overlay (NoFrame) would otherwise come out a pixel taller than PacketList and misalign. All other behavior is forwarded to the wrapped delegate, or to QStyledItemDelegate when none is given. More...

Functions

void applyCommonTreeViewSetup (QTreeView *view)
 Applies the QTreeView configuration common to every pinned overlay pane: no expand arrows, uniform row heights, no keyboard focus (see either view's constructor comment for why), continuous mouse tracking (so hover can be reported to the primary view), and no scrollbars of its own (scrolling is always mirrored from the primary view instead).
QWidget * createBoundaryDivider (QTreeView *view)
 Constructs the thin child widget marking the boundary between frozen and non-frozen columns, styled to match the palette's "mid" color the same way in both overlay panes. A plain QPainter(view) can't be used directly on a QAbstractScrollArea-derived widget like QTreeView (Qt redirects painting to the viewport, not the widget itself), so this is a real (if trivial) child widget instead of a custom paintEvent().
void repositionBoundaryDivider (QWidget *divider, QTreeView *view)
 Repositions a boundary divider widget (see createBoundaryDivider()) to hug the view's right edge, spanning its full height. Called from both overlay panes' resizeEvent() overrides to keep the divider in sync as the view is resized.
void mirrorSectionWidth (QTreeView *view, int column, int width)
 Mirrors a single section's width from the primary view's header onto this overlay view's own header, ignoring an out-of-range column (e.g. one not currently shown by this particular overlay).

Detailed Description

Setup shared by PinnedColumnView and PinnedRowView, the two QTreeView-based overlay panes used to keep frozen columns/pinned rows visible alongside the primary packet list. Factored out so a fix to one overlay's base configuration (or its boundary-divider widget) can't be applied to only one of the two views by mistake.

Function Documentation

◆ applyCommonTreeViewSetup()

void PinnedOverlayView::applyCommonTreeViewSetup ( QTreeView * view)
inline

Applies the QTreeView configuration common to every pinned overlay pane: no expand arrows, uniform row heights, no keyboard focus (see either view's constructor comment for why), continuous mouse tracking (so hover can be reported to the primary view), and no scrollbars of its own (scrolling is always mirrored from the primary view instead).

Parameters
viewThe overlay view to configure.

◆ createBoundaryDivider()

QWidget * PinnedOverlayView::createBoundaryDivider ( QTreeView * view)
inline

Constructs the thin child widget marking the boundary between frozen and non-frozen columns, styled to match the palette's "mid" color the same way in both overlay panes. A plain QPainter(view) can't be used directly on a QAbstractScrollArea-derived widget like QTreeView (Qt redirects painting to the viewport, not the widget itself), so this is a real (if trivial) child widget instead of a custom paintEvent().

Parameters
viewThe overlay view the divider belongs to (used as its parent and as the source of the palette to match).
Returns
The newly-constructed divider widget, parented to view.

◆ mirrorSectionWidth()

void PinnedOverlayView::mirrorSectionWidth ( QTreeView * view,
int column,
int width )
inline

Mirrors a single section's width from the primary view's header onto this overlay view's own header, ignoring an out-of-range column (e.g. one not currently shown by this particular overlay).

Parameters
viewThe overlay view whose header should be resized.
columnThe column (logical section index) to resize.
widthThe new width, from the primary view's header.

◆ repositionBoundaryDivider()

void PinnedOverlayView::repositionBoundaryDivider ( QWidget * divider,
QTreeView * view )
inline

Repositions a boundary divider widget (see createBoundaryDivider()) to hug the view's right edge, spanning its full height. Called from both overlay panes' resizeEvent() overrides to keep the divider in sync as the view is resized.

Parameters
dividerThe divider widget to reposition.
viewThe overlay view it belongs to.