Represents a single configuration profile entry in the profile manager, tracking its name, origin, lifecycle status, and auto-switch filter.
More...
#include <profile_model.h>
|
| | ProfileItem (profile_def *profile) |
| | Constructs a ProfileItem from a raw libwireshark profile definition.
|
| |
| | ProfileItem (QString name, QString reference, StatusType status, bool isGlobal, bool fromGlobal, bool isImport) |
| | Constructs a ProfileItem from individual field values.
|
| |
| const QString & | getName () const |
| | Returns the current display name of the profile.
|
| |
| const QString | getType () const |
| | Returns a localised string describing the profile type (e.g. "Personal", "Global").
|
| |
| const QString & | getAutoSwitchFilter () const |
| | Returns the display-filter expression used for automatic profile switching.
|
| |
| StatusType | getStatus () const |
| | Returns the current lifecycle status of this profile item.
|
| |
| bool | isGlobal () const |
| | Returns whether this is a read-only global (system-wide) profile.
|
| |
| bool | isFromGlobal () const |
| | Returns whether this profile was originally copied from a global profile.
|
| |
| bool | isChanged () const |
| | Returns whether the profile has unsaved changes relative to its on-disk state.
|
| |
| bool | isDefault () const |
| | Returns whether this is the built-in default profile.
|
| |
| bool | isImport () const |
| | Returns whether this profile was imported from an external source.
|
| |
| bool | isDeleted () const |
| | Returns whether this profile is marked for deletion on the next apply.
|
| |
| const QString & | getReference () const |
| | Returns the original name of the profile at creation time.
|
| |
| QString | getProfilePath (QString profileName="") const |
| | Returns the filesystem path for this profile.
|
| |
| void | setName (QString value) |
| | Sets a new display name for the profile and marks it as changed if applicable.
|
| |
| void | setStatus (StatusType status) |
| | Updates the lifecycle status of the profile.
|
| |
| void | setAutoSwitchFilter (QString value) |
| | Sets the display-filter expression used for automatic profile switching.
|
| |
|
void | setForDeletion () |
| | Marks this profile for deletion on the next call to ProfileModel::applyChanges().
|
| |
Represents a single configuration profile entry in the profile manager, tracking its name, origin, lifecycle status, and auto-switch filter.
◆ StatusType
Lifecycle status of a profile item within the model.
| Enumerator |
|---|
| New | Newly created profile, not yet persisted.
|
| Existing | Profile loaded from an existing on-disk profile directory.
|
| Changed | Existing profile whose name or settings have been modified.
|
| Copy | Profile created as a duplicate of another profile.
|
◆ ProfileItem() [1/2]
Constructs a ProfileItem from a raw libwireshark profile definition.
- Parameters
-
◆ ProfileItem() [2/2]
| ProfileItem::ProfileItem |
( |
QString |
name, |
|
|
QString |
reference, |
|
|
StatusType |
status, |
|
|
bool |
isGlobal, |
|
|
bool |
fromGlobal, |
|
|
bool |
isImport |
|
) |
| |
Constructs a ProfileItem from individual field values.
- Parameters
-
| name | Display name of the profile. |
| reference | Original name of the profile at creation time (used to locate the on-disk directory). |
| status | Initial lifecycle status. |
| isGlobal | true if this is a read-only global (system) profile. |
| fromGlobal | true if this profile was copied from a global profile. |
| isImport | true if this profile was imported from an external archive or directory. |
◆ getAutoSwitchFilter()
| const QString & ProfileItem::getAutoSwitchFilter |
( |
| ) |
const |
|
inline |
Returns the display-filter expression used for automatic profile switching.
- Returns
- Const reference to the auto-switch filter string, or an empty string if none is set.
◆ getName()
| const QString & ProfileItem::getName |
( |
| ) |
const |
|
inline |
Returns the current display name of the profile.
- Returns
- Const reference to the profile name string.
◆ getProfilePath()
| QString ProfileItem::getProfilePath |
( |
QString |
profileName = "" | ) |
const |
Returns the filesystem path for this profile.
- Parameters
-
| profileName | Name to append to the base profile directory path. If empty, the current profile name (name_) is used. |
- Returns
- Absolute path string for the profile directory.
◆ getReference()
| const QString & ProfileItem::getReference |
( |
| ) |
const |
|
inline |
Returns the original name of the profile at creation time.
Used to locate the corresponding on-disk directory when the display name has been changed.
- Returns
- Const reference to the reference name string.
◆ getStatus()
Returns the current lifecycle status of this profile item.
- Returns
- Current StatusType value.
◆ getType()
| const QString ProfileItem::getType |
( |
| ) |
const |
Returns a localised string describing the profile type (e.g. "Personal", "Global").
- Returns
- Profile type string.
◆ isChanged()
| bool ProfileItem::isChanged |
( |
| ) |
const |
|
inline |
Returns whether the profile has unsaved changes relative to its on-disk state.
- Returns
true if the profile has been modified.
◆ isDefault()
| bool ProfileItem::isDefault |
( |
| ) |
const |
Returns whether this is the built-in default profile.
- Returns
true for the default profile.
◆ isDeleted()
| bool ProfileItem::isDeleted |
( |
| ) |
const |
|
inline |
Returns whether this profile is marked for deletion on the next apply.
- Returns
true if the profile is pending deletion.
◆ isFromGlobal()
| bool ProfileItem::isFromGlobal |
( |
| ) |
const |
|
inline |
Returns whether this profile was originally copied from a global profile.
- Returns
true if the profile originated from a global profile.
◆ isGlobal()
| bool ProfileItem::isGlobal |
( |
| ) |
const |
|
inline |
Returns whether this is a read-only global (system-wide) profile.
- Returns
true for global profiles.
◆ isImport()
| bool ProfileItem::isImport |
( |
| ) |
const |
|
inline |
Returns whether this profile was imported from an external source.
- Returns
true if the profile was imported.
◆ setAutoSwitchFilter()
| void ProfileItem::setAutoSwitchFilter |
( |
QString |
value | ) |
|
Sets the display-filter expression used for automatic profile switching.
- Parameters
-
| value | Display-filter string; an empty string disables auto-switching. |
◆ setName()
| void ProfileItem::setName |
( |
QString |
value | ) |
|
Sets a new display name for the profile and marks it as changed if applicable.
- Parameters
-
◆ setStatus()
Updates the lifecycle status of the profile.
- Parameters
-
| status | New StatusType value to assign. |
The documentation for this class was generated from the following files:
- /builds/wireshark/wireshark/ui/qt/models/profile_model.h
- /builds/wireshark/wireshark/ui/qt/models/profile_model.cpp