A proxy model that filters and sorts the DissectorTablesModel.
More...
#include <dissector_tables_model.h>
|
| | DissectorTablesProxyModel (QObject *parent=Q_NULLPTR) |
| | Constructs a new DissectorTablesProxyModel.
|
| virtual bool | filterAcceptsRow (int sourceRow, const QModelIndex &sourceParent) const override |
| | Determines whether a row from the source model should be visible.
|
| QVariant | headerData (int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const override |
| | Retrieves header data, potentially adjusted dynamically.
|
| void | adjustHeader (const QModelIndex ¤tIndex) |
| | Adjusts the header based on the currently selected index.
|
| void | setFilter (const QString &filter, SearchTypes type) |
| | Sets the filter string used to screen items.
|
|
| bool | lessThan (const QModelIndex &source_left, const QModelIndex &source_right) const override |
| | Compares two source indices to determine their sort order.
|
A proxy model that filters and sorts the DissectorTablesModel.
◆ SearchType
Defines the search filtering scope.
| Enumerator |
|---|
| EveryWhere | Search all text fields.
|
| OnlyName | Search only names.
|
| OnlyDescription | Search only descriptions.
|
◆ DissectorTablesProxyModel()
| DissectorTablesProxyModel::DissectorTablesProxyModel |
( |
QObject * | parent = Q_NULLPTR | ) |
|
|
explicit |
◆ adjustHeader()
| void DissectorTablesProxyModel::adjustHeader |
( |
const QModelIndex & | currentIndex | ) |
|
Adjusts the header based on the currently selected index.
- Parameters
-
| currentIndex | The active model index. |
◆ filterAcceptsRow()
| bool DissectorTablesProxyModel::filterAcceptsRow |
( |
int | sourceRow, |
|
|
const QModelIndex & | sourceParent ) const |
|
overridevirtual |
Determines whether a row from the source model should be visible.
- Parameters
-
| sourceRow | The row in the source model. |
| sourceParent | The parent index in the source model. |
- Returns
- True if the row is accepted by the current filter, false otherwise.
◆ headerData()
| QVariant DissectorTablesProxyModel::headerData |
( |
int | section, |
|
|
Qt::Orientation | orientation, |
|
|
int | role = Qt::DisplayRole ) const |
|
override |
Retrieves header data, potentially adjusted dynamically.
- Parameters
-
| section | The column section. |
| orientation | The header orientation. |
| role | The requested data role (defaults to Qt::DisplayRole). |
- Returns
- The header data.
◆ lessThan()
| bool DissectorTablesProxyModel::lessThan |
( |
const QModelIndex & | source_left, |
|
|
const QModelIndex & | source_right ) const |
|
overrideprotected |
Compares two source indices to determine their sort order.
- Parameters
-
| source_left | The first source index. |
| source_right | The second source index. |
- Returns
- True if the left item should appear before the right item.
◆ setFilter()
| void DissectorTablesProxyModel::setFilter |
( |
const QString & | filter, |
|
|
SearchTypes | type ) |
Sets the filter string used to screen items.
- Parameters
-
The documentation for this class was generated from the following files:
- /builds/wireshark/wireshark/ui/qt/models/dissector_tables_model.h
- /builds/wireshark/wireshark/ui/qt/models/dissector_tables_model.cpp