diff --git a/docs/index.html b/docs/index.html index ec8e798..ae3901e 100644 --- a/docs/index.html +++ b/docs/index.html @@ -3,40 +3,61 @@
- +SortFilterProxyModel is an implementation of QSortFilterProxyModel conveniently exposed for QML.
+SortFilterProxyModel is an implementation of QSortFilterProxyModel conveniently exposed for QML.
Filters and sorts data coming from a source QAbstractItemModel |
Filter container accepting rows accepted by all its child filters | |
Filter container accepting rows accepted by at least one of its child filters | |
Filters row with a custom filtering | |
Base type for the SortFilterProxyModel filters | |
Filters rows based on their source index | |
Filters rows between boundary values | |
Filters rows matching a regular expression | |
Base type for filters based on a source model role | |
Filters rows matching exactly a value | |
A custom role computed from a javascrip expression | |
A role resolving to true for rows matching all its filters | |
Role made from concatenating other roles | |
Base type for the SortFilterProxyModel proxy roles | |
A ProxyRole extracting data from a source role via a regular expression | |
Base type for the SortFilterProxyModel proxy roles defining a single role | |
A role using Filter to conditionnaly compute its data | |
Filters and sorts data coming from a source QAbstractItemModel | |
Sorts row with a custom sorting | |
Sorts rows based on if they match filters | |
Sorts rows based on a source model role | |
Base type for the SortFilterProxyModel sorters | |
Sorts rows based on a source model string role | |
Filter container accepting rows accepted by all its child filters | |
Filter container accepting rows accepted by at least one of its child filters | |
Filters row with a custom filtering | |
Base type for the SortFilterProxyModel filters | |
Filters rows based on their source index | |
Filters rows between boundary values | |
Filters rows matching a regular expression | |
Base type for filters based on a source model role | |
Filters rows matching exactly a value |
Abstract interface for types containing Filters |
Sorts row with a custom javascript expression | |
Sorts rows based on if they match filters | |
Sorts rows based on a source model role | |
Base type for the SortFilterProxyModel sorters | |
Sorts rows based on a source model string role |
Abstract interface for types containing Sorters |
A custom role computed from a javascript expression | |
A role resolving to true for rows matching all its filters | |
Role made from concatenating other roles | |
Base type for the SortFilterProxyModel proxy roles | |
A ProxyRole extracting data from a source role via a regular expression | |
Base type for the SortFilterProxyModel proxy roles defining a single role | |
A role using Filter to conditionnaly compute its data |
Filter container accepting rows accepted by all its child filters More...
- -Import Statement: | import . |
Inherits: | - |
The AllOf type is a Filter container that accepts rows if all of its contained (and enabled) filters accept them, or if it has no filter.
-Using it as a top level filter has the same effect as putting all its child filters as top level filters. It can however be usefull to use an AllOf filter when nested in an AnyOf filter.
- - - diff --git a/docs/qml-anyof.html b/docs/qml-anyof.html deleted file mode 100644 index 84a5e07..0000000 --- a/docs/qml-anyof.html +++ /dev/null @@ -1,55 +0,0 @@ - - - - - - -Filter container accepting rows accepted by at least one of its child filters More...
- -Import Statement: | import . |
Inherits: | - |
The AnyOf type is a Filter container that accepts rows if any of its contained (and enabled) filters accept them.
-In the following example, only the rows where the firstName
role or the lastName
role match the text entered in the nameTextField
will be accepted :
TextField { - id: nameTextField -} - -SortFilterProxyModel { - sourceModel: contactModel - filters: AnyOf { - RegExpFilter { - roleName: "lastName" - pattern: nameTextField.text - caseSensitivity: Qt.CaseInsensitive - } - RegExpFilter { - roleName: "firstName" - pattern: nameTextField.text - caseSensitivity: Qt.CaseInsensitive - } - } -}- - - diff --git a/docs/qml-expressionfilter-members.html b/docs/qml-expressionfilter-members.html deleted file mode 100644 index 3dbf4dd..0000000 --- a/docs/qml-expressionfilter-members.html +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - -
This is the complete list of members for ExpressionFilter, including inherited members.
-The following members are inherited from Filter.
- - - diff --git a/docs/qml-expressionsorter-members.html b/docs/qml-expressionsorter-members.html deleted file mode 100644 index 89c89d7..0000000 --- a/docs/qml-expressionsorter-members.html +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - -This is the complete list of members for ExpressionSorter, including inherited members.
-The following members are inherited from Sorter.
- - - diff --git a/docs/qml-expressionsorter.html b/docs/qml-expressionsorter.html deleted file mode 100644 index e1ec4ce..0000000 --- a/docs/qml-expressionsorter.html +++ /dev/null @@ -1,61 +0,0 @@ - - - - - - -Sorts row with a custom sorting More...
- -Import Statement: | import . |
Inherits: | - |
An ExpressionSorter is a Sorter allowing to implement custom sorting based on a javascript expression.
- --expression : expression |
An expression to implement custom sorting. It must evaluate to a bool. It has the same syntax has a Property Binding, except that it will be evaluated for each of the source model's rows. Model data is accessible for both rows with the modelLeft
, and modelRight
properties:
sorters: ExpressionSorter { - expression: { - return modelLeft.someRole < modelRight.someRole; - } -}-
The index
of the row is also available through modelLeft
and modelRight
.
The expression should return true
if the value of the left item is less than the value of the right item, otherwise returns false.
This expression is reevaluated for a row every time its model data changes. When an external property (not index*
or in model*
) the expression depends on changes, the expression is reevaluated for every row of the source model. To capture the properties the expression depends on, the expression is first executed with invalid data and each property access is detected by the QML engine. This means that if a property is not accessed because of a conditional, it won't be captured and the expression won't be reevaluted when this property changes.
A workaround to this problem is to access all the properties the expressions depends unconditionally at the beggining of the expression.
-This is the complete list of members for FilterSorter, including inherited members.
-The following members are inherited from Sorter.
- - - diff --git a/docs/qml-filtersorter.html b/docs/qml-filtersorter.html deleted file mode 100644 index 1c13ba0..0000000 --- a/docs/qml-filtersorter.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - -Sorts rows based on if they match filters More...
- -Import Statement: | import . |
Inherits: | - |
A FilterSorter is a Sorter that orders row matching its filters before the rows not matching the filters.
-In the following example, rows with their favorite
role set to true
will be ordered at the beginning :
SortFilterProxyModel { - sourceModel: contactModel - sorters: FilterSorter { - ValueFilter { roleName: "favorite"; value: true } - } -}- -
This property holds the list of filters for this filter sorter. If a row match all this FilterSorter's filters, it will be ordered before rows not matching all the filters.
-See also Filter.
-This is the complete list of members for IndexFilter, including inherited members.
-The following members are inherited from Filter.
- - - diff --git a/docs/qml-joinrole-members.html b/docs/qml-joinrole-members.html deleted file mode 100644 index c6804e2..0000000 --- a/docs/qml-joinrole-members.html +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - -This is the complete list of members for JoinRole, including inherited members.
- -The following members are inherited from SingleRole.
-This is the complete list of members for RangeFilter, including inherited members.
-The following members are inherited from Filter.
- - - diff --git a/docs/qml-regexpfilter-members.html b/docs/qml-regexpfilter-members.html deleted file mode 100644 index 81de448..0000000 --- a/docs/qml-regexpfilter-members.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - -This is the complete list of members for RegExpFilter, including inherited members.
-The following members are inherited from Filter.
- - - diff --git a/docs/qml-regexprole-members.html b/docs/qml-regexprole-members.html deleted file mode 100644 index 34849ac..0000000 --- a/docs/qml-regexprole-members.html +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - -This is the complete list of members for RegExpRole, including inherited members.
-This is the complete list of members for RoleFilter, including inherited members.
-The following members are inherited from Filter.
- - - diff --git a/docs/qml-rolefilter.html b/docs/qml-rolefilter.html deleted file mode 100644 index 531afaf..0000000 --- a/docs/qml-rolefilter.html +++ /dev/null @@ -1,53 +0,0 @@ - - - - - - -Base type for filters based on a source model role More...
- -Import Statement: | import . |
Inherits: | - |
Inherited By: | - |
The RoleFilter type cannot be used directly in a QML file. It exists to provide a set of common properties and methods, available across all the other filter types that inherit from it. Attempting to use the RoleFilter type directly will result in an error.
- -This property holds the role name that the filter is using to query the source model's data when filtering items.
-This is the complete list of members for RoleSorter, including inherited members.
-The following members are inherited from Sorter.
- - - diff --git a/docs/qml-rolesorter.html b/docs/qml-rolesorter.html deleted file mode 100644 index 84fde7d..0000000 --- a/docs/qml-rolesorter.html +++ /dev/null @@ -1,58 +0,0 @@ - - - - - - -Sorts rows based on a source model role More...
- -Import Statement: | import . |
Inherits: | - |
Inherited By: | - |
A RoleSorter is a simple Sorter that sorts rows based on a source model role.
-In the following example, rows with be sorted by their lastName
role :
SortFilterProxyModel {
- sourceModel: contactModel
- sorters: RoleSorter { roleName: "lastName" }
-}
-
-This property holds the role name that the sorter is using to query the source model's data when sorting items.
-This is the complete list of members for AllOf, including inherited members.
-The following members are inherited from Filter.
+This is the complete list of members for AllOf, including inherited members.
diff --git a/docs/qml-sortfilterproxymodel-allof.html b/docs/qml-sortfilterproxymodel-allof.html new file mode 100644 index 0000000..551442a --- /dev/null +++ b/docs/qml-sortfilterproxymodel-allof.html @@ -0,0 +1,67 @@ + + + + + + +Filter container accepting rows accepted by all its child filters. More...
+ +Import Statement: | import SortFilterProxyModel . |
Inherits: | + |
The AllOf type is a Filter container that accepts rows if all of its contained (and enabled) filters accept them, or if it has no filter.
+Using it as a top level filter has the same effect as putting all its child filters as top level filters. It can however be usefull to use an AllOf filter when nested in an AnyOf filter.
+See also FilterContainer.
+ +This property holds whether the filter is enabled. A disabled filter will accept every rows unconditionally (even if it's inverted).
+By default, filters are enabled.
+This property holds whether the filter is inverted. When a filter is inverted, a row normally accepted would be rejected, and vice-versa.
+By default, filters are not inverted.
+This is the complete list of members for AnyOf, including inherited members.
-The following members are inherited from Filter.
+This is the complete list of members for AnyOf, including inherited members.
diff --git a/docs/qml-sortfilterproxymodel-anyof.html b/docs/qml-sortfilterproxymodel-anyof.html new file mode 100644 index 0000000..1e269e7 --- /dev/null +++ b/docs/qml-sortfilterproxymodel-anyof.html @@ -0,0 +1,86 @@ + + + + + + +Filter container accepting rows accepted by at least one of its child filters. More...
+ +Import Statement: | import SortFilterProxyModel . |
Inherits: | + |
The AnyOf type is a Filter container that accepts rows if any of its contained (and enabled) filters accept them.
+In the following example, only the rows where the firstName
role or the lastName
role match the text entered in the nameTextField
will be accepted :
TextField { + id: nameTextField +} + +SortFilterProxyModel { + sourceModel: contactModel + filters: AnyOf { + RegExpFilter { + roleName: "lastName" + pattern: nameTextField.text + caseSensitivity: Qt.CaseInsensitive + } + RegExpFilter { + roleName: "firstName" + pattern: nameTextField.text + caseSensitivity: Qt.CaseInsensitive + } + } +}+
See also FilterContainer.
+ +This property holds whether the filter is enabled. A disabled filter will accept every rows unconditionally (even if it's inverted).
+By default, filters are enabled.
+This property holds whether the filter is inverted. When a filter is inverted, a row normally accepted would be rejected, and vice-versa.
+By default, filters are not inverted.
+This is the complete list of members for ExpressionFilter, including inherited members.
+Filters row with a custom filtering More...
+Filters row with a custom filtering. More...
Import Statement: | import . |
Inherits: | + |
Import Statement: | import SortFilterProxyModel . |
Inherits: |
An ExpressionFilter is a Filter allowing to implement custom filtering based on a javascript expression.
+An ExpressionFilter is a Filter allowing to implement custom filtering based on a javascript expression.
This property holds whether the filter is enabled. A disabled filter will accept every rows unconditionally (even if it's inverted).
+By default, filters are enabled.
+-expression : expression |
An expression to implement custom filtering, it must evaluate to a boolean. It has the same syntax has a Property Binding except it will be evaluated for each of the source model's rows. Rows that have their expression evaluating to true
will be accepted by the model. Data for each row is exposed like for a delegate of a QML View.
This expression is reevaluated for a row every time its model data changes. When an external property (not index
or in model
) the expression depends on changes, the expression is reevaluated for every row of the source model. To capture the properties the expression depends on, the expression is first executed with invalid data and each property access is detected by the QML engine. This means that if a property is not accessed because of a conditional, it won't be captured and the expression won't be reevaluted when this property changes.
A workaround to this problem is to access all the properties the expressions depends unconditionally at the beggining of the expression.
This property holds whether the filter is inverted. When a filter is inverted, a row normally accepted would be rejected, and vice-versa.
+By default, filters are not inverted.
+