| Wireshark 4.7.3 The Wireshark network protocol analyzer

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

Manages the registration and creation of Wireshark preferences. More...

`#include <preference_manager.h>`

Inheritance diagram for PreferenceManager:

## Public Member Functions
virtual | ~PreferenceManager ()
| Destroys the PreferenceManager.
void | registerType (int pref, PreferenceFactory *factory)
| Registers a preference factory for a specific preference type.
void | reuseType (int pref, int reuseFor)
| Maps an existing preference factory to another preference type.
WiresharkPreference * | getPreference (PrefsItem *item)
| Retrieves a WiresharkPreference instance for the given PrefsItem.

## Static Public Member Functions
static PreferenceManager * | instance ()
| Retrieves the singleton instance of the PreferenceManager.

## Protected Member Functions
| PreferenceManager (QObject *parent=Q_NULLPTR)
| Constructs a new PreferenceManager.

## Detailed Description

Manages the registration and creation of Wireshark preferences.

## Constructor & Destructor Documentation

## ◆ PreferenceManager()

PreferenceManager::PreferenceManager | ( | QObject * | parent = Q_NULLPTR | ) |
| explicit protected

Constructs a new PreferenceManager.

Parameters

  parent | The parent QObject, defaults to Q_NULLPTR.

## Member Function Documentation

## ◆ getPreference()

WiresharkPreference * PreferenceManager::getPreference | ( | PrefsItem * | item | ) |

Retrieves a WiresharkPreference instance for the given PrefsItem.

Parameters

  item | Pointer to the PrefsItem to create a preference for.

Returns
  Pointer to the created WiresharkPreference.

## ◆ instance()

PreferenceManager * PreferenceManager::instance | ( |  | ) |
| static

Retrieves the singleton instance of the PreferenceManager.

Returns
  Pointer to the PreferenceManager instance.

## ◆ registerType()

void PreferenceManager::registerType | ( | int | pref,
|  | PreferenceFactory * | factory )

Registers a preference factory for a specific preference type.

Parameters

  pref | The preference type identifier.
  factory | Pointer to the factory to register.

## ◆ reuseType()

void PreferenceManager::reuseType | ( | int | pref,
|  | int | reuseFor )

Maps an existing preference factory to another preference type.

Parameters

  pref | The preference type identifier of the existing factory.
  reuseFor | The new preference type identifier to map to the factory.

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

- /builds/wireshark/wireshark/ui/qt/manager/preference_manager.h
- /builds/wireshark/wireshark/ui/qt/manager/preference_manager.cpp