Name Description Size Coverage
qqmlalloffilter.cpp ! \qmltype AllOfFilter \inherits FilterBase \inqmlmodule QtQml.Models \since 6.12 \preliminary \brief Combines multiple filters using logical AND in a \l SortFilterProxyModel. AllOfFilter groups a set of child filters and finds a matching row or column only when all child filters accept it. It is equivalent to applying multiple filters directly to \l SortFilterProxyModel, but allows the group itself to be enabled, disabled, or inverted as a single unit. The following snippet shows how AllOfFilter can be used to include only rows where \c status is \c "active" and \c favorite is \c true: \qml SortFilterProxyModel { sourceModel: model filters: [ AllOfFilter { ValueFilter { roleName: "parent"; value: "root" } ValueFilter { roleName: "status"; value: "active" } } ] } \endqml 2829 -
qqmlalloffilter_p.h 1357 -
qqmlanyoffilter.cpp ! \qmltype AnyOfFilter \inherits FilterBase \inqmlmodule QtQml.Models \since 6.12 \preliminary \brief Combines multiple filters using logical OR in a \l SortFilterProxyModel. AnyOfFilter groups a set of child filters and finds a matching row or column for least one of child filter in the group. This is useful when you have many independent conditions to include a row, without requiring all conditions to be satisfied. The following snippet shows how AnyOfFilter can be used to include rows where \c status is either \c "active" or \c "pending": \qml SortFilterProxyModel { sourceModel: model filters: [ AnyOfFilter { ValueFilter { roleName: "status" value: "active" } ValueFilter { roleName: "status" value: "pending" } } ] } \endqml 3191 -
qqmlanyoffilter_p.h 1357 -
qqmlcompositefilterbase.cpp ! \qmltype CompositeFilter \internal \inherits FilterBase \inqmlmodule QtQml.Models \since 6.12 \preliminary \brief Abstract base type providing functionality common to composite filters. CompositeFilter provides a set of common properties that all composite filter types inherit, such as \l AllOfFilter and \l AnyOfFilter. 2721 -
qqmlcompositefilterbase_p.h 1995 -
qqmlfilterbase.cpp ! \qmltype FilterBase \inherits QtObject \inqmlmodule QtQml.Models \since 6.10 \preliminary \brief Abstract base type providing functionality common to filters. FilterBase provides a set of common properties for all the filters that they inherit from. 2575 -
qqmlfilterbase_p.h do nothing 2430 -
qqmlfiltercompositor.cpp 6635 -
qqmlfiltercompositor_p.h 2294 -
qqmlfunctionfilter.cpp ! \qmltype FunctionFilter \inherits FilterBase \inqmlmodule QtQml.Models \since 6.10 \preliminary \brief Filters data in a \l SortFilterProxyModel based on the evaluation of the designated 'filter' method. FunctionFilter allows user to define the designated 'filter' method and it will be evaluated to filter the data. The 'filter' method takes one argument and it can be defined as inline component as below: \qml SortFilterProxyModel { sourceModel: model filters: [ FunctionFilter { id: functionFilter property int ageLimit: 20 function filter(age: int) : bool { return (age <= ageLimit) } } ] } \endqml \note The user needs to explicitly invoke \l{SortFilterProxyModel::invalidate} whenever any external qml property used within the designated 'filter' method changes. This behaviour is subject to change in the future, like implicit invalidation and thus the user doesn't need to explicitly invoke \l{SortFilterProxyModel::invalidate}. 6252 -
qqmlfunctionfilter_p.h 1814 -
qqmlrangefilter.cpp ! \qmltype RangeFilter \inherits RoleFilter \inqmlmodule QtQml.Models \since 6.12 \preliminary \brief Filters data in a \l SortFilterProxyModel by testing whether a role value falls within a given range. RangeFilter accepts rows where the value of the configured role falls between \l minimum and \l maximum. Both bounds are inclusive by default. The following example shows processes with the CPU usage in the range between 70 and 100: \qml SortFilterProxyModel { sourceModel: processModel filters: [ RangeFilter { roleName: "cpuUsage" minimum: 70 maximum: 100 } ] } \endqml Use \l exclusive() when a bound should exclude the boundary value itself: \qml RangeFilter { roleName: "cpuUsage" minimum: exclusive(70) maximum: 100 } \endqml 6571 -
qqmlrangefilter_p.h 2074 -
qqmlregexpfilter.cpp ! \qmltype RegExpFilter \inherits RoleFilter \inqmlmodule QtQml.Models \since 6.12 \preliminary \brief Filters data in a \l SortFilterProxyModel by matching a role value against a regular expression. RegExpFilter allows filtering model data using regular expression matching on a specified role. A JavaScript regular expression literal can be assigned directly to \l regExp: \qml SortFilterProxyModel { sourceModel: processModel filters: RegExpFilter { roleName: "userId" regExp: /root/i } } \endqml 3366 -
qqmlregexpfilter_p.h 1537 -
qqmlrolefilter.cpp ! \qmltype RoleFilter \inherits FilterBase \inqmlmodule QtQml.Models \since 6.10 \preliminary \brief Abstract base type providing functionality to role-dependent filters. 1745 -
qqmlrolefilter_p.h 1643 -
qqmlvaluefilter.cpp ! \qmltype ValueFilter \inherits RoleFilter \inqmlmodule QtQml.Models \since 6.10 \preliminary \brief Filters data in a \l SortFilterProxyModel based on role name and value. ValueFilter allows the user to filter the data according to the role name or specified value or both as configured in the source model. The role name used to filter the data shall be based on model \l{QAbstractItemModel::roleNames()}{role name}. The default value for role name is \c "display". The following snippet shows how ValueFilter can be used to only include data from the source model where the value of the role name \c "favorite" is \c "true": \qml SortFilterProxyModel { sourceModel: model filters: [ ValueFilter { roleName: "favorite" value: true } ] } \endqml 3456 -
qqmlvaluefilter_p.h 1472 -