ComponentSortFilterProxyModel Class

class QInstaller::ComponentSortFilterProxyModel

The ComponentSortFilterProxyModel provides support for sorting and filtering data passed between another model and a view. More...

Header: #include <ComponentSortFilterProxyModel>
Inherits: QSortFilterProxyModel

Public Functions

ComponentSortFilterProxyModel(QObject *parent = nullptr)
QVector<QModelIndex> directlyAcceptedIndexes() const

Reimplemented Protected Functions

virtual bool filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const override

Detailed Description

The class subclasses QSortFilterProxyModel. Compared to the base class, filters affect also child indexes in the base model, meaning if a certain row has a parent that is accepted by filter, it is also accepted. A distinction is made betweed directly and indirectly accepted indexes.

Member Function Documentation

[explicit] ComponentSortFilterProxyModel::ComponentSortFilterProxyModel(QObject *parent = nullptr)

Constructs object with parent.

QVector<QModelIndex> ComponentSortFilterProxyModel::directlyAcceptedIndexes() const

Returns a list of source model indexes that were accepted directly by the filter.

[override virtual protected] bool ComponentSortFilterProxyModel::filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const

Reimplements: QSortFilterProxyModel::filterAcceptsRow(int source_row, const QModelIndex &source_parent) const.

Returns true if the item in the row indicated by the given sourceRow and sourceParent should be included in the model; otherwise returns false.

© 2021 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. The Qt Company, Qt and their respective logos are trademarks of The Qt Company Ltd in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.