KItemModels
ksortfilterproxymodel.cpp
24 connect(this, &KSortFilterProxyModel::modelReset, this, &KSortFilterProxyModel::rowCountChanged);
25 connect(this, &KSortFilterProxyModel::rowsInserted, this, &KSortFilterProxyModel::rowCountChanged);
26 connect(this, &KSortFilterProxyModel::rowsRemoved, this, &KSortFilterProxyModel::rowCountChanged);
28 connect(this, &KSortFilterProxyModel::sortRoleChanged, this, &KSortFilterProxyModel::syncSortRoleProperties);
29 connect(this, &KSortFilterProxyModel::filterRoleChanged, this, &KSortFilterProxyModel::syncFilterRoleProperties);
83 // NOTE: some models actually fill their roleNames() only when they get some actual data, this works around the bad behavior
97bool KSortFilterProxyModel::filterAcceptsRow(int source_row, const QModelIndex &source_parent) const
116bool KSortFilterProxyModel::filterAcceptsColumn(int source_column, const QModelIndex &source_parent) const
QJSValue filterRowCallback
A JavaScript callable that can be used to perform advanced filters on a given row.
Definition ksortfilterproxymodel.h:52
QString sortRoleName
The role of the sourceModel that will be used for sorting.
Definition ksortfilterproxymodel.h:72
Qt::SortOrder sortOrder
One of Qt.AscendingOrder or Qt.DescendingOrder.
Definition ksortfilterproxymodel.h:77
QString filterRoleName
The role of the sourceModel on which the filter will be applied.
Definition ksortfilterproxymodel.h:66
int sortColumn
Specify which column should be used for sorting The default value is -1.
Definition ksortfilterproxymodel.h:84
QJSValue filterColumnCallback
A JavaScript callable that can be used to perform advanced filters on a given column.
Definition ksortfilterproxymodel.h:60
QML_ELEMENTQString filterString
The string for the filter, only rows with their filterRole matching filterString will be displayed.
Definition ksortfilterproxymodel.h:35
void modelReset()
void rowsInserted(const QModelIndex &parent, int first, int last)
void rowsRemoved(const QModelIndex &parent, int first, int last)
virtual QHash< int, QByteArray > roleNames() const const override
sourceModel
void clear()
const_iterator constBegin() const const
const_iterator constEnd() const const
qsizetype count() const const
Key key(const T &value) const const
void reserve(qsizetype size)
QJSValue toScriptValue(const T &value)
QJSValue call(const QJSValueList &args) const const
bool isCallable() const const
bool isError() const const
bool isNull() const const
bool toBool() const const
QString toString() const const
Q_EMITQ_EMIT
QMetaObject::Connection connect(const QObject *sender, PointerToMemberFunction signal, Functor functor)
bool disconnect(const QMetaObject::Connection &connection)
virtual bool filterAcceptsColumn(int source_column, const QModelIndex &source_parent) const const
virtual bool filterAcceptsRow(int source_row, const QModelIndex &source_parent) const const
void setFilterRole(int role)
void filterRoleChanged(int filterRole)
void invalidateFilter()
void setFilterFixedString(const QString &pattern)
virtual void setSourceModel(QAbstractItemModel *sourceModel) override
virtual void sort(int column, Qt::SortOrder order) override
void setSortRole(int role)
void sortRoleChanged(int sortRole)
QString fromUtf8(QByteArrayView str)
DisplayRole
AscendingOrder
QFuture< ArgsType< Signal > > connect(Sender *sender, Signal signal)
This file is part of the KDE documentation.
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri May 2 2025 12:04:43 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri May 2 2025 12:04:43 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.