|
Wireshark 4.7.0
The Wireshark network protocol analyzer
|
A single node in the PrefsModel tree. More...
#include <pref_models.h>
Public Member Functions | |
| PrefsItem (module_t *module, pref_t *pref, PrefsItem *parent) | |
| Construct a PrefsItem for an individual preference. | |
| PrefsItem (const QString name, PrefsItem *parent) | |
| Construct a PrefsItem for a named grouping node. | |
| PrefsItem (PrefsModel::PrefsModelType type, PrefsItem *parent) | |
| Construct a PrefsItem for a built-in preference page. | |
| virtual | ~PrefsItem () |
| Destroy this PrefsItem and all of its children. | |
| QString | getName () const |
| Return the display name of this item. | |
| pref_t * | getPref () const |
| Return the pref_t this item represents. | |
| int | getPrefType () const |
| Return the numeric type of the underlying preference. | |
| bool | isPrefDefault () const |
| Return whether the preference currently holds its default value. | |
| QString | getPrefTypeName () const |
| Return a human-readable string for the preference type. | |
| module_t * | getModule () const |
| Return the preference module associated with this item. | |
| QString | getModuleName () const |
| Return the internal (short) name of the associated module. | |
| QString | getModuleTitle () const |
| Return the display title of the associated module. | |
| QString | getModuleHelp () const |
| Return the help text for the associated module. | |
| void | setChanged (bool changed=true) |
| Mark this preference as having been changed during this session. | |
Public Member Functions inherited from ModelHelperTreeItem< PrefsItem > | |
| ModelHelperTreeItem (PrefsItem *parent) | |
| Constructs a new ModelHelperTreeItem. | |
| virtual | ~ModelHelperTreeItem () |
| Destroys the ModelHelperTreeItem and its children. | |
| void | appendChild (PrefsItem *child) |
| Appends a child item to the end of the children list. | |
| void | prependChild (PrefsItem *child) |
| Prepends a child item to the beginning of the children list. | |
| void | insertChild (int row, PrefsItem *child) |
| Inserts a child item at the specified row. | |
| void | removeChild (int row) |
| Removes and deletes the child item at the specified row. | |
| PrefsItem * | child (int row) |
| Retrieves the child item at the specified row. | |
| int | childCount () const |
| Gets the total number of child items. | |
| int | row () |
| Gets the row index of this item relative to its parent. | |
| PrefsItem * | parentItem () |
| Retrieves the parent item. | |
Additional Inherited Members | |
Protected Attributes inherited from ModelHelperTreeItem< PrefsItem > | |
| PrefsItem * | parent_ |
| QList< QVariant > | childItems_ |
A single node in the PrefsModel tree.
| PrefsItem::PrefsItem | ( | const QString | name, |
| PrefsItem * | parent | ||
| ) |
| PrefsItem::PrefsItem | ( | PrefsModel::PrefsModelType | type, |
| PrefsItem * | parent | ||
| ) |
|
inline |
Return the preference module associated with this item.
module_t pointer, or nullptr for page nodes. | QString PrefsItem::getModuleHelp | ( | ) | const |
Return the help text for the associated module.
| QString PrefsItem::getModuleName | ( | ) | const |
Return the internal (short) name of the associated module.
name field, or an empty string if unavailable. | QString PrefsItem::getModuleTitle | ( | ) | const |
Return the display title of the associated module.
title field, or an empty string if unavailable.
|
inline |
Return the display name of this item.
|
inline |
Return the pref_t this item represents.
pref_t pointer, or nullptr for module/page nodes. | int PrefsItem::getPrefType | ( | ) | const |
Return the numeric type of the underlying preference.
pref_t type constant, or 0 if this is not a pref node. | QString PrefsItem::getPrefTypeName | ( | ) | const |
Return a human-readable string for the preference type.
"uint", "string", "enum", etc. | bool PrefsItem::isPrefDefault | ( | ) | const |
Return whether the preference currently holds its default value.
| void PrefsItem::setChanged | ( | bool | changed = true | ) |
Mark this preference as having been changed during this session.
| changed | true to mark as changed; false to clear the flag. |