|
Wireshark 4.7.0
The Wireshark network protocol analyzer
|
Tree model backing the Preferences dialog. More...
#include <pref_models.h>
Public Types | |
| enum | PrefsModelType { Advanced = Qt::UserRole , Appearance , Layout , Columns , FontAndColors , WelcomePage , Capture , Expert , FilterButtons , RSAKeys , Aggregation } |
| Top-level preference page type identifiers. More... | |
| enum | PrefsModelColumn { colName = 0 , colStatus , colType , colValue , colLast } |
| Column indices for the raw PrefsModel tree. More... | |
Public Member Functions | |
| PrefsModel (QObject *parent=Q_NULLPTR) | |
| Construct a PrefsModel and populate it from the preference registry. | |
| virtual | ~PrefsModel () |
| Destroy the model and its PrefsItem tree. | |
| QModelIndex | index (int row, int column, const QModelIndex &parent=QModelIndex()) const |
Return the model index for the item at (row, column) under parent. | |
| QModelIndex | parent (const QModelIndex &index) const |
Return the parent model index of index. | |
| QVariant | data (const QModelIndex &index, int role) const |
Return data for index under role. | |
| int | rowCount (const QModelIndex &parent=QModelIndex()) const |
Return the number of child rows under parent. | |
| int | columnCount (const QModelIndex &parent=QModelIndex()) const |
| Return the number of columns. | |
Static Public Member Functions | |
| static QString | typeToString (PrefsModelType type) |
| Return the display name for a built-in preference page type. | |
| static QString | typeToHelp (PrefsModelType type) |
| Return the help text for a built-in preference page type. | |
Tree model backing the Preferences dialog.
Column indices for the raw PrefsModel tree.
| Enumerator | |
|---|---|
| colName | Module or preference name. |
| colStatus | Default / changed status indicator. |
| colType | Preference type string. |
| colValue | Current preference value. |
| colLast | Sentinel — total column count. |
Top-level preference page type identifiers.
|
explicit |
Construct a PrefsModel and populate it from the preference registry.
| parent | The parent QObject. |
| int PrefsModel::columnCount | ( | const QModelIndex & | parent = QModelIndex() | ) | const |
Return the number of columns.
| parent | Unused; present for API compatibility. |
colLast. | QVariant PrefsModel::data | ( | const QModelIndex & | index, |
| int | role | ||
| ) | const |
Return data for index under role.
| index | The model index to query. |
| role | The data role (Qt::DisplayRole, Qt::UserRole, etc.). |
| QModelIndex PrefsModel::index | ( | int | row, |
| int | column, | ||
| const QModelIndex & | parent = QModelIndex() |
||
| ) | const |
Return the model index for the item at (row, column) under parent.
| row | Row within the parent item. |
| column | Column index. |
| parent | Parent model index; invalid index denotes the root. |
| QModelIndex PrefsModel::parent | ( | const QModelIndex & | index | ) | const |
Return the parent model index of index.
| index | A valid model index. |
index's parent, or an invalid index for top-level items. | int PrefsModel::rowCount | ( | const QModelIndex & | parent = QModelIndex() | ) | const |
Return the number of child rows under parent.
| parent | The parent model index; invalid index = root. |
|
static |
Return the help text for a built-in preference page type.
| type | The PrefsModelType to look up. |
|
static |
Return the display name for a built-in preference page type.
| type | The PrefsModelType to look up. |