Sort/filter proxy model for the module (left-hand) pane of the Preferences dialog.
More...
#include <pref_models.h>
|
| | ModulePrefsModel (QObject *parent=Q_NULLPTR) |
| | Construct a ModulePrefsModel.
|
| |
| QVariant | data (const QModelIndex &index, int role) const |
| | Return data for index under role.
|
| |
| Qt::ItemFlags | flags (const QModelIndex &index) const |
| | Return the item flags for index.
|
| |
| int | columnCount (const QModelIndex &parent=QModelIndex()) const |
| | Return the number of columns in this model.
|
| |
| virtual bool | filterAcceptsRow (int sourceRow, const QModelIndex &sourceParent) const |
| | Determine whether a source row should appear in the module pane.
|
| |
|
| bool | lessThan (const QModelIndex &source_left, const QModelIndex &source_right) const |
| | Define the sort order for module rows.
|
| |
Sort/filter proxy model for the module (left-hand) pane of the Preferences dialog.
◆ ModulePrefsModelColumn
Column indices for the module pane.
| Enumerator |
|---|
| colName | Module display name.
|
| colLast | Sentinel — total column count.
|
◆ ModulePrefsRoles
Custom data roles for module items.
| Enumerator |
|---|
| ModuleName | Internal (short) module name string.
|
| ModuleHelp | Module help text string.
|
◆ ModulePrefsModel()
| ModulePrefsModel::ModulePrefsModel |
( |
QObject * |
parent = Q_NULLPTR | ) |
|
|
explicit |
◆ columnCount()
| int ModulePrefsModel::columnCount |
( |
const QModelIndex & |
parent = QModelIndex() | ) |
const |
Return the number of columns in this model.
- Parameters
-
| parent | Unused; present for API compatibility. |
- Returns
- Always
colLast.
◆ data()
| QVariant ModulePrefsModel::data |
( |
const QModelIndex & |
index, |
|
|
int |
role |
|
) |
| const |
Return data for index under role.
- Parameters
-
| index | The proxy model index to query. |
| role | The data role. |
- Returns
- The requested data, or an invalid QVariant if unavailable.
◆ filterAcceptsRow()
| bool ModulePrefsModel::filterAcceptsRow |
( |
int |
sourceRow, |
|
|
const QModelIndex & |
sourceParent |
|
) |
| const |
|
virtual |
Determine whether a source row should appear in the module pane.
- Parameters
-
| sourceRow | The row index in the source model. |
| sourceParent | The parent index in the source model. |
- Returns
- true if the row is a module-level item; false otherwise.
◆ flags()
| Qt::ItemFlags ModulePrefsModel::flags |
( |
const QModelIndex & |
index | ) |
const |
Return the item flags for index.
- Parameters
-
| index | The proxy model index to query. |
- Returns
- The item flags for the module at
index.
◆ lessThan()
| bool ModulePrefsModel::lessThan |
( |
const QModelIndex & |
source_left, |
|
|
const QModelIndex & |
source_right |
|
) |
| const |
|
protected |
Define the sort order for module rows.
- Parameters
-
| source_left | Source index of the left-hand item to compare. |
| source_right | Source index of the right-hand item to compare. |
- Returns
- true if the left item should appear before the right item.
The documentation for this class was generated from the following files:
- /builds/wireshark/wireshark/ui/qt/models/pref_models.h
- /builds/wireshark/wireshark/ui/qt/models/pref_models.cpp