Wireshark
4.5.0
The Wireshark network protocol analyzer
Toggle main menu visibility
Main Page
Related Pages
Topics
Namespaces
Namespace List
Namespace Members
All
Variables
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
a
b
c
d
e
f
g
h
i
m
o
p
r
s
t
u
v
w
Variables
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
Files
File List
File Members
All
_
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
v
w
x
Functions
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
v
w
x
Variables
Typedefs
a
b
c
d
e
f
g
h
i
m
p
r
s
t
u
v
w
Enumerations
Enumerator
a
b
c
e
f
h
i
n
o
r
s
t
w
Macros
_
a
b
c
d
e
f
g
h
i
j
m
n
o
p
r
s
t
u
v
w
x
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Modules
Pages
Loading...
Searching...
No Matches
ui
qt
manager
preference_manager.h
Go to the documentation of this file.
1
10
#ifndef PREFERENCE_MANAGER_H
11
#define PREFERENCE_MANAGER_H
12
13
#include <config.h>
14
15
#include <QObject>
16
#include <QMetaObject>
17
#include <QHash>
18
#include <QActionGroup>
19
20
#include <
ui/qt/models/pref_models.h
>
21
#include <
ui/qt/capture_file.h
>
22
23
class
PreferenceFactory
;
24
class
WiresharkPreference
;
25
26
class
PreferenceManager
:
public
QObject
27
{
28
public
:
29
static
PreferenceManager
* instance();
30
virtual
~PreferenceManager
();
31
32
void
registerType(
int
pref,
PreferenceFactory
* factory);
33
void
reuseType(
int
pref,
int
reuseFor);
34
WiresharkPreference
* getPreference(
PrefsItem
* item);
35
36
protected
:
37
explicit
PreferenceManager
(QObject * parent = Q_NULLPTR);
38
39
private
:
40
static
QMap<int, PreferenceFactory*> & factories();
41
};
26
class
PreferenceManager
:
public
QObject {
…
};
42
43
class
PreferenceFactory
:
public
QObject
44
{
45
public
:
46
virtual
~PreferenceFactory
();
47
virtual
WiresharkPreference
* create(QObject * parent = Q_NULLPTR) = 0;
48
};
43
class
PreferenceFactory
:
public
QObject {
…
};
49
50
#define REGISTER_PREFERENCE_TYPE(pref_id, preference_class) \
51
class preference_class##pref_id##Factory : public PreferenceFactory { \
52
public: \
53
preference_class##pref_id##Factory() \
54
{ \
55
PreferenceManager::instance()->registerType(pref_id, this); \
56
} \
57
virtual WiresharkPreference *create(QObject * parent) { \
58
WiresharkPreference * newPrefHandler = new preference_class(parent); \
59
return newPrefHandler; \
60
} \
61
}; \
62
static preference_class##pref_id##Factory global_##preference_class##pref_id##Factory;
63
64
#endif
// PREFERENCE_MANAGER_H
capture_file.h
PreferenceFactory
Definition
preference_manager.h:44
PreferenceManager
Definition
preference_manager.h:27
PrefsItem
Definition
pref_models.h:70
WiresharkPreference
Definition
wireshark_preference.h:20
pref_models.h
Generated by
1.9.8