| Wireshark 4.7.3 The Wireshark network protocol analyzer

Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | List of all members
FilterAction Class Reference

An action that applies, prepares, or modifies a display filter. More...

`#include <filter_action.h>`

Inheritance diagram for FilterAction:

## Public Types
enum | Action { ActionApply , ActionColorize , ActionCopy , ActionFind , ActionPrepare , ActionWebLookup }
| Defines an action to be taken with a filter. More...
enum | ActionType { ActionTypePlain , ActionTypeNot , ActionTypeAnd , ActionTypeOr , ActionTypeAndNot , ActionTypeOrNot }
| Defines how the new filter should be combined with the existing one. More...
enum | ActionDirection { ActionDirectionAToFromB , ActionDirectionAToB , ActionDirectionAFromB , ActionDirectionAToFromAny , ActionDirectionAToAny , ActionDirectionAFromAny , ActionDirectionAnyToFromB , ActionDirectionAnyToB , ActionDirectionAnyFromB }
| Defines the directionality aspect of the filter. More...

## Public Member Functions
| FilterAction (QObject *parent, Action action, ActionType type, QString actionName)
| Constructs a FilterAction with a specific name.
| FilterAction (QObject *parent, Action action, ActionType type, ActionDirection direction)
| Constructs a FilterAction specifying a direction.
| FilterAction (QObject *parent, Action action, ActionType type)
| Constructs a FilterAction with a specific action and type.
| FilterAction (QObject *parent, Action action)
| Constructs a basic FilterAction.
Action | action ()
| Retrieves the primary action.
ActionType | actionType ()
| Retrieves the logical action type.
ActionDirection | actionDirection ()
| Retrieves the action direction.

## Static Public Member Functions
static const QList< Action > | actions ()
| Retrieves a list of all available primary actions.
static const QString | actionName (Action action)
| Retrieves the string name of a specific action.
static const QList< ActionType > | actionTypes (Action filter_action=ActionApply)
| Retrieves a list of available action types for a given primary action.
static const QString | actionTypeName (ActionType type)
| Retrieves the string name of a specific action type.
static const QList< ActionDirection > | actionDirections ()
| Retrieves a list of all available action directions.
static const QString | actionDirectionName (ActionDirection direction)
| Retrieves the string name of a specific action direction.
static QActionGroup * | createFilterGroup (QString filter, bool prepare, bool enabled, QWidget *parent)
| Creates an action group containing standard filter operations.
static QMenu * | createFilterMenu (FilterAction::Action act, QString filter, bool enabled, QWidget *parent)
| Creates a context menu containing standard filter operations.
static QAction * | copyFilterAction (QString filter, QWidget *par)
| Creates an action specifically to copy a filter string.

## Detailed Description

An action that applies, prepares, or modifies a display filter.

## Member Enumeration Documentation

## ◆ Action

enum FilterAction::Action

Defines an action to be taken with a filter.

Enumerator
ActionApply | Apply the filter immediately.
ActionColorize | Use the filter for colorization rules.
ActionCopy | Copy the filter string to the clipboard.
ActionFind | Use the filter in a find operation.
ActionPrepare | Prepare the filter but do not apply it yet.
ActionWebLookup | Look up information related to the filter on the web.

## ◆ ActionDirection

enum FilterAction::ActionDirection

Defines the directionality aspect of the filter.

Enumerator
ActionDirectionAToFromB | Bidirectional communication between A and B.
ActionDirectionAToB | Communication from A to B.
ActionDirectionAFromB | Communication to A from B.
ActionDirectionAToFromAny | Bidirectional communication between A and any host.
ActionDirectionAToAny | Communication from A to any host.
ActionDirectionAFromAny | Communication to A from any host.
ActionDirectionAnyToFromB | Bidirectional communication between any host and B.
ActionDirectionAnyToB | Communication from any host to B.
ActionDirectionAnyFromB | Communication to any host from B.

## ◆ ActionType

enum FilterAction::ActionType

Defines how the new filter should be combined with the existing one.

Enumerator
ActionTypePlain | Replace the existing filter.
ActionTypeNot | Negate the current filter.
ActionTypeAnd | Combine with existing filter using logical AND.
ActionTypeOr | Combine with existing filter using logical OR.
ActionTypeAndNot | Combine using logical AND NOT.
ActionTypeOrNot | Combine using logical OR NOT.

## Constructor & Destructor Documentation

## ◆ FilterAction() [1/4]

FilterAction::FilterAction | ( | QObject * | parent,
|  | FilterAction::Action | action,
|  | FilterAction::ActionType | type,
|  | QString | actionName )
| explicit

Constructs a FilterAction with a specific name.

Parameters

  parent | The parent QObject.
  action | The primary action type.
  type | The logical combination type.
  actionName | The custom name for the action.

## ◆ FilterAction() [2/4]

FilterAction::FilterAction | ( | QObject * | parent,
|  | FilterAction::Action | action,
|  | FilterAction::ActionType | type,
|  | FilterAction::ActionDirection | direction )
| explicit

Constructs a FilterAction specifying a direction.

Parameters

  parent | The parent QObject.
  action | The primary action type.
  type | The logical combination type.
  direction | The directionality of the filter.

## ◆ FilterAction() [3/4]

FilterAction::FilterAction | ( | QObject * | parent,
|  | FilterAction::Action | action,
|  | FilterAction::ActionType | type )
| explicit

Constructs a FilterAction with a specific action and type.

Parameters

  parent | The parent QObject.
  action | The primary action type.
  type | The logical combination type.

## ◆ FilterAction() [4/4]

FilterAction::FilterAction | ( | QObject * | parent,
|  | FilterAction::Action | action )
| explicit

Constructs a basic FilterAction.

Parameters

  parent | The parent QObject.
  action | The primary action type.

## Member Function Documentation

## ◆ action()

Action FilterAction::action | ( |  | ) |
| inline

Retrieves the primary action.

Returns
  The configured Action.

## ◆ actionDirection()

ActionDirection FilterAction::actionDirection | ( |  | ) |
| inline

Retrieves the action direction.

Returns
  The configured ActionDirection.

## ◆ actionDirectionName()

const QString FilterAction::actionDirectionName | ( | ActionDirection | direction | ) |
| static

Retrieves the string name of a specific action direction.

Parameters

  direction | The action direction enumeration.

Returns
  The name string.

## ◆ actionDirections()

const QList< FilterAction::ActionDirection > FilterAction::actionDirections | ( |  | ) |
| static

Retrieves a list of all available action directions.

Returns
  A list of ActionDirection enumerations.

## ◆ actionName()

const QString FilterAction::actionName | ( | Action | action | ) |
| static

Retrieves the string name of a specific action.

Parameters

  action | The action enumeration.

Returns
  The name string.

## ◆ actions()

const QList< FilterAction::Action > FilterAction::actions | ( |  | ) |
| static

Retrieves a list of all available primary actions.

Returns
  A list of Action enumerations.

## ◆ actionType()

ActionType FilterAction::actionType | ( |  | ) |
| inline

Retrieves the logical action type.

Returns
  The configured ActionType.

## ◆ actionTypeName()

const QString FilterAction::actionTypeName | ( | ActionType | type | ) |
| static

Retrieves the string name of a specific action type.

Parameters

  type | The action type enumeration.

Returns
  The name string.

## ◆ actionTypes()

const QList< FilterAction::ActionType > FilterAction::actionTypes | ( | Action | filter_action = ActionApply | ) |
| static

Retrieves a list of available action types for a given primary action.

Parameters

  filter_action | The primary action context (defaults to ActionApply).

Returns
  A list of ActionType enumerations.

## ◆ copyFilterAction()

QAction * FilterAction::copyFilterAction | ( | QString | filter,
|  | QWidget * | par )
| static

Creates an action specifically to copy a filter string.

Parameters

  filter | The filter string to copy.
  par | The parent widget.

Returns
  A pointer to the created QAction.

## ◆ createFilterGroup()

QActionGroup * FilterAction::createFilterGroup | ( | QString | filter,
|  | bool | prepare,
|  | bool | enabled,
|  | QWidget * | parent )
| static

Creates an action group containing standard filter operations.

Parameters

  filter | The base filter string.
  prepare | True to only prepare the filter, false to apply it.
  enabled | True if the actions should be enabled.
  parent | The parent widget.

Returns
  A pointer to the created QActionGroup.

## ◆ createFilterMenu()

QMenu * FilterAction::createFilterMenu | ( | FilterAction::Action | act,
|  | QString | filter,
|  | bool | enabled,
|  | QWidget * | parent )
| static

Creates a context menu containing standard filter operations.

Parameters

  act | The primary action context.
  filter | The base filter string.
  enabled | True if the menu items should be enabled.
  parent | The parent widget.

Returns
  A pointer to the created QMenu.

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

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