| Wireshark 4.7.3 The Wireshark network protocol analyzer

Loading...
Searching...
No Matches
Public Slots | Public Member Functions | Protected Member Functions | List of all members
SearchFrame Class Reference

Collapsible search bar that allows searching packet data by display filter, hex value, string, or regular expression, with forward and backward navigation through matching frames. More...

`#include <search_frame.h>`

Inheritance diagram for SearchFrame:

## Public Slots
void | setCaptureFile (capture_file *cf)
| Updates the capture file pointer used for frame searches.
void | refreshWidgets ()
| Refreshes widget enablement and validation state.
void | findFrameWithFilter (QString &filter)
| Populates the search field with `filter`, switches the search type to display filter, and immediately executes a forward search.
void | cancelSearch ()
| Collapses the search frame and clears any active search highlight.

## Public Member Functions
| SearchFrame (QWidget *parent=0)
| Constructs a SearchFrame in its collapsed (hidden) state.
virtual | ~SearchFrame ()
| Destroys the SearchFrame and releases all associated resources.
void | animatedShow ()
| Expands the frame with an animation and focuses the search input.
void | findNext ()
| Navigates to the next frame matching the current search criteria.
void | findPrevious ()
| Navigates to the previous frame matching the current search criteria.
void | setFocus ()
| Transfers keyboard focus to the search input field.
void | setInPacketSearch (InPacketSearch *search)
| Attach in-packet search engine for the main-window proto tree.
void | setInPacketMode (bool enabled)
| Enable or disable in-packet search mode on the Find toolbar.
void | setSelectedFrames (const QList< int > &frames, bool single_selected)
| Reflect packet list selection for in-packet find.
bool | inPacketMode () const
Public Member Functions inherited from AccordionFrame
| AccordionFrame (QWidget *parent=0)
| Create an AccordionFrame with the given parent.
void | animatedShow ()
| Show the frame with a slide-down animation.
void | animatedHide ()
| Hide the frame with a slide-up animation.
void | updateStyleSheet ()
| Reapply the stylesheet after a palette or style change.

## Protected Member Functions
virtual void | keyPressEvent (QKeyEvent *event) override
| Handles key press events; maps Enter/Return to findNext() and Escape to collapsing the frame.
void | changeEvent (QEvent *event) override
| Responds to language or palette change events by retranslating and refreshing the UI.
void | updateWidgets ()
| Enables or disables UI controls based on the current search type, direction, and validity of the search expression.
QComboBox * | searchInComboBox () const
| Returns the "Search In" combo box widget for use by subclasses or tests.
bool | eventFilter (QObject *obj, QEvent *event) override
Protected Member Functions inherited from AccordionFrame
virtual void | hideEvent (QHideEvent *) override
| Emit visibilityChanged(false) when the frame is hidden.
virtual void | showEvent (QShowEvent *) override
| Emit visibilityChanged(true) when the frame is shown.

## Additional Inherited Members
Signals inherited from AccordionFrame
void | visibilityChanged (bool visible)
| Emitted when the frame's visibility changes.

## Detailed Description

Collapsible search bar that allows searching packet data by display filter, hex value, string, or regular expression, with forward and backward navigation through matching frames.

## Constructor & Destructor Documentation

## ◆ SearchFrame()

SearchFrame::SearchFrame | ( | QWidget * | parent = 0 | ) |
| explicit

Constructs a SearchFrame in its collapsed (hidden) state.

Parameters

  parent | Optional parent widget.

## Member Function Documentation

## ◆ changeEvent()

void SearchFrame::changeEvent | ( | QEvent * | event | ) |
| override protected

Responds to language or palette change events by retranslating and refreshing the UI.

Parameters

  event | The change event.

## ◆ findFrameWithFilter

void SearchFrame::findFrameWithFilter | ( | QString & | filter | ) |
| slot

Populates the search field with `filter`, switches the search type to display filter, and immediately executes a forward search.

Parameters

  filter | Display filter expression to search for.

## ◆ keyPressEvent()

void SearchFrame::keyPressEvent | ( | QKeyEvent * | event | ) |
| override protected virtual

Handles key press events; maps Enter/Return to findNext() and Escape to collapsing the frame.

Parameters

  event | The key event to process.

## ◆ searchInComboBox()

QComboBox * SearchFrame::searchInComboBox | ( |  | ) | const
| protected

Returns the "Search In" combo box widget for use by subclasses or tests.

Returns
  Pointer to the searchInComboBox widget.

## ◆ setCaptureFile

void SearchFrame::setCaptureFile | ( | capture_file * | cf | ) |
| slot

Updates the capture file pointer used for frame searches.

Parameters

  cf | New capture file; may be `NULL` when no file is open.

## ◆ setSelectedFrames()

void SearchFrame::setSelectedFrames | ( | const QList< int > & | frames,
|  | bool | single_selected )

Reflect packet list selection for in-packet find.

single_selected is `true` only when exactly one packet is selected and multi-select is not active.

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

- /builds/wireshark/wireshark/ui/qt/search_frame.h
- /builds/wireshark/wireshark/ui/qt/search_frame.cpp