A sort/filter proxy model for AStringListList-based models.
More...
#include <astringlist_list_model.h>
|
| void | setFilter (const QString &filter) |
| | Set the filter string and trigger re-evaluation of visible rows.
|
| |
|
| | AStringListListSortFilterProxyModel (QObject *parent=Q_NULLPTR) |
| | Construct an AStringListListSortFilterProxyModel.
|
| |
| virtual bool | lessThan (const QModelIndex &left, const QModelIndex &right) const |
| | Compare two rows for sorting.
|
| |
| virtual bool | filterAcceptsRow (int sourceRow, const QModelIndex &sourceParent) const |
| | Determine whether a source row passes the current filter.
|
| |
| virtual bool | filterAcceptsColumn (int column, const QModelIndex &sourceParent) const |
| | Determine whether a source column should be visible.
|
| |
| void | setFilterType (AStringListListFilterType type, int column=-1) |
| | Set the filter match mode for a column.
|
| |
| void | setColumnToFilter (int column) |
| | Set a single column to include in filter evaluation.
|
| |
| void | setColumnsToFilter (QList< int > columns) |
| | Set multiple columns to include in filter evaluation.
|
| |
|
void | clearColumnsToFilter () |
| | Clear the list of columns included in filter evaluation.
|
| |
|
void | clearHiddenColumns () |
| | Clear the list of hidden columns, making all columns visible.
|
| |
| void | setColumnToHide (int col) |
| | Hide a column from the view.
|
| |
|
void | clearNumericColumns () |
| | Clear the list of numeric columns, reverting all to string sort.
|
| |
| void | setColumnAsNumeric (int col) |
| | Mark a column for numeric rather than lexicographic sorting.
|
| |
A sort/filter proxy model for AStringListList-based models.
◆ AStringListListFilterType
Text filter match mode applied to a column.
| Enumerator |
|---|
| FilterByContains | Row is accepted if the column value contains the filter string.
|
| FilterByStart | Row is accepted if the column value starts with the filter string.
|
| FilterByEquivalent | Row is accepted if the column value equals the filter string.
|
| FilterNone | No filtering is applied to this column.
|
◆ AStringListListSortFilterProxyModel()
| AStringListListSortFilterProxyModel::AStringListListSortFilterProxyModel |
( |
QObject * |
parent = Q_NULLPTR | ) |
|
|
explicit |
◆ filterAcceptsColumn()
| bool AStringListListSortFilterProxyModel::filterAcceptsColumn |
( |
int |
column, |
|
|
const QModelIndex & |
sourceParent |
|
) |
| const |
|
virtual |
Determine whether a source column should be visible.
- Parameters
-
| column | Column index in the source model. |
| sourceParent | Parent index in the source model (unused). |
- Returns
- true if the column should be shown; false if it is hidden.
◆ filterAcceptsRow()
| bool AStringListListSortFilterProxyModel::filterAcceptsRow |
( |
int |
sourceRow, |
|
|
const QModelIndex & |
sourceParent |
|
) |
| const |
|
virtual |
Determine whether a source row passes the current filter.
- Parameters
-
| sourceRow | Row index in the source model. |
| sourceParent | Parent index in the source model. |
- Returns
- true if the row should be shown.
◆ lessThan()
| bool AStringListListSortFilterProxyModel::lessThan |
( |
const QModelIndex & |
left, |
|
|
const QModelIndex & |
right |
|
) |
| const |
|
virtual |
Compare two rows for sorting.
- Parameters
-
| left | Source model index of the left-hand item. |
| right | Source model index of the right-hand item. |
- Returns
- true if
left should sort before right.
◆ setColumnAsNumeric()
| void AStringListListSortFilterProxyModel::setColumnAsNumeric |
( |
int |
col | ) |
|
Mark a column for numeric rather than lexicographic sorting.
- Parameters
-
| col | The column index to treat as numeric. |
◆ setColumnsToFilter()
| void AStringListListSortFilterProxyModel::setColumnsToFilter |
( |
QList< int > |
columns | ) |
|
Set multiple columns to include in filter evaluation.
- Parameters
-
| columns | The list of column indices to filter on. |
◆ setColumnToFilter()
| void AStringListListSortFilterProxyModel::setColumnToFilter |
( |
int |
column | ) |
|
Set a single column to include in filter evaluation.
- Parameters
-
| column | The column index to filter on. |
◆ setColumnToHide()
| void AStringListListSortFilterProxyModel::setColumnToHide |
( |
int |
col | ) |
|
Hide a column from the view.
- Parameters
-
| col | The column index to hide. |
◆ setFilter
| void AStringListListSortFilterProxyModel::setFilter |
( |
const QString & |
filter | ) |
|
|
slot |
Set the filter string and trigger re-evaluation of visible rows.
- Parameters
-
| filter | The text to filter on; an empty string shows all rows. |
◆ setFilterType()
Set the filter match mode for a column.
- Parameters
-
| type | The match mode to apply. |
| column | The column to configure, or -1 to apply type to all columns in columnsToFilter_. |
The documentation for this class was generated from the following files:
- /builds/wireshark/wireshark/ui/qt/models/astringlist_list_model.h
- /builds/wireshark/wireshark/ui/qt/models/astringlist_list_model.cpp