Wireshark 4.7.3
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
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.
WiresharkPreferencegetPreference (PrefsItem *item)
 Retrieves a WiresharkPreference instance for the given PrefsItem.

Static Public Member Functions

static PreferenceManagerinstance ()
 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)
explicitprotected

Constructs a new PreferenceManager.

Parameters
parentThe parent QObject, defaults to Q_NULLPTR.

Member Function Documentation

◆ getPreference()

WiresharkPreference * PreferenceManager::getPreference ( PrefsItem * item)

Retrieves a WiresharkPreference instance for the given PrefsItem.

Parameters
itemPointer 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
prefThe preference type identifier.
factoryPointer to the factory to register.

◆ reuseType()

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

Maps an existing preference factory to another preference type.

Parameters
prefThe preference type identifier of the existing factory.
reuseForThe new preference type identifier to map to the factory.

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