diff options
author | Jan Arve Sæther <[email protected]> | 2025-05-29 12:13:57 +0200 |
---|---|---|
committer | Santhosh Kumar <[email protected]> | 2025-05-30 08:17:04 +0200 |
commit | 9efc1fb4ac7982f105a13781fccff74a61907601 (patch) | |
tree | d5ed4e7f82f15c978a6adfa8052bc5cab6758d3a /src/quickcontrols/fusion/MenuItem.qml | |
parent | 5b17c03634dcf8f9da6e6570f579f5c2fa280830 (diff) |
Enhance QSortFilterProxyModel to be available in QML with changes
as mentioned below and export the type as SortFilterProxyModel
(Note: adopted most of these features from existing project -
https://github.com/oKcerG/SortFilterProxyModel)
* Inherit QQmlSortFilterProxyModelPrivate from
QSortFilterProxyModelHelper and use the mapping logic
of source to proxy indexes from it.
* Allow the model to be configurable with multiple filters and
sorters. The filter and sorter components shall be inherited
from QQmlFilterBase and QQmlSorterBase respectively.
The components are maintained within the respective compositor
classes. The filter and sorting operation from
QQmlSortFilterProxyModel will be forwarded to the compositor
which then iterate through the configured components to sieve
the data. This patch allows the following filters and sorters
configurable in SFPM,
Filters:
ValueFilter - Filters the data that matching with the
provided value or role name or combined
together if both are specified.
FunctionFilter - Filters the data according to the result
of the evaluated js method.
Sorters:
RoleSorter - Sorts the data according to the provided
role name.
StringSorter - Sorts the data by considering the locale.
FunctionSorter - Sorts the data according to the evaluated
js method.
* Add support for 'enabled', 'column' property for both filters
and sorters, and 'priority' property for the sorters.
Task-number: QTBUG-71348
Change-Id: I65b84936642e5f0f382d83413648d2c6794c18aa
Reviewed-by: Jan Arve Sæther <[email protected]>
Diffstat (limited to 'src/quickcontrols/fusion/MenuItem.qml')
0 files changed, 0 insertions, 0 deletions