From 6678acc67c4fce90851e7ee7602b4350b6b4c15b Mon Sep 17 00:00:00 2001 From: grecko Date: Sun, 2 Feb 2020 16:27:31 +0100 Subject: [PATCH] doc: improve and regenerate doc --- docs/index.html | 71 +- docs/qml-allof.html | 36 - docs/qml-anyof.html | 55 -- docs/qml-expressionfilter-members.html | 23 - docs/qml-expressionsorter-members.html | 23 - docs/qml-expressionsorter.html | 61 -- docs/qml-filtersorter-members.html | 23 - docs/qml-filtersorter.html | 60 -- docs/qml-indexfilter-members.html | 24 - docs/qml-joinrole-members.html | 23 - docs/qml-rangefilter-members.html | 27 - docs/qml-regexpfilter-members.html | 26 - docs/qml-regexprole-members.html | 20 - docs/qml-rolefilter-members.html | 23 - docs/qml-rolefilter.html | 53 -- docs/qml-rolesorter-members.html | 23 - docs/qml-rolesorter.html | 58 -- ...l-sortfilterproxymodel-allof-members.html} | 7 +- docs/qml-sortfilterproxymodel-allof.html | 67 ++ ...l-sortfilterproxymodel-anyof-members.html} | 7 +- docs/qml-sortfilterproxymodel-anyof.html | 86 ++ ...erproxymodel-expressionfilter-members.html | 20 + ...ortfilterproxymodel-expressionfilter.html} | 38 +- ...terproxymodel-expressionrole-members.html} | 9 +- ...-sortfilterproxymodel-expressionrole.html} | 25 +- ...erproxymodel-expressionsorter-members.html | 21 + ...sortfilterproxymodel-expressionsorter.html | 101 +++ ...-sortfilterproxymodel-filter-members.html} | 6 +- ...l => qml-sortfilterproxymodel-filter.html} | 14 +- ...terproxymodel-filtercontainer-members.html | 18 + ...-sortfilterproxymodel-filtercontainer.html | 61 ++ ...tfilterproxymodel-filterrole-members.html} | 9 +- ... qml-sortfilterproxymodel-filterrole.html} | 28 +- ...filterproxymodel-filtersorter-members.html | 21 + ...qml-sortfilterproxymodel-filtersorter.html | 101 +++ ...tfilterproxymodel-indexfilter-members.html | 21 + ...qml-sortfilterproxymodel-indexfilter.html} | 40 +- ...sortfilterproxymodel-joinrole-members.html | 20 + ...=> qml-sortfilterproxymodel-joinrole.html} | 29 +- docs/qml-sortfilterproxymodel-members.html | 30 - ...rtfilterproxymodel-proxyrole-members.html} | 2 +- ...> qml-sortfilterproxymodel-proxyrole.html} | 8 +- ...tfilterproxymodel-rangefilter-members.html | 24 + ...qml-sortfilterproxymodel-rangefilter.html} | 68 +- ...filterproxymodel-regexpfilter-members.html | 23 + ...ml-sortfilterproxymodel-regexpfilter.html} | 54 +- ...rtfilterproxymodel-regexprole-members.html | 20 + ... qml-sortfilterproxymodel-regexprole.html} | 24 +- ...rtfilterproxymodel-rolefilter-members.html | 20 + docs/qml-sortfilterproxymodel-rolefilter.html | 77 ++ ...rtfilterproxymodel-rolesorter-members.html | 21 + docs/qml-sortfilterproxymodel-rolesorter.html | 98 +++ ...tfilterproxymodel-singlerole-members.html} | 4 +- ... qml-sortfilterproxymodel-singlerole.html} | 14 +- ...-sortfilterproxymodel-sorter-members.html} | 7 +- ...l => qml-sortfilterproxymodel-sorter.html} | 26 +- ...terproxymodel-sortercontainer-members.html | 18 + ...-sortfilterproxymodel-sortercontainer.html | 56 ++ ...oxymodel-sortfilterproxymodel-members.html | 31 + ...ilterproxymodel-sortfilterproxymodel.html} | 125 +-- ...filterproxymodel-stringsorter-members.html | 28 + ...ml-sortfilterproxymodel-stringsorter.html} | 24 +- ...rtfilterproxymodel-switchrole-members.html | 22 + ... qml-sortfilterproxymodel-switchrole.html} | 46 +- ...tfilterproxymodel-valuefilter-members.html | 21 + ...qml-sortfilterproxymodel-valuefilter.html} | 40 +- docs/qml-stringsorter-members.html | 30 - docs/qml-switchrole-members.html | 25 - docs/qml-valuefilter-members.html | 24 - docs/sortfilterproxymodel-qmlmodule.html | 44 + docs/sortfilterproxymodel.index | 224 ++--- docs/style/offline.css | 23 + filters/alloffilter.cpp | 5 +- filters/anyoffilter.cpp | 5 +- filters/expressionfilter.cpp | 3 +- filters/filter.cpp | 4 +- filters/filtercontainer.cpp | 12 +- filters/filtercontainer.h | 2 +- filters/indexfilter.cpp | 19 +- filters/rangefilter.cpp | 3 +- filters/regexpfilter.cpp | 3 +- filters/rolefilter.cpp | 3 +- filters/valuefilter.cpp | 3 +- index.qdoc | 27 + offline.css | 805 ++++++++++++++++++ proxyroles/expressionrole.cpp | 3 +- proxyroles/filterrole.cpp | 10 +- proxyroles/joinrole.cpp | 3 +- proxyroles/proxyrole.cpp | 3 +- proxyroles/proxyrolecontainer.cpp | 5 - proxyroles/proxyrolecontainer.h | 2 +- proxyroles/regexprole.cpp | 1 + proxyroles/singlerole.cpp | 4 +- proxyroles/switchrole.cpp | 9 +- qqmlsortfilterproxymodel.cpp | 30 +- sorters/expressionsorter.cpp | 3 +- sorters/filtersorter.cpp | 10 +- sorters/rolesorter.cpp | 3 +- sorters/sorter.cpp | 4 +- sorters/sortercontainer.cpp | 12 +- sorters/sortercontainer.h | 2 +- sorters/stringsorter.cpp | 3 +- sortfilterproxymodel.qdocconf | 6 +- 103 files changed, 2593 insertions(+), 1093 deletions(-) delete mode 100644 docs/qml-allof.html delete mode 100644 docs/qml-anyof.html delete mode 100644 docs/qml-expressionfilter-members.html delete mode 100644 docs/qml-expressionsorter-members.html delete mode 100644 docs/qml-expressionsorter.html delete mode 100644 docs/qml-filtersorter-members.html delete mode 100644 docs/qml-filtersorter.html delete mode 100644 docs/qml-indexfilter-members.html delete mode 100644 docs/qml-joinrole-members.html delete mode 100644 docs/qml-rangefilter-members.html delete mode 100644 docs/qml-regexpfilter-members.html delete mode 100644 docs/qml-regexprole-members.html delete mode 100644 docs/qml-rolefilter-members.html delete mode 100644 docs/qml-rolefilter.html delete mode 100644 docs/qml-rolesorter-members.html delete mode 100644 docs/qml-rolesorter.html rename docs/{qml-allof-members.html => qml-sortfilterproxymodel-allof-members.html} (56%) create mode 100644 docs/qml-sortfilterproxymodel-allof.html rename docs/{qml-anyof-members.html => qml-sortfilterproxymodel-anyof-members.html} (56%) create mode 100644 docs/qml-sortfilterproxymodel-anyof.html create mode 100644 docs/qml-sortfilterproxymodel-expressionfilter-members.html rename docs/{qml-expressionfilter.html => qml-sortfilterproxymodel-expressionfilter.html} (54%) rename docs/{qml-expressionrole-members.html => qml-sortfilterproxymodel-expressionrole-members.html} (53%) rename docs/{qml-expressionrole.html => qml-sortfilterproxymodel-expressionrole.html} (68%) create mode 100644 docs/qml-sortfilterproxymodel-expressionsorter-members.html create mode 100644 docs/qml-sortfilterproxymodel-expressionsorter.html rename docs/{qml-filter-members.html => qml-sortfilterproxymodel-filter-members.html} (57%) rename docs/{qml-filter.html => qml-sortfilterproxymodel-filter.html} (68%) create mode 100644 docs/qml-sortfilterproxymodel-filtercontainer-members.html create mode 100644 docs/qml-sortfilterproxymodel-filtercontainer.html rename docs/{qml-filterrole-members.html => qml-sortfilterproxymodel-filterrole-members.html} (54%) rename docs/{qml-filterrole.html => qml-sortfilterproxymodel-filterrole.html} (54%) create mode 100644 docs/qml-sortfilterproxymodel-filtersorter-members.html create mode 100644 docs/qml-sortfilterproxymodel-filtersorter.html create mode 100644 docs/qml-sortfilterproxymodel-indexfilter-members.html rename docs/{qml-indexfilter.html => qml-sortfilterproxymodel-indexfilter.html} (58%) create mode 100644 docs/qml-sortfilterproxymodel-joinrole-members.html rename docs/{qml-joinrole.html => qml-sortfilterproxymodel-joinrole.html} (61%) delete mode 100644 docs/qml-sortfilterproxymodel-members.html rename docs/{qml-proxyrole-members.html => qml-sortfilterproxymodel-proxyrole-members.html} (77%) rename docs/{qml-proxyrole.html => qml-sortfilterproxymodel-proxyrole.html} (52%) create mode 100644 docs/qml-sortfilterproxymodel-rangefilter-members.html rename docs/{qml-rangefilter.html => qml-sortfilterproxymodel-rangefilter.html} (51%) create mode 100644 docs/qml-sortfilterproxymodel-regexpfilter-members.html rename docs/{qml-regexpfilter.html => qml-sortfilterproxymodel-regexpfilter.html} (60%) create mode 100644 docs/qml-sortfilterproxymodel-regexprole-members.html rename docs/{qml-regexprole.html => qml-sortfilterproxymodel-regexprole.html} (62%) create mode 100644 docs/qml-sortfilterproxymodel-rolefilter-members.html create mode 100644 docs/qml-sortfilterproxymodel-rolefilter.html create mode 100644 docs/qml-sortfilterproxymodel-rolesorter-members.html create mode 100644 docs/qml-sortfilterproxymodel-rolesorter.html rename docs/{qml-singlerole-members.html => qml-sortfilterproxymodel-singlerole-members.html} (66%) rename docs/{qml-singlerole.html => qml-sortfilterproxymodel-singlerole.html} (55%) rename docs/{qml-sorter-members.html => qml-sortfilterproxymodel-sorter-members.html} (50%) rename docs/{qml-sorter.html => qml-sortfilterproxymodel-sorter.html} (62%) create mode 100644 docs/qml-sortfilterproxymodel-sortercontainer-members.html create mode 100644 docs/qml-sortfilterproxymodel-sortercontainer.html create mode 100644 docs/qml-sortfilterproxymodel-sortfilterproxymodel-members.html rename docs/{qml-sortfilterproxymodel.html => qml-sortfilterproxymodel-sortfilterproxymodel.html} (51%) create mode 100644 docs/qml-sortfilterproxymodel-stringsorter-members.html rename docs/{qml-stringsorter.html => qml-sortfilterproxymodel-stringsorter.html} (69%) create mode 100644 docs/qml-sortfilterproxymodel-switchrole-members.html rename docs/{qml-switchrole.html => qml-sortfilterproxymodel-switchrole.html} (50%) create mode 100644 docs/qml-sortfilterproxymodel-valuefilter-members.html rename docs/{qml-valuefilter.html => qml-sortfilterproxymodel-valuefilter.html} (52%) delete mode 100644 docs/qml-stringsorter-members.html delete mode 100644 docs/qml-switchrole-members.html delete mode 100644 docs/qml-valuefilter-members.html create mode 100644 docs/sortfilterproxymodel-qmlmodule.html create mode 100644 index.qdoc create mode 100644 offline.css 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 QML Module | SortFilterProxyModel -
  • SortFilterProxyModel QML Module
  • SortFilterProxyModel QML Module

    -

    SortFilterProxyModel is an implementation of QSortFilterProxyModel conveniently exposed for QML.

    +

    SortFilterProxyModel is an implementation of QSortFilterProxyModel conveniently exposed for QML.

    + +

    SortFilterProxyModel

    Filters and sorts data coming from a source QAbstractItemModel

    +

    + +

    Filters

    - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + +

    AllOf

    Filter container accepting rows accepted by all its child filters

    AnyOf

    Filter container accepting rows accepted by at least one of its child filters

    ExpressionFilter

    Filters row with a custom filtering

    Filter

    Base type for the SortFilterProxyModel filters

    IndexFilter

    Filters rows based on their source index

    RangeFilter

    Filters rows between boundary values

    RegExpFilter

    Filters rows matching a regular expression

    RoleFilter

    Base type for filters based on a source model role

    ValueFilter

    Filters rows matching exactly a value

    ExpressionRole

    A custom role computed from a javascrip expression

    FilterRole

    A role resolving to true for rows matching all its filters

    JoinRole

    Role made from concatenating other roles

    ProxyRole

    Base type for the SortFilterProxyModel proxy roles

    RegExpRole

    A ProxyRole extracting data from a source role via a regular expression

    SingleRole

    Base type for the SortFilterProxyModel proxy roles defining a single role

    SwitchRole

    A role using Filter to conditionnaly compute its data

    SortFilterProxyModel

    Filters and sorts data coming from a source QAbstractItemModel

    ExpressionSorter

    Sorts row with a custom sorting

    FilterSorter

    Sorts rows based on if they match filters

    RoleSorter

    Sorts rows based on a source model role

    Sorter

    Base type for the SortFilterProxyModel sorters

    StringSorter

    Sorts rows based on a source model string role

    AllOf

    Filter container accepting rows accepted by all its child filters

    AnyOf

    Filter container accepting rows accepted by at least one of its child filters

    ExpressionFilter

    Filters row with a custom filtering

    Filter

    Base type for the SortFilterProxyModel filters

    IndexFilter

    Filters rows based on their source index

    RangeFilter

    Filters rows between boundary values

    RegExpFilter

    Filters rows matching a regular expression

    RoleFilter

    Base type for filters based on a source model role

    ValueFilter

    Filters rows matching exactly a value

    + + +
    + +

    FilterContainer

    Abstract interface for types containing Filters

    + +

    Sorters

    +
    + + + + + +

    ExpressionSorter

    Sorts row with a custom javascript expression

    FilterSorter

    Sorts rows based on if they match filters

    RoleSorter

    Sorts rows based on a source model role

    Sorter

    Base type for the SortFilterProxyModel sorters

    StringSorter

    Sorts rows based on a source model string role

    + + +
    + +

    SorterContainer

    Abstract interface for types containing Sorters

    + +

    ProxyRoles

    +
    + + + + + + +

    ExpressionRole

    A custom role computed from a javascript expression

    FilterRole

    A role resolving to true for rows matching all its filters

    JoinRole

    Role made from concatenating other roles

    ProxyRole

    Base type for the SortFilterProxyModel proxy roles

    RegExpRole

    A ProxyRole extracting data from a source role via a regular expression

    SingleRole

    Base type for the SortFilterProxyModel proxy roles defining a single role

    SwitchRole

    A role using Filter to conditionnaly compute its data

    diff --git a/docs/qml-allof.html b/docs/qml-allof.html deleted file mode 100644 index b02053c..0000000 --- a/docs/qml-allof.html +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - AllOf QML Type | SortFilterProxyModel - - - - -

    AllOf QML Type

    - - -

    Filter container accepting rows accepted by all its child filters More...

    - -
    -
    Import Statement: import .
    Inherits:

    Filter

    -
    - - -

    Detailed Description

    -

    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 @@ - - - - - - - AnyOf QML Type | SortFilterProxyModel - - - - -

    AnyOf QML Type

    - - -

    Filter container accepting rows accepted by at least one of its child filters More...

    - -
    -
    Import Statement: import .
    Inherits:

    Filter

    -
    - - -

    Detailed Description

    -

    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 @@ - - - - - - - List of All Members for ExpressionFilter | SortFilterProxyModel - - - - -

    List of All Members for ExpressionFilter

    -

    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 @@ - - - - - - - List of All Members for ExpressionSorter | SortFilterProxyModel - - - - -

    List of All Members for ExpressionSorter

    -

    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 @@ - - - - - - - ExpressionSorter QML Type | SortFilterProxyModel - - - - -

    ExpressionSorter QML Type

    - - -

    Sorts row with a custom sorting More...

    - -
    -
    Import Statement: import .
    Inherits:

    Sorter

    -
    - -

    Properties

    - - - -

    Detailed Description

    -

    An ExpressionSorter is a Sorter allowing to implement custom sorting based on a javascript expression.

    - -

    Property Documentation

    - -
    -
    - - -

    -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.

    -
    -
    - - diff --git a/docs/qml-filtersorter-members.html b/docs/qml-filtersorter-members.html deleted file mode 100644 index 7afca22..0000000 --- a/docs/qml-filtersorter-members.html +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - List of All Members for FilterSorter | SortFilterProxyModel - - - - -

    List of All Members for FilterSorter

    -

    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 @@ - - - - - - - FilterSorter QML Type | SortFilterProxyModel - - - - -

    FilterSorter QML Type

    - - -

    Sorts rows based on if they match filters More...

    - -
    -
    Import Statement: import .
    Inherits:

    Sorter

    -
    - -

    Properties

    - - - -

    Detailed Description

    -

    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 }
    -    }
    -}
    - -

    Property Documentation

    - -
    -
    - - -

    -filters : string

    -

    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.

    -
    -
    - - diff --git a/docs/qml-indexfilter-members.html b/docs/qml-indexfilter-members.html deleted file mode 100644 index 784a8ca..0000000 --- a/docs/qml-indexfilter-members.html +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - List of All Members for IndexFilter | SortFilterProxyModel - - - - -

    List of All Members for IndexFilter

    -

    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 @@ - - - - - - - List of All Members for JoinRole | SortFilterProxyModel - - - - -

    List of All Members for JoinRole

    -

    This is the complete list of members for JoinRole, including inherited members.

    - -

    The following members are inherited from SingleRole.

    - - - diff --git a/docs/qml-rangefilter-members.html b/docs/qml-rangefilter-members.html deleted file mode 100644 index 632db4d..0000000 --- a/docs/qml-rangefilter-members.html +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - List of All Members for RangeFilter | SortFilterProxyModel - - - - -

    List of All Members for RangeFilter

    -

    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 @@ - - - - - - - List of All Members for RegExpFilter | SortFilterProxyModel - - - - -

    List of All Members for RegExpFilter

    -

    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 @@ - - - - - - - List of All Members for RegExpRole | SortFilterProxyModel - - - - -

    List of All Members for RegExpRole

    -

    This is the complete list of members for RegExpRole, including inherited members.

    - - - diff --git a/docs/qml-rolefilter-members.html b/docs/qml-rolefilter-members.html deleted file mode 100644 index d0ef0be..0000000 --- a/docs/qml-rolefilter-members.html +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - List of All Members for RoleFilter | SortFilterProxyModel - - - - -

    List of All Members for RoleFilter

    -

    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 @@ - - - - - - - RoleFilter QML Type | SortFilterProxyModel - - - - -

    RoleFilter QML Type

    - - -

    Base type for filters based on a source model role More...

    - -
    -
    Import Statement: import .
    Inherits:

    Filter

    -
    Inherited By:

    RangeFilter, RegExpFilter, and ValueFilter

    -
    - -

    Properties

    - - - -

    Detailed Description

    -

    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.

    - -

    Property Documentation

    - -
    -
    - - -

    -roleName : string

    -

    This property holds the role name that the filter is using to query the source model's data when filtering items.

    -
    -
    - - diff --git a/docs/qml-rolesorter-members.html b/docs/qml-rolesorter-members.html deleted file mode 100644 index 0c5d6e4..0000000 --- a/docs/qml-rolesorter-members.html +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - List of All Members for RoleSorter | SortFilterProxyModel - - - - -

    List of All Members for RoleSorter

    -

    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 @@ - - - - - - - RoleSorter QML Type | SortFilterProxyModel - - - - -

    RoleSorter QML Type

    - - -

    Sorts rows based on a source model role More...

    - -
    -
    Import Statement: import .
    Inherits:

    Sorter

    -
    Inherited By:

    StringSorter

    -
    - -

    Properties

    - - - -

    Detailed Description

    -

    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" }
    -}
    - -

    Property Documentation

    - -
    -
    - - -

    -roleName : string

    -

    This property holds the role name that the sorter is using to query the source model's data when sorting items.

    -
    -
    - - diff --git a/docs/qml-allof-members.html b/docs/qml-sortfilterproxymodel-allof-members.html similarity index 56% rename from docs/qml-allof-members.html rename to docs/qml-sortfilterproxymodel-allof-members.html index 1878d0c..a6b613e 100644 --- a/docs/qml-allof-members.html +++ b/docs/qml-sortfilterproxymodel-allof-members.html @@ -10,11 +10,10 @@

    List of All Members for AllOf

    -

    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 @@ + + + + + + + AllOf QML Type | SortFilterProxyModel + + + + +

    AllOf QML Type

    + + +

    Filter container accepting rows accepted by all its child filters. More...

    + +
    +
    Import Statement: import SortFilterProxyModel .
    Inherits:

    Filter

    +
    + +

    Properties

    + + + +

    Detailed Description

    +

    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.

    + +

    Property Documentation

    + +
    +
    + + +

    +enabled : bool

    +

    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.

    +
    +
    + +
    +
    + + +

    +inverted : bool

    +

    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.

    +
    +
    + + diff --git a/docs/qml-anyof-members.html b/docs/qml-sortfilterproxymodel-anyof-members.html similarity index 56% rename from docs/qml-anyof-members.html rename to docs/qml-sortfilterproxymodel-anyof-members.html index 17972ac..955d1b2 100644 --- a/docs/qml-anyof-members.html +++ b/docs/qml-sortfilterproxymodel-anyof-members.html @@ -10,11 +10,10 @@

    List of All Members for AnyOf

    -

    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 @@ + + + + + + + AnyOf QML Type | SortFilterProxyModel + + + + +

    AnyOf QML Type

    + + +

    Filter container accepting rows accepted by at least one of its child filters. More...

    + +
    +
    Import Statement: import SortFilterProxyModel .
    Inherits:

    Filter

    +
    + +

    Properties

    + + + +

    Detailed Description

    +

    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.

    + +

    Property Documentation

    + +
    +
    + + +

    +enabled : bool

    +

    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.

    +
    +
    + +
    +
    + + +

    +inverted : bool

    +

    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.

    +
    +
    + + diff --git a/docs/qml-sortfilterproxymodel-expressionfilter-members.html b/docs/qml-sortfilterproxymodel-expressionfilter-members.html new file mode 100644 index 0000000..4233a81 --- /dev/null +++ b/docs/qml-sortfilterproxymodel-expressionfilter-members.html @@ -0,0 +1,20 @@ + + + + + + + List of All Members for ExpressionFilter | SortFilterProxyModel + + + + +

    List of All Members for ExpressionFilter

    +

    This is the complete list of members for ExpressionFilter, including inherited members.

    + + + diff --git a/docs/qml-expressionfilter.html b/docs/qml-sortfilterproxymodel-expressionfilter.html similarity index 54% rename from docs/qml-expressionfilter.html rename to docs/qml-sortfilterproxymodel-expressionfilter.html index f6f0457..46bb745 100644 --- a/docs/qml-expressionfilter.html +++ b/docs/qml-sortfilterproxymodel-expressionfilter.html @@ -20,35 +20,59 @@

    ExpressionFilter QML Type

    -

    Filters row with a custom filtering More...

    +

    Filters row with a custom filtering. More...

    -
    Import Statement: import .
    Inherits:

    Filter

    +
    Import Statement: import SortFilterProxyModel .
    Inherits:

    Filter

    Properties

    Detailed Description

    -

    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.

    Property Documentation

    + +
    +
    + + +

    +enabled : bool

    +

    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

    -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.


    + +
    +
    + + +

    +inverted : bool

    +

    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.

    +
    +
    diff --git a/docs/qml-expressionrole-members.html b/docs/qml-sortfilterproxymodel-expressionrole-members.html similarity index 53% rename from docs/qml-expressionrole-members.html rename to docs/qml-sortfilterproxymodel-expressionrole-members.html index 8f640d3..8b6eeca 100644 --- a/docs/qml-expressionrole-members.html +++ b/docs/qml-sortfilterproxymodel-expressionrole-members.html @@ -10,13 +10,10 @@

    List of All Members for ExpressionRole

    -

    This is the complete list of members for ExpressionRole, including inherited members.

    +

    This is the complete list of members for ExpressionRole, including inherited members.

    -

    The following members are inherited from SingleRole.

    - diff --git a/docs/qml-expressionrole.html b/docs/qml-sortfilterproxymodel-expressionrole.html similarity index 68% rename from docs/qml-expressionrole.html rename to docs/qml-sortfilterproxymodel-expressionrole.html index d8d2c57..0ef4acb 100644 --- a/docs/qml-expressionrole.html +++ b/docs/qml-sortfilterproxymodel-expressionrole.html @@ -20,22 +20,23 @@

    ExpressionRole QML Type

    -

    A custom role computed from a javascrip expression More...

    +

    A custom role computed from a javascript expression. More...

    -
    Import Statement: import .
    Inherits:

    SingleRole

    +
    Import Statement: import SortFilterProxyModel .
    Inherits:

    SingleRole

    Properties

    Detailed Description

    -

    An ExpressionRole is a ProxyRole allowing to implement a custom role based on a javascript expression.

    +

    An ExpressionRole is a ProxyRole allowing to implement a custom role based on a javascript expression.

    In the following example, the c role is computed by adding the a role and b role of the model :

    SortFilterProxyModel {
        sourceModel: numberModel
    @@ -49,14 +50,24 @@
     
     
    - + +expression : expression

    -expression : expression

    An expression to implement a custom role. It has the same syntax has a Property Binding except it will be evaluated for each of the source model's rows. The data for this role will be the retuned valued of the expression. 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.


    + +
    +
    + + +

    +name : string

    +

    This property holds the role name of the proxy role.

    +
    +
    diff --git a/docs/qml-sortfilterproxymodel-expressionsorter-members.html b/docs/qml-sortfilterproxymodel-expressionsorter-members.html new file mode 100644 index 0000000..b32c15c --- /dev/null +++ b/docs/qml-sortfilterproxymodel-expressionsorter-members.html @@ -0,0 +1,21 @@ + + + + + + + List of All Members for ExpressionSorter | SortFilterProxyModel + + + + +

    List of All Members for ExpressionSorter

    +

    This is the complete list of members for ExpressionSorter, including inherited members.

    + + + diff --git a/docs/qml-sortfilterproxymodel-expressionsorter.html b/docs/qml-sortfilterproxymodel-expressionsorter.html new file mode 100644 index 0000000..0929234 --- /dev/null +++ b/docs/qml-sortfilterproxymodel-expressionsorter.html @@ -0,0 +1,101 @@ + + + + + + + ExpressionSorter QML Type | SortFilterProxyModel + + + + +

    ExpressionSorter QML Type

    + + +

    Sorts row with a custom javascript expression. More...

    + +
    +
    Import Statement: import SortFilterProxyModel .
    Inherits:

    Sorter

    +
    + +

    Properties

    + + + +

    Detailed Description

    +

    An ExpressionSorter is a Sorter allowing to implement custom sorting based on a javascript expression.

    + +

    Property Documentation

    + +
    +
    + + +

    +enabled : bool

    +

    This property holds whether the sorter is enabled. A disabled sorter will not change the order of the rows.

    +

    By default, sorters are enabled.

    +
    +
    + +
    +
    + + +

    +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.

    +
    +
    + +
    +
    + + +

    +priority : int

    +

    This property holds the sort priority of this sorter. Sorters with a higher priority are applied first. In case of equal priority, Sorters are ordered by their insertion order.

    +

    By default, the priority is 0.

    +
    +
    + +
    +
    + + +

    +sortOrder : Qt::SortOrder

    +

    This property holds the sort order of this sorter.

    +
    + + +
    ConstantDescription
    Qt.AscendingOrderThe items are sorted ascending e.g. starts with 'AAA' ends with 'ZZZ' in Latin-1 locales
    Qt.DescendingOrderThe items are sorted descending e.g. starts with 'ZZZ' ends with 'AAA' in Latin-1 locales
    +

    By default, sorting is in ascending order.

    +
    +
    + + diff --git a/docs/qml-filter-members.html b/docs/qml-sortfilterproxymodel-filter-members.html similarity index 57% rename from docs/qml-filter-members.html rename to docs/qml-sortfilterproxymodel-filter-members.html index 3dcb6b8..b309030 100644 --- a/docs/qml-filter-members.html +++ b/docs/qml-sortfilterproxymodel-filter-members.html @@ -10,10 +10,10 @@

    List of All Members for Filter

    -

    This is the complete list of members for Filter, including inherited members.

    +

    This is the complete list of members for Filter, including inherited members.

    diff --git a/docs/qml-filter.html b/docs/qml-sortfilterproxymodel-filter.html similarity index 68% rename from docs/qml-filter.html rename to docs/qml-sortfilterproxymodel-filter.html index 8c2d424..03cc347 100644 --- a/docs/qml-filter.html +++ b/docs/qml-sortfilterproxymodel-filter.html @@ -20,18 +20,18 @@

    Filter QML Type

    -

    Base type for the SortFilterProxyModel filters More...

    +

    Base type for the SortFilterProxyModel filters. More...

    -
    Import Statement: import .
    Inherited By:

    AllOf, AnyOf, ExpressionFilter, IndexFilter, and RoleFilter

    +
    Import Statement: import SortFilterProxyModel .
    Inherited By:

    AllOf, AnyOf, ExpressionFilter, IndexFilter, and RoleFilter

    Properties

    @@ -42,7 +42,7 @@
    - +

    enabled : bool

    @@ -53,7 +53,7 @@
    - +

    inverted : bool

    diff --git a/docs/qml-sortfilterproxymodel-filtercontainer-members.html b/docs/qml-sortfilterproxymodel-filtercontainer-members.html new file mode 100644 index 0000000..9fe2f4b --- /dev/null +++ b/docs/qml-sortfilterproxymodel-filtercontainer-members.html @@ -0,0 +1,18 @@ + + + + + + + List of All Members for FilterContainer | SortFilterProxyModel + + + + +

    List of All Members for FilterContainer

    +

    This is the complete list of members for FilterContainer, including inherited members.

    + + + diff --git a/docs/qml-sortfilterproxymodel-filtercontainer.html b/docs/qml-sortfilterproxymodel-filtercontainer.html new file mode 100644 index 0000000..2545a71 --- /dev/null +++ b/docs/qml-sortfilterproxymodel-filtercontainer.html @@ -0,0 +1,61 @@ + + + + + + + FilterContainer QML Type | SortFilterProxyModel + + + + +

    FilterContainer QML Type

    + + +

    Abstract interface for types containing Filters. More...

    + +
    +
    Import Statement: import SortFilterProxyModel .
    + +

    Attached Properties

    + + + +

    Detailed Description

    + +

    Types implementing this interface:

    +
    + + + + + + +

    AllOf

    Filter container accepting rows accepted by all its child filters

    AnyOf

    Filter container accepting rows accepted by at least one of its child filters

    FilterRole

    A role resolving to true for rows matching all its filters

    FilterSorter

    Sorts rows based on if they match filters

    SortFilterProxyModel

    Filters and sorts data coming from a source QAbstractItemModel

    SwitchRole

    A role using Filter to conditionnaly compute its data

    + +

    Attached Property Documentation

    + +
    +
    + + +

    +FilterContainer.container : bool

    +

    This attached property allows you to include in a FilterContainer a Filter that has been instantiated outside of the FilterContainer, for example in an Instantiator.

    +
    +
    + + diff --git a/docs/qml-filterrole-members.html b/docs/qml-sortfilterproxymodel-filterrole-members.html similarity index 54% rename from docs/qml-filterrole-members.html rename to docs/qml-sortfilterproxymodel-filterrole-members.html index 70af5d1..f4bb0d1 100644 --- a/docs/qml-filterrole-members.html +++ b/docs/qml-sortfilterproxymodel-filterrole-members.html @@ -10,13 +10,10 @@

    List of All Members for FilterRole

    -

    This is the complete list of members for FilterRole, including inherited members.

    +

    This is the complete list of members for FilterRole, including inherited members.

    -

    The following members are inherited from SingleRole.

    - diff --git a/docs/qml-filterrole.html b/docs/qml-sortfilterproxymodel-filterrole.html similarity index 54% rename from docs/qml-filterrole.html rename to docs/qml-sortfilterproxymodel-filterrole.html index 02c1fce..9d022cf 100644 --- a/docs/qml-filterrole.html +++ b/docs/qml-sortfilterproxymodel-filterrole.html @@ -20,22 +20,23 @@

    FilterRole QML Type

    -

    A role resolving to true for rows matching all its filters More...

    +

    A role resolving to true for rows matching all its filters. More...

    -
    Import Statement: import .
    Inherits:

    SingleRole

    +
    Import Statement: import SortFilterProxyModel .
    Inherits:

    SingleRole

    Properties

    Detailed Description

    -

    A FilterRole is a ProxyRole that returns true for rows matching all its filters.

    +

    A FilterRole is a ProxyRole that returns true for rows matching all its filters.

    In the following example, the isAdult role will be equal to true if the age role is superior or equal to 18.

    SortFilterProxyModel {
         sourceModel: personModel
    @@ -44,18 +45,29 @@
             RangeFilter { roleName: "age"; minimumValue: 18; minimumInclusive: true }
         }
     }
    +

    See also FilterContainer.

    Property Documentation

    - + +[default] filters : list<Filter>

    -filters : string

    This property holds the list of filters for this filter role. The data of this role will be equal to the true if all its filters match the model row, false otherwise.

    -

    See also Filter.

    +

    See also Filter and FilterContainer.


    + +
    +
    + + +

    +name : string

    +

    This property holds the role name of the proxy role.

    +
    +
    diff --git a/docs/qml-sortfilterproxymodel-filtersorter-members.html b/docs/qml-sortfilterproxymodel-filtersorter-members.html new file mode 100644 index 0000000..6a3961a --- /dev/null +++ b/docs/qml-sortfilterproxymodel-filtersorter-members.html @@ -0,0 +1,21 @@ + + + + + + + List of All Members for FilterSorter | SortFilterProxyModel + + + + +

    List of All Members for FilterSorter

    +

    This is the complete list of members for FilterSorter, including inherited members.

    + + + diff --git a/docs/qml-sortfilterproxymodel-filtersorter.html b/docs/qml-sortfilterproxymodel-filtersorter.html new file mode 100644 index 0000000..4d495b8 --- /dev/null +++ b/docs/qml-sortfilterproxymodel-filtersorter.html @@ -0,0 +1,101 @@ + + + + + + + FilterSorter QML Type | SortFilterProxyModel + + + + +

    FilterSorter QML Type

    + + +

    Sorts rows based on if they match filters. More...

    + +
    +
    Import Statement: import SortFilterProxyModel .
    Inherits:

    Sorter

    +
    + +

    Properties

    + + + +

    Detailed Description

    +

    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 }
    +    }
    +}
    +

    See also FilterContainer.

    + +

    Property Documentation

    + +
    +
    + + +

    +enabled : bool

    +

    This property holds whether the sorter is enabled. A disabled sorter will not change the order of the rows.

    +

    By default, sorters are enabled.

    +
    +
    + +
    +
    + + +

    +[default] filters : list<Filter>

    +

    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 and FilterContainer.

    +
    +
    + +
    +
    + + +

    +priority : int

    +

    This property holds the sort priority of this sorter. Sorters with a higher priority are applied first. In case of equal priority, Sorters are ordered by their insertion order.

    +

    By default, the priority is 0.

    +
    +
    + +
    +
    + + +

    +sortOrder : Qt::SortOrder

    +

    This property holds the sort order of this sorter.

    +
    + + +
    ConstantDescription
    Qt.AscendingOrderThe items are sorted ascending e.g. starts with 'AAA' ends with 'ZZZ' in Latin-1 locales
    Qt.DescendingOrderThe items are sorted descending e.g. starts with 'ZZZ' ends with 'AAA' in Latin-1 locales
    +

    By default, sorting is in ascending order.

    +
    +
    + + diff --git a/docs/qml-sortfilterproxymodel-indexfilter-members.html b/docs/qml-sortfilterproxymodel-indexfilter-members.html new file mode 100644 index 0000000..bc76644 --- /dev/null +++ b/docs/qml-sortfilterproxymodel-indexfilter-members.html @@ -0,0 +1,21 @@ + + + + + + + List of All Members for IndexFilter | SortFilterProxyModel + + + + +

    List of All Members for IndexFilter

    +

    This is the complete list of members for IndexFilter, including inherited members.

    + + + diff --git a/docs/qml-indexfilter.html b/docs/qml-sortfilterproxymodel-indexfilter.html similarity index 58% rename from docs/qml-indexfilter.html rename to docs/qml-sortfilterproxymodel-indexfilter.html index 59a5b90..e88806f 100644 --- a/docs/qml-indexfilter.html +++ b/docs/qml-sortfilterproxymodel-indexfilter.html @@ -20,23 +20,25 @@

    IndexFilter QML Type

    -

    Filters rows based on their source index More...

    +

    Filters rows based on their source index. More...

    -
    Import Statement: import .
    Inherits:

    Filter

    +
    Import Statement: import SortFilterProxyModel .
    Inherits:

    Filter

    Properties

    Detailed Description

    -

    An IndexFilter is a filter allowing contents to be filtered based on their source model index.

    +

    An IndexFilter is a filter allowing contents to be filtered based on their source model index.

    In the following example, only the first row of the source model will be accepted:

    SortFilterProxyModel {
        sourceModel: contactModel
    @@ -46,10 +48,32 @@
     }

    Property Documentation

    + +
    +
    + + +

    +enabled : bool

    +

    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.

    +
    +
    + +
    +
    + + +

    +inverted : bool

    +

    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.

    +
    +
    - +

    maximumIndex : int

    @@ -64,7 +88,7 @@
    - +

    minimumIndex : int

    diff --git a/docs/qml-sortfilterproxymodel-joinrole-members.html b/docs/qml-sortfilterproxymodel-joinrole-members.html new file mode 100644 index 0000000..f697e9a --- /dev/null +++ b/docs/qml-sortfilterproxymodel-joinrole-members.html @@ -0,0 +1,20 @@ + + + + + + + List of All Members for JoinRole | SortFilterProxyModel + + + + +

    List of All Members for JoinRole

    +

    This is the complete list of members for JoinRole, including inherited members.

    + + + diff --git a/docs/qml-joinrole.html b/docs/qml-sortfilterproxymodel-joinrole.html similarity index 61% rename from docs/qml-joinrole.html rename to docs/qml-sortfilterproxymodel-joinrole.html index 355eecf..1a17d3f 100644 --- a/docs/qml-joinrole.html +++ b/docs/qml-sortfilterproxymodel-joinrole.html @@ -20,23 +20,24 @@

    JoinRole QML Type

    -

    a role made from concatenating other roles More...

    +

    a role made from concatenating other roles. More...

    -
    Import Statement: import .
    Inherits:

    SingleRole

    +
    Import Statement: import SortFilterProxyModel .
    Inherits:

    SingleRole

    Properties

    Detailed Description

    -

    A JoinRole is a simple ProxyRole that concatenates other roles.

    +

    A JoinRole is a simple ProxyRole that concatenates other roles.

    In the following example, the fullName role is computed by the concatenation of the firstName role and the lastName role separated by a space :

    SortFilterProxyModel {
        sourceModel: contactModel
    @@ -47,10 +48,20 @@
     }

    Property Documentation

    + +
    +
    + + +

    +name : string

    +

    This property holds the role name of the proxy role.

    +
    +
    - +

    roleNames : list<string>

    @@ -60,11 +71,11 @@
    - +

    separator : string

    -

    This property holds the separator that is used to join the roles specified in roleNames.

    +

    This property holds the separator that is used to join the roles specified in roleNames.

    By default, it's a space.


    diff --git a/docs/qml-sortfilterproxymodel-members.html b/docs/qml-sortfilterproxymodel-members.html deleted file mode 100644 index f3230d4..0000000 --- a/docs/qml-sortfilterproxymodel-members.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - List of All Members for SortFilterProxyModel | SortFilterProxyModel - - - - -

    List of All Members for SortFilterProxyModel

    -

    This is the complete list of members for SortFilterProxyModel, including inherited members.

    - - - diff --git a/docs/qml-proxyrole-members.html b/docs/qml-sortfilterproxymodel-proxyrole-members.html similarity index 77% rename from docs/qml-proxyrole-members.html rename to docs/qml-sortfilterproxymodel-proxyrole-members.html index 06c52dd..c4bb9cb 100644 --- a/docs/qml-proxyrole-members.html +++ b/docs/qml-sortfilterproxymodel-proxyrole-members.html @@ -10,6 +10,6 @@

    List of All Members for ProxyRole

    -

    This is the complete list of members for ProxyRole, including inherited members.

    +

    This is the complete list of members for ProxyRole, including inherited members.

    diff --git a/docs/qml-proxyrole.html b/docs/qml-sortfilterproxymodel-proxyrole.html similarity index 52% rename from docs/qml-proxyrole.html rename to docs/qml-sortfilterproxymodel-proxyrole.html index 1df27b5..7408f0c 100644 --- a/docs/qml-proxyrole.html +++ b/docs/qml-sortfilterproxymodel-proxyrole.html @@ -19,17 +19,17 @@

    ProxyRole QML Type

    -

    Base type for the SortFilterProxyModel proxy roles More...

    +

    Base type for the SortFilterProxyModel proxy roles. More...

    -
    Import Statement: import .
    Inherited By:

    RegExpRole and SingleRole

    +
    Import Statement: import SortFilterProxyModel .
    Inherited By:

    RegExpRole and SingleRole

    Detailed Description

    -

    The ProxyRole 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 proxy role types that inherit from it. Attempting to use the ProxyRole type directly will result in an error.

    +

    The ProxyRole 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 proxy role types that inherit from it. Attempting to use the ProxyRole type directly will result in an error.

    diff --git a/docs/qml-sortfilterproxymodel-rangefilter-members.html b/docs/qml-sortfilterproxymodel-rangefilter-members.html new file mode 100644 index 0000000..7898ac6 --- /dev/null +++ b/docs/qml-sortfilterproxymodel-rangefilter-members.html @@ -0,0 +1,24 @@ + + + + + + + List of All Members for RangeFilter | SortFilterProxyModel + + + + +

    List of All Members for RangeFilter

    +

    This is the complete list of members for RangeFilter, including inherited members.

    + + + diff --git a/docs/qml-rangefilter.html b/docs/qml-sortfilterproxymodel-rangefilter.html similarity index 51% rename from docs/qml-rangefilter.html rename to docs/qml-sortfilterproxymodel-rangefilter.html index 278277c..0d43154 100644 --- a/docs/qml-rangefilter.html +++ b/docs/qml-sortfilterproxymodel-rangefilter.html @@ -20,26 +20,28 @@

    RangeFilter QML Type

    -

    Filters rows between boundary values More...

    +

    Filters rows between boundary values. More...

    -
    Import Statement: import .
    Inherits:

    RoleFilter

    +
    Import Statement: import SortFilterProxyModel .
    Inherits:

    RoleFilter

    Properties

    Detailed Description

    -

    A RangeFilter is a RoleFilter that accepts rows if their data is between the filter's minimum and maximum value.

    +

    A RangeFilter is a RoleFilter that accepts rows if their data is between the filter's minimum and maximum value.

    In the following example, only rows with their price role set to a value between the tow boundary of the slider will be accepted :

    RangeSlider {
        id: priceRangeSlider
    @@ -55,58 +57,80 @@ SortFilterProxyModel {
     }

    Property Documentation

    + +
    +
    + + +

    +enabled : bool

    +

    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.

    +
    +
    + +
    +
    + + +

    +inverted : bool

    +

    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.

    +
    +
    - +

    maximumInclusive : int

    -

    This property holds whether the minimumValue is inclusive.

    -

    By default, the minimumValue is inclusive.

    -

    See also minimumValue.

    +

    This property holds whether the minimumValue is inclusive.

    +

    By default, the minimumValue is inclusive.

    +

    See also minimumValue.


    - +

    maximumValue : int

    This property holds the maximumValue of the filter. Rows with a value higher than maximumValue will be rejected.

    By default, no value is set.

    -

    See also maximumInclusive.

    +

    See also maximumInclusive.


    - +

    minimumInclusive : int

    -

    This property holds whether the minimumValue is inclusive.

    -

    By default, the minimumValue is inclusive.

    -

    See also minimumValue.

    +

    This property holds whether the minimumValue is inclusive.

    +

    By default, the minimumValue is inclusive.

    +

    See also minimumValue.


    - +

    minimumValue : int

    This property holds the minimumValue of the filter. Rows with a value lower than minimumValue will be rejected.

    By default, no value is set.

    -

    See also minimumInclusive.

    +

    See also minimumInclusive.


    - +

    roleName : string

    diff --git a/docs/qml-sortfilterproxymodel-regexpfilter-members.html b/docs/qml-sortfilterproxymodel-regexpfilter-members.html new file mode 100644 index 0000000..c771d0b --- /dev/null +++ b/docs/qml-sortfilterproxymodel-regexpfilter-members.html @@ -0,0 +1,23 @@ + + + + + + + List of All Members for RegExpFilter | SortFilterProxyModel + + + + +

    List of All Members for RegExpFilter

    +

    This is the complete list of members for RegExpFilter, including inherited members.

    + + + diff --git a/docs/qml-regexpfilter.html b/docs/qml-sortfilterproxymodel-regexpfilter.html similarity index 60% rename from docs/qml-regexpfilter.html rename to docs/qml-sortfilterproxymodel-regexpfilter.html index 4018c3e..bd0c9f1 100644 --- a/docs/qml-regexpfilter.html +++ b/docs/qml-sortfilterproxymodel-regexpfilter.html @@ -20,25 +20,27 @@

    RegExpFilter QML Type

    -

    Filters rows matching a regular expression More...

    +

    Filters rows matching a regular expression. More...

    -
    Import Statement: import .
    Inherits:

    RoleFilter

    +
    Import Statement: import SortFilterProxyModel .
    Inherits:

    RoleFilter

    Properties

    Detailed Description

    -

    A RegExpFilter is a RoleFilter that accepts rows matching a regular rexpression.

    +

    A RegExpFilter is a RoleFilter that accepts rows matching a regular rexpression.

    In the following example, only rows with their lastName role beggining with the content of textfield the will be accepted:

    TextField {
        id: nameTextField
    @@ -56,28 +58,50 @@ SortFilterProxyModel {
     
     
    - +

    caseSensitivity : Qt::CaseSensitivity

    This property holds the caseSensitivity of the filter.


    + +
    +
    + + +

    +enabled : bool

    +

    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.

    +
    +
    + +
    +
    + + +

    +inverted : bool

    +

    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.

    +
    +
    - +

    pattern : bool

    The pattern used to filter the contents of the source model.

    -

    See also syntax.

    +

    See also syntax.


    - +

    roleName : string

    @@ -87,12 +111,12 @@ SortFilterProxyModel {
    - +

    syntax : enum

    The pattern used to filter the contents of the source model.

    -

    Only the source model's value having their RoleFilter::roleName data matching this pattern with the specified syntax will be kept.

    +

    Only the source model's value having their RoleFilter::roleName data matching this pattern with the specified syntax will be kept.

    @@ -101,7 +125,7 @@ SortFilterProxyModel {
    ConstantDescription
    RegExpFilter.RegExpA rich Perl-like pattern matching syntax. This is the default.
    RegExpFilter.WildcardThis provides a simple pattern matching syntax similar to that used by shells (command interpreters) for "file globbing".
    RegExpFilter.WildcardUnixThis is similar to Wildcard but with the behavior of a Unix shell. The wildcard characters can be escaped with the character "".
    RegExpFilter.W3CXmlSchema11The pattern is a regular expression as defined by the W3C XML Schema 1.1 specification.
    -

    See also pattern.

    +

    See also pattern.


    diff --git a/docs/qml-sortfilterproxymodel-regexprole-members.html b/docs/qml-sortfilterproxymodel-regexprole-members.html new file mode 100644 index 0000000..79a007d --- /dev/null +++ b/docs/qml-sortfilterproxymodel-regexprole-members.html @@ -0,0 +1,20 @@ + + + + + + + List of All Members for RegExpRole | SortFilterProxyModel + + + + +

    List of All Members for RegExpRole

    +

    This is the complete list of members for RegExpRole, including inherited members.

    + + + diff --git a/docs/qml-regexprole.html b/docs/qml-sortfilterproxymodel-regexprole.html similarity index 62% rename from docs/qml-regexprole.html rename to docs/qml-sortfilterproxymodel-regexprole.html index 162db9f..504216f 100644 --- a/docs/qml-regexprole.html +++ b/docs/qml-sortfilterproxymodel-regexprole.html @@ -20,24 +20,24 @@

    RegExpRole QML Type

    -

    A ProxyRole extracting data from a source role via a regular expression. More...

    +

    A ProxyRole extracting data from a source role via a regular expression. More...

    -
    Import Statement: import .
    Inherits:

    ProxyRole

    +
    Import Statement: import SortFilterProxyModel .
    Inherits:

    ProxyRole

    Properties

    Detailed Description

    -

    A RegExpRole is a ProxyRole that provides a role for each named capture group of its regular expression pattern.

    +

    A RegExpRole is a ProxyRole that provides a role for each named capture group of its regular expression pattern.

    In the following example, the date role of the source model will be extracted in 3 roles in the proxy moodel: year, month and day.

    SortFilterProxyModel {
         sourceModel: eventModel
    @@ -51,7 +51,7 @@
     
     
    - +

    caseSensitivity : Qt::CaseSensitivity

    @@ -61,21 +61,21 @@
    - +

    pattern : QString

    -

    This property holds the pattern of the regular expression of this RegExpRole. The RegExpRole will expose a role for each of the named capture group of the pattern.

    +

    This property holds the pattern of the regular expression of this RegExpRole. The RegExpRole will expose a role for each of the named capture group of the pattern.


    - +

    roleName : QString

    -

    This property holds the role name that the RegExpRole is using to query the source model's data to extract new roles from.

    +

    This property holds the role name that the RegExpRole is using to query the source model's data to extract new roles from.


    diff --git a/docs/qml-sortfilterproxymodel-rolefilter-members.html b/docs/qml-sortfilterproxymodel-rolefilter-members.html new file mode 100644 index 0000000..d21124b --- /dev/null +++ b/docs/qml-sortfilterproxymodel-rolefilter-members.html @@ -0,0 +1,20 @@ + + + + + + + List of All Members for RoleFilter | SortFilterProxyModel + + + + +

    List of All Members for RoleFilter

    +

    This is the complete list of members for RoleFilter, including inherited members.

    + + + diff --git a/docs/qml-sortfilterproxymodel-rolefilter.html b/docs/qml-sortfilterproxymodel-rolefilter.html new file mode 100644 index 0000000..86a499d --- /dev/null +++ b/docs/qml-sortfilterproxymodel-rolefilter.html @@ -0,0 +1,77 @@ + + + + + + + RoleFilter QML Type | SortFilterProxyModel + + + + +

    RoleFilter QML Type

    + + +

    Base type for filters based on a source model role. More...

    + +
    +
    Import Statement: import SortFilterProxyModel .
    Inherits:

    Filter

    +
    Inherited By:

    RangeFilter, RegExpFilter, and ValueFilter

    +
    + +

    Properties

    + + + +

    Detailed Description

    +

    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.

    + +

    Property Documentation

    + +
    +
    + + +

    +enabled : bool

    +

    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.

    +
    +
    + +
    +
    + + +

    +inverted : bool

    +

    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.

    +
    +
    + +
    +
    + + +

    +roleName : string

    +

    This property holds the role name that the filter is using to query the source model's data when filtering items.

    +
    +
    + + diff --git a/docs/qml-sortfilterproxymodel-rolesorter-members.html b/docs/qml-sortfilterproxymodel-rolesorter-members.html new file mode 100644 index 0000000..d714d53 --- /dev/null +++ b/docs/qml-sortfilterproxymodel-rolesorter-members.html @@ -0,0 +1,21 @@ + + + + + + + List of All Members for RoleSorter | SortFilterProxyModel + + + + +

    List of All Members for RoleSorter

    +

    This is the complete list of members for RoleSorter, including inherited members.

    + + + diff --git a/docs/qml-sortfilterproxymodel-rolesorter.html b/docs/qml-sortfilterproxymodel-rolesorter.html new file mode 100644 index 0000000..8fed71d --- /dev/null +++ b/docs/qml-sortfilterproxymodel-rolesorter.html @@ -0,0 +1,98 @@ + + + + + + + RoleSorter QML Type | SortFilterProxyModel + + + + +

    RoleSorter QML Type

    + + +

    Sorts rows based on a source model role. More...

    + +
    +
    Import Statement: import SortFilterProxyModel .
    Inherits:

    Sorter

    +
    Inherited By:

    StringSorter

    +
    + +

    Properties

    + + + +

    Detailed Description

    +

    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" }
    +}
    + +

    Property Documentation

    + +
    +
    + + +

    +enabled : bool

    +

    This property holds whether the sorter is enabled. A disabled sorter will not change the order of the rows.

    +

    By default, sorters are enabled.

    +
    +
    + +
    +
    + + +

    +priority : int

    +

    This property holds the sort priority of this sorter. Sorters with a higher priority are applied first. In case of equal priority, Sorters are ordered by their insertion order.

    +

    By default, the priority is 0.

    +
    +
    + +
    +
    + + +

    +roleName : string

    +

    This property holds the role name that the sorter is using to query the source model's data when sorting items.

    +
    +
    + +
    +
    + + +

    +sortOrder : Qt::SortOrder

    +

    This property holds the sort order of this sorter.

    +
    + + +
    ConstantDescription
    Qt.AscendingOrderThe items are sorted ascending e.g. starts with 'AAA' ends with 'ZZZ' in Latin-1 locales
    Qt.DescendingOrderThe items are sorted descending e.g. starts with 'ZZZ' ends with 'AAA' in Latin-1 locales
    +

    By default, sorting is in ascending order.

    +
    +
    + + diff --git a/docs/qml-singlerole-members.html b/docs/qml-sortfilterproxymodel-singlerole-members.html similarity index 66% rename from docs/qml-singlerole-members.html rename to docs/qml-sortfilterproxymodel-singlerole-members.html index fdd2e99..a62df06 100644 --- a/docs/qml-singlerole-members.html +++ b/docs/qml-sortfilterproxymodel-singlerole-members.html @@ -10,9 +10,9 @@

    List of All Members for SingleRole

    -

    This is the complete list of members for SingleRole, including inherited members.

    +

    This is the complete list of members for SingleRole, including inherited members.

    diff --git a/docs/qml-singlerole.html b/docs/qml-sortfilterproxymodel-singlerole.html similarity index 55% rename from docs/qml-singlerole.html rename to docs/qml-sortfilterproxymodel-singlerole.html index 8b30b6d..e1d8727 100644 --- a/docs/qml-singlerole.html +++ b/docs/qml-sortfilterproxymodel-singlerole.html @@ -20,29 +20,29 @@

    SingleRole QML Type

    -

    Base type for the SortFilterProxyModel proxy roles defining a single role More...

    +

    Base type for the SortFilterProxyModel proxy roles defining a single role. More...

    -
    Import Statement: import .
    Inherits:

    ProxyRole

    -
    Inherited By:

    ExpressionRole, FilterRole, JoinRole, and SwitchRole

    +
    Import Statement: import SortFilterProxyModel .
    Inherits:

    ProxyRole

    +
    Inherited By:

    ExpressionRole, FilterRole, JoinRole, and SwitchRole

    Properties

    Detailed Description

    -

    SingleRole is a convenience base class for proxy roles who define a single role. It cannot be used directly in a QML file. It exists to provide a set of common properties and methods, available across all the other proxy role types that inherit from it. Attempting to use the SingleRole type directly will result in an error.

    +

    SingleRole is a convenience base class for proxy roles who define a single role. It cannot be used directly in a QML file. It exists to provide a set of common properties and methods, available across all the other proxy role types that inherit from it. Attempting to use the SingleRole type directly will result in an error.

    Property Documentation

    - +

    name : string

    diff --git a/docs/qml-sorter-members.html b/docs/qml-sortfilterproxymodel-sorter-members.html similarity index 50% rename from docs/qml-sorter-members.html rename to docs/qml-sortfilterproxymodel-sorter-members.html index ac904a5..80328bd 100644 --- a/docs/qml-sorter-members.html +++ b/docs/qml-sortfilterproxymodel-sorter-members.html @@ -10,10 +10,11 @@

    List of All Members for Sorter

    -

    This is the complete list of members for Sorter, including inherited members.

    +

    This is the complete list of members for Sorter, including inherited members.

    diff --git a/docs/qml-sorter.html b/docs/qml-sortfilterproxymodel-sorter.html similarity index 62% rename from docs/qml-sorter.html rename to docs/qml-sortfilterproxymodel-sorter.html index 87b00b3..bbcfe66 100644 --- a/docs/qml-sorter.html +++ b/docs/qml-sortfilterproxymodel-sorter.html @@ -20,18 +20,19 @@

    Sorter QML Type

    -

    Base type for the SortFilterProxyModel sorters More...

    +

    Base type for the SortFilterProxyModel sorters. More...

    -
    Import Statement: import .
    Inherited By:

    ExpressionSorter, FilterSorter, and RoleSorter

    +
    Import Statement: import SortFilterProxyModel .
    Inherited By:

    ExpressionSorter, FilterSorter, and RoleSorter

    Properties

    @@ -42,7 +43,7 @@
    - +

    enabled : bool

    @@ -50,10 +51,21 @@

    By default, sorters are enabled.


    + +
    +
    + + +

    +priority : int

    +

    This property holds the sort priority of this sorter. Sorters with a higher priority are applied first. In case of equal priority, Sorters are ordered by their insertion order.

    +

    By default, the priority is 0.

    +
    +
    - +

    sortOrder : Qt::SortOrder

    diff --git a/docs/qml-sortfilterproxymodel-sortercontainer-members.html b/docs/qml-sortfilterproxymodel-sortercontainer-members.html new file mode 100644 index 0000000..9b87117 --- /dev/null +++ b/docs/qml-sortfilterproxymodel-sortercontainer-members.html @@ -0,0 +1,18 @@ + + + + + + + List of All Members for SorterContainer | SortFilterProxyModel + + + + +

    List of All Members for SorterContainer

    +

    This is the complete list of members for SorterContainer, including inherited members.

    + + + diff --git a/docs/qml-sortfilterproxymodel-sortercontainer.html b/docs/qml-sortfilterproxymodel-sortercontainer.html new file mode 100644 index 0000000..b8dff10 --- /dev/null +++ b/docs/qml-sortfilterproxymodel-sortercontainer.html @@ -0,0 +1,56 @@ + + + + + + + SorterContainer QML Type | SortFilterProxyModel + + + + +

    SorterContainer QML Type

    + + +

    Abstract interface for types containing Sorters. More...

    + +
    +
    Import Statement: import SortFilterProxyModel .
    + +

    Attached Properties

    + + + +

    Detailed Description

    + +

    Types implementing this interface:

    +
    + +

    SortFilterProxyModel

    Filters and sorts data coming from a source QAbstractItemModel

    + +

    Attached Property Documentation

    + +
    +
    + + +

    +SorterContainer.container : bool

    +

    This attached property allows you to include in a SorterContainer a Sorter that has been instantiated outside of the SorterContainer, for example in an Instantiator.

    +
    +
    + + diff --git a/docs/qml-sortfilterproxymodel-sortfilterproxymodel-members.html b/docs/qml-sortfilterproxymodel-sortfilterproxymodel-members.html new file mode 100644 index 0000000..d44b931 --- /dev/null +++ b/docs/qml-sortfilterproxymodel-sortfilterproxymodel-members.html @@ -0,0 +1,31 @@ + + + + + + + List of All Members for SortFilterProxyModel | SortFilterProxyModel + + + + +

    List of All Members for SortFilterProxyModel

    +

    This is the complete list of members for SortFilterProxyModel, including inherited members.

    + + + diff --git a/docs/qml-sortfilterproxymodel.html b/docs/qml-sortfilterproxymodel-sortfilterproxymodel.html similarity index 51% rename from docs/qml-sortfilterproxymodel.html rename to docs/qml-sortfilterproxymodel-sortfilterproxymodel.html index 68f9601..b57df58 100644 --- a/docs/qml-sortfilterproxymodel.html +++ b/docs/qml-sortfilterproxymodel-sortfilterproxymodel.html @@ -21,97 +21,110 @@

    SortFilterProxyModel QML Type

    -

    Filters and sorts data coming from a source QAbstractItemModel More...

    +

    Filters and sorts data coming from a source QAbstractItemModel. More...

    -
    Import Statement: import .

    Properties

    Methods

    Detailed Description

    -

    The SortFilterProxyModel type provides support for filtering and sorting data coming from a source model.

    +

    The SortFilterProxyModel type provides support for filtering and sorting data coming from a source model.

    +

    See also FilterContainer and SorterContainer.

    Property Documentation

    - +

    count : int

    The number of rows in the proxy model (not filtered out the source model)


    + +
    +
    + + +

    +delayed : bool

    +

    Delay the execution of filters, sorters and proxyRoles until the next event loop. This can be used as an optimization when multiple filters, sorters or proxyRoles are changed in a single event loop. They will be executed once in a single batch at the next event loop instead of being executed in multiple sequential batches.

    +

    By default, the SortFilterProxyModel is not delayed, unless the SFPM_DELAYED environment variable is defined at compile time.

    +
    +
    - + +filters : list<Filter>

    -filters : list<Filter>

    This property holds the list of filters for this proxy model. To be included in the model, a row of the source model has to be accepted by all the top level filters of this list.

    -

    See also Filter.

    +

    See also Filter and FilterContainer.


    - + +proxyRoles : list<ProxyRole>

    -proxyRoles : list<ProxyRole>

    This property holds the list of proxy roles for this proxy model. Each proxy role adds a new custom role to the model.

    -

    See also ProxyRole.

    +

    See also ProxyRole.


    - +

    sortRoleName : string

    The role name of the source model's data used for the sorting.

    -

    See also sortRole and roleForName.

    +

    See also sortRole and roleForName.


    - + +sorters : list<Sorter>

    -sorters : list<Sorter>

    This property holds the list of sorters for this proxy model. The rows of the source model are sorted by the sorters of this list, in their order of insertion.

    -

    See also Sorter.

    +

    See also Sorter and SorterContainer.


    - +

    sourceModel : QAbstractItemModel*

    @@ -119,72 +132,72 @@

    Method Documentation

    - +
    - + +variantget(row, stringroleName)

    -variant get(int row, string roleName)

    -

    Return the data for the given roleNamte of the item at row in the proxy model. This allows the role data to be read (not modified) from JavaScript. This equivalent to calling data(index(row, 0), roleForName(roleName)).

    +

    Return the data for the given roleName of the item at row in the proxy model. This allows the role data to be read (not modified) from JavaScript. This equivalent to calling data(index(row, 0), roleForName(roleName)).


    - +
    - + +objectget(row)

    -object get(int row)

    Return the item at row in the proxy model as a map of all its roles. This allows the item data to be read (not modified) from JavaScript.


    - +
    - + +intmapFromSource(sourceRow)

    -int mapFromSource(int sourceRow)

    -

    Returns the row in the SortFilterProxyModel given the sourceRow from the source model. Returns -1 if there is no corresponding row.

    +

    Returns the row in the SortFilterProxyModel given the sourceRow from the source model. Returns -1 if there is no corresponding row.


    - +
    - + +QModelIndexmapFromSource(sourceIndex)

    -QModelIndex mapFromSource(QModelIndex sourceIndex)

    -

    Returns the model index in the SortFilterProxyModel given the sourceIndex from the source model.

    +

    Returns the model index in the SortFilterProxyModel given the sourceIndex from the source model.


    - +
    - + +intmapToSource(proxyRow)

    -int mapToSource(int proxyRow)

    -

    Returns the source model row corresponding to the given proxyRow from the SortFilterProxyModel. Returns -1 if there is no corresponding row.

    +

    Returns the source model row corresponding to the given proxyRow from the SortFilterProxyModel. Returns -1 if there is no corresponding row.


    - +
    - + +indexmapToSource(proxyIndex)

    -index mapToSource(index proxyIndex)

    -

    Returns the source model index corresponding to the given proxyIndex from the SortFilterProxyModel.

    +

    Returns the source model index corresponding to the given proxyIndex from the SortFilterProxyModel.


    - +
    - + +introleForName(roleName)

    -int roleForName(string roleName)

    Returns the role number for the given roleName. If no role is found for this roleName, -1 is returned.

    diff --git a/docs/qml-sortfilterproxymodel-stringsorter-members.html b/docs/qml-sortfilterproxymodel-stringsorter-members.html new file mode 100644 index 0000000..0fd29ab --- /dev/null +++ b/docs/qml-sortfilterproxymodel-stringsorter-members.html @@ -0,0 +1,28 @@ + + + + + + + List of All Members for StringSorter | SortFilterProxyModel + + + + +

    List of All Members for StringSorter

    +

    This is the complete list of members for StringSorter, including inherited members.

    + +

    The following members are inherited from RoleSorter.

    + + + diff --git a/docs/qml-stringsorter.html b/docs/qml-sortfilterproxymodel-stringsorter.html similarity index 69% rename from docs/qml-stringsorter.html rename to docs/qml-sortfilterproxymodel-stringsorter.html index 1a979e4..3ab8462 100644 --- a/docs/qml-stringsorter.html +++ b/docs/qml-sortfilterproxymodel-stringsorter.html @@ -20,25 +20,25 @@

    StringSorter QML Type

    -

    Sorts rows based on a source model string role More...

    +

    Sorts rows based on a source model string role. More...

    -
    Import Statement: import .
    Inherits:

    RoleSorter

    +
    Import Statement: import SortFilterProxyModel .
    Inherits:

    RoleSorter

    Properties

    Detailed Description

    -

    StringSorter is a specialized RoleSorter that sorts rows based on a source model string role. StringSorter compares strings according to a localized collation algorithm.

    +

    StringSorter is a specialized RoleSorter that sorts rows based on a source model string role. StringSorter compares strings according to a localized collation algorithm.

    In the following example, rows with be sorted by their lastName role :

    SortFilterProxyModel {
        sourceModel: contactModel
    @@ -49,7 +49,7 @@
     
     
    - +

    caseSensitivity : Qt.CaseSensitivity

    @@ -59,7 +59,7 @@
    - +

    ignorePunctation : bool

    @@ -69,7 +69,7 @@
    - +

    locale : Locale

    @@ -79,7 +79,7 @@
    - +

    numericMode : bool

    diff --git a/docs/qml-sortfilterproxymodel-switchrole-members.html b/docs/qml-sortfilterproxymodel-switchrole-members.html new file mode 100644 index 0000000..755a2ea --- /dev/null +++ b/docs/qml-sortfilterproxymodel-switchrole-members.html @@ -0,0 +1,22 @@ + + + + + + + List of All Members for SwitchRole | SortFilterProxyModel + + + + +

    List of All Members for SwitchRole

    +

    This is the complete list of members for SwitchRole, including inherited members.

    + + + diff --git a/docs/qml-switchrole.html b/docs/qml-sortfilterproxymodel-switchrole.html similarity index 50% rename from docs/qml-switchrole.html rename to docs/qml-sortfilterproxymodel-switchrole.html index 266ba42..dc72484 100644 --- a/docs/qml-switchrole.html +++ b/docs/qml-sortfilterproxymodel-switchrole.html @@ -21,29 +21,30 @@

    SwitchRole QML Type

    -

    A role using Filter to conditionnaly compute its data More...

    +

    A role using Filter to conditionnaly compute its data. More...

    -
    Import Statement: import .
    Inherits:

    SingleRole

    +
    Import Statement: import SortFilterProxyModel .
    Inherits:

    SingleRole

    Properties

    Attached Properties

    Detailed Description

    -

    A SwitchRole is a ProxyRole that computes its data with the help of Filter. Each top level filters specified in the SwitchRole is evaluated on the rows of the model, if a Filter evaluates to true, the data of the SwitchRole for this row will be the one of the attached SwitchRole.value property. If no top level filters evaluate to true, the data will default to the one of the defaultRoleName (or the defaultValue if no defaultRoleName is specified).

    +

    A SwitchRole is a ProxyRole that computes its data with the help of Filter. Each top level filters specified in the SwitchRole is evaluated on the rows of the model, if a Filter evaluates to true, the data of the SwitchRole for this row will be the one of the attached SwitchRole.value property. If no top level filters evaluate to true, the data will default to the one of the defaultRoleName (or the defaultValue if no defaultRoleName is specified).

    In the following example, the favoriteOrFirstNameSection role is equal to * if the favorite role of a row is true, otherwise it's the same as the firstName role :

    SortFilterProxyModel {
        sourceModel: contactModel
    @@ -57,12 +58,13 @@
            defaultRoleName: "firstName"
         }
     }
    +

    See also FilterContainer.

    Property Documentation

    - +

    defaultRoleName : string

    @@ -72,33 +74,43 @@
    - +

    defaultValue : var

    -

    This property holds the default value of the role. If no filter match a row, and no defaultRoleName is set, the data of this role will be defaultValue.

    +

    This property holds the default value of the role. If no filter match a row, and no defaultRoleName is set, the data of this role will be defaultValue.


    - + +[default] filters : list<Filter>

    -filters : list<Filter>

    -

    This property holds the list of filters for this proxy role. The data of this role will be equal to the attached SwitchRole.value property of the first filter that matches the model row.

    -

    See also Filter.

    +

    This property holds the list of filters for this proxy role. The data of this role will be equal to the attached SwitchRole.value property of the first filter that matches the model row.

    +

    See also Filter and FilterContainer.


    + +
    +
    + + +

    +name : string

    +

    This property holds the role name of the proxy role.

    +
    +

    Attached Property Documentation

    - +

    SwitchRole.value : var

    -

    This property attaches a value to a Filter.

    +

    This property attaches a value to a Filter.


    diff --git a/docs/qml-sortfilterproxymodel-valuefilter-members.html b/docs/qml-sortfilterproxymodel-valuefilter-members.html new file mode 100644 index 0000000..5c2d43e --- /dev/null +++ b/docs/qml-sortfilterproxymodel-valuefilter-members.html @@ -0,0 +1,21 @@ + + + + + + + List of All Members for ValueFilter | SortFilterProxyModel + + + + +

    List of All Members for ValueFilter

    +

    This is the complete list of members for ValueFilter, including inherited members.

    + + + diff --git a/docs/qml-valuefilter.html b/docs/qml-sortfilterproxymodel-valuefilter.html similarity index 52% rename from docs/qml-valuefilter.html rename to docs/qml-sortfilterproxymodel-valuefilter.html index daf8ff2..5681bd6 100644 --- a/docs/qml-valuefilter.html +++ b/docs/qml-sortfilterproxymodel-valuefilter.html @@ -20,23 +20,25 @@

    ValueFilter QML Type

    -

    Filters rows matching exactly a value More...

    +

    Filters rows matching exactly a value. More...

    -
    Import Statement: import .
    Inherits:

    RoleFilter

    +
    Import Statement: import SortFilterProxyModel .
    Inherits:

    RoleFilter

    Properties

    Detailed Description

    -

    A ValueFilter is a simple RoleFilter that accepts rows matching exactly the filter's value

    +

    A ValueFilter is a simple RoleFilter that accepts rows matching exactly the filter's value

    In the following example, only rows with their favorite role set to true will be accepted when the checkbox is checked :

    CheckBox {
        id: showOnlyFavoriteCheckBox
    @@ -52,10 +54,32 @@ SortFilterProxyModel {
     }

    Property Documentation

    + +
    +
    + + +

    +enabled : bool

    +

    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.

    +
    +
    + +
    +
    + + +

    +inverted : bool

    +

    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.

    +
    +
    - +

    roleName : string

    @@ -65,7 +89,7 @@ SortFilterProxyModel {
    - +

    value : variant

    diff --git a/docs/qml-stringsorter-members.html b/docs/qml-stringsorter-members.html deleted file mode 100644 index bdbb908..0000000 --- a/docs/qml-stringsorter-members.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - List of All Members for StringSorter | SortFilterProxyModel - - - - -

    List of All Members for StringSorter

    -

    This is the complete list of members for StringSorter, including inherited members.

    - -

    The following members are inherited from RoleSorter.

    - -

    The following members are inherited from Sorter.

    - - - diff --git a/docs/qml-switchrole-members.html b/docs/qml-switchrole-members.html deleted file mode 100644 index 07f9faa..0000000 --- a/docs/qml-switchrole-members.html +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - List of All Members for SwitchRole | SortFilterProxyModel - - - - -

    List of All Members for SwitchRole

    -

    This is the complete list of members for SwitchRole, including inherited members.

    - -

    The following members are inherited from SingleRole.

    - - - diff --git a/docs/qml-valuefilter-members.html b/docs/qml-valuefilter-members.html deleted file mode 100644 index 3b57e20..0000000 --- a/docs/qml-valuefilter-members.html +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - List of All Members for ValueFilter | SortFilterProxyModel - - - - -

    List of All Members for ValueFilter

    -

    This is the complete list of members for ValueFilter, including inherited members.

    - -

    The following members are inherited from Filter.

    - - - diff --git a/docs/sortfilterproxymodel-qmlmodule.html b/docs/sortfilterproxymodel-qmlmodule.html new file mode 100644 index 0000000..d0709b5 --- /dev/null +++ b/docs/sortfilterproxymodel-qmlmodule.html @@ -0,0 +1,44 @@ + + + + + + + SortFilterProxyModel + + + + + + +
    +
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + +

    AllOf

    Filter container accepting rows accepted by all its child filters

    AnyOf

    Filter container accepting rows accepted by at least one of its child filters

    ExpressionFilter

    Filters row with a custom filtering

    ExpressionRole

    A custom role computed from a javascript expression

    ExpressionSorter

    Sorts row with a custom javascript expression

    Filter

    Base type for the SortFilterProxyModel filters

    FilterContainer

    Abstract interface for types containing Filters

    FilterRole

    A role resolving to true for rows matching all its filters

    FilterSorter

    Sorts rows based on if they match filters

    IndexFilter

    Filters rows based on their source index

    JoinRole

    Role made from concatenating other roles

    ProxyRole

    Base type for the SortFilterProxyModel proxy roles

    RangeFilter

    Filters rows between boundary values

    RegExpFilter

    Filters rows matching a regular expression

    RegExpRole

    A ProxyRole extracting data from a source role via a regular expression

    RoleFilter

    Base type for filters based on a source model role

    RoleSorter

    Sorts rows based on a source model role

    SingleRole

    Base type for the SortFilterProxyModel proxy roles defining a single role

    SortFilterProxyModel

    Filters and sorts data coming from a source QAbstractItemModel

    Sorter

    Base type for the SortFilterProxyModel sorters

    SorterContainer

    Abstract interface for types containing Sorters

    StringSorter

    Sorts rows based on a source model string role

    SwitchRole

    A role using Filter to conditionnaly compute its data

    ValueFilter

    Filters rows matching exactly a value

    + + diff --git a/docs/sortfilterproxymodel.index b/docs/sortfilterproxymodel.index index b7cfbf1..b80adc9 100644 --- a/docs/sortfilterproxymodel.index +++ b/docs/sortfilterproxymodel.index @@ -1,128 +1,156 @@ - - - - - - + + + + + + + + - - - + + + - - - + + + - - - - - + + + - - - - + + + - - + + + + + - - + + + + + + + + + + + + + + + - - + + + + - - + + - - - + + - - - - - + + - - + + + + - - - - - + + + - - - - - - - - - - - - - - - + + + - - + + + + + + - - + + + - - + + + + + - - - + + + + - - - - - + + + + + - - - + + - - + + + + + + + + + + + - - - - - + + - - - - + + - - - + + - - - + + + + - - - + + + - - + + + + + + + + + + + + + + + + + diff --git a/docs/style/offline.css b/docs/style/offline.css index e208159..13c9427 100644 --- a/docs/style/offline.css +++ b/docs/style/offline.css @@ -384,6 +384,9 @@ h3.fn, span.fn { margin: 0px; margin-top: 45px; } +.fngroup h3.fngroupitem { + margin-bottom: 5px; +} h3.fn code { float: right; } @@ -780,3 +783,23 @@ div.multi-column div { margin-right: 4em; width: 24em; } + +.mainContent .video { + width:40%; + max-width:640px; + margin: 15px 0 0 15px; + position:relative; + display:table +} + +.mainContent .video > .vspan { + padding-top:60%; + display:block +} +.mainContent .video iframe { + width:100%; + height:100%; + position:absolute; + top:0; + left:0 +} diff --git a/filters/alloffilter.cpp b/filters/alloffilter.cpp index cfdf379..9b3d2d7 100644 --- a/filters/alloffilter.cpp +++ b/filters/alloffilter.cpp @@ -6,11 +6,14 @@ namespace qqsfpm { \qmltype AllOf \inherits Filter \inqmlmodule SortFilterProxyModel - \brief Filter container accepting rows accepted by all its child filters + \ingroup Filters + \ingroup FilterContainer + \brief Filter container accepting rows accepted by all its child filters. The AllOf type is a \l 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. + \sa FilterContainer */ bool AllOfFilter::filterRow(const QModelIndex& sourceIndex, const QQmlSortFilterProxyModel& proxyModel) const { diff --git a/filters/anyoffilter.cpp b/filters/anyoffilter.cpp index 7b90743..4cfe9b8 100644 --- a/filters/anyoffilter.cpp +++ b/filters/anyoffilter.cpp @@ -6,7 +6,9 @@ namespace qqsfpm { \qmltype AnyOf \inherits Filter \inqmlmodule SortFilterProxyModel - \brief Filter container accepting rows accepted by at least one of its child filters + \ingroup Filters + \ingroup FilterContainer + \brief Filter container accepting rows accepted by at least one of its child filters. The AnyOf type is a \l Filter container that accepts rows if any of its contained (and enabled) filters accept them. @@ -32,6 +34,7 @@ namespace qqsfpm { } } \endcode + \sa FilterContainer */ bool AnyOfFilter::filterRow(const QModelIndex& sourceIndex, const QQmlSortFilterProxyModel& proxyModel) const { diff --git a/filters/expressionfilter.cpp b/filters/expressionfilter.cpp index 82f9f8c..f3673ce 100644 --- a/filters/expressionfilter.cpp +++ b/filters/expressionfilter.cpp @@ -8,7 +8,8 @@ namespace qqsfpm { \qmltype ExpressionFilter \inherits Filter \inqmlmodule SortFilterProxyModel - \brief Filters row with a custom filtering + \ingroup Filters + \brief Filters row with a custom filtering. An ExpressionFilter is a \l Filter allowing to implement custom filtering based on a javascript expression. */ diff --git a/filters/filter.cpp b/filters/filter.cpp index 737e587..1e46da7 100644 --- a/filters/filter.cpp +++ b/filters/filter.cpp @@ -5,8 +5,10 @@ namespace qqsfpm { /*! \qmltype Filter + \qmlabstract \inqmlmodule SortFilterProxyModel - \brief Base type for the \l SortFilterProxyModel filters + \ingroup Filters + \brief Base type for the \l SortFilterProxyModel filters. The Filter type cannot be used directly in a QML file. It exists to provide a set of common properties and methods, diff --git a/filters/filtercontainer.cpp b/filters/filtercontainer.cpp index 7a7e2ab..5bba02d 100644 --- a/filters/filtercontainer.cpp +++ b/filters/filtercontainer.cpp @@ -4,10 +4,16 @@ namespace qqsfpm { -FilterContainer::~FilterContainer() -{ +/*! + \qmltype FilterContainer + \qmlabstract + \inqmlmodule SortFilterProxyModel + \ingroup FilterAttached + \brief Abstract interface for types containing \l {Filter}{Filters}. -} + \section2 Types implementing this interface: + \annotatedlist FilterContainer +*/ QList FilterContainer::filters() const { diff --git a/filters/filtercontainer.h b/filters/filtercontainer.h index 1b7af80..4fc06f3 100644 --- a/filters/filtercontainer.h +++ b/filters/filtercontainer.h @@ -13,7 +13,7 @@ class QQmlSortFilterProxyModel; class FilterContainer { public: - virtual ~FilterContainer(); + virtual ~FilterContainer() = default; QList filters() const; void appendFilter(Filter* filter); diff --git a/filters/indexfilter.cpp b/filters/indexfilter.cpp index a82ab4a..c1e4b24 100644 --- a/filters/indexfilter.cpp +++ b/filters/indexfilter.cpp @@ -7,7 +7,8 @@ namespace qqsfpm { \qmltype IndexFilter \inherits Filter \inqmlmodule SortFilterProxyModel - \brief Filters rows based on their source index + \ingroup Filters + \brief Filters rows based on their source index. An IndexFilter is a filter allowing contents to be filtered based on their source model index. @@ -29,9 +30,13 @@ namespace qqsfpm { Rows with a source index lower than \c minimumIndex will be rejected. If \c minimumIndex is negative, it is counted from the end of the source model, meaning that : - \code minimumIndex: -1\endcode + \code + minimumIndex: -1 + \endcode is equivalent to : - \code minimumIndex: sourceModel.count - 1\endcode + \code + minimumIndex: sourceModel.count - 1 + \endcode By default, no value is set. */ const QVariant& IndexFilter::minimumIndex() const @@ -56,9 +61,13 @@ void IndexFilter::setMinimumIndex(const QVariant& minimumIndex) Rows with a source index higher than \c maximumIndex will be rejected. If \c maximumIndex is negative, it is counted from the end of the source model, meaning that: - \code maximumIndex: -1\endcode + \code + maximumIndex: -1 + \endcode is equivalent to : - \code maximumIndex: sourceModel.count - 1\endcode + \code + maximumIndex: sourceModel.count - 1 + \endcode By default, no value is set. */ const QVariant& IndexFilter::maximumIndex() const diff --git a/filters/rangefilter.cpp b/filters/rangefilter.cpp index c3aa0ec..2a6fde2 100644 --- a/filters/rangefilter.cpp +++ b/filters/rangefilter.cpp @@ -6,7 +6,8 @@ namespace qqsfpm { \qmltype RangeFilter \inherits RoleFilter \inqmlmodule SortFilterProxyModel - \brief Filters rows between boundary values + \ingroup Filters + \brief Filters rows between boundary values. A RangeFilter is a \l RoleFilter that accepts rows if their data is between the filter's minimum and maximum value. diff --git a/filters/regexpfilter.cpp b/filters/regexpfilter.cpp index 1885ac5..f308765 100644 --- a/filters/regexpfilter.cpp +++ b/filters/regexpfilter.cpp @@ -7,7 +7,8 @@ namespace qqsfpm { \qmltype RegExpFilter \inherits RoleFilter \inqmlmodule SortFilterProxyModel - \brief Filters rows matching a regular expression + \ingroup Filters + \brief Filters rows matching a regular expression. A RegExpFilter is a \l RoleFilter that accepts rows matching a regular rexpression. diff --git a/filters/rolefilter.cpp b/filters/rolefilter.cpp index aac6136..3532c87 100644 --- a/filters/rolefilter.cpp +++ b/filters/rolefilter.cpp @@ -8,7 +8,8 @@ namespace qqsfpm { \qmlabstract \inherits Filter \inqmlmodule SortFilterProxyModel - \brief Base type for filters based on a source model role + \ingroup Filters + \brief Base type for filters based on a source model role. The RoleFilter type cannot be used directly in a QML file. It exists to provide a set of common properties and methods, diff --git a/filters/valuefilter.cpp b/filters/valuefilter.cpp index 4e77618..09e9434 100644 --- a/filters/valuefilter.cpp +++ b/filters/valuefilter.cpp @@ -6,7 +6,8 @@ namespace qqsfpm { \qmltype ValueFilter \inherits RoleFilter \inqmlmodule SortFilterProxyModel - \brief Filters rows matching exactly a value + \ingroup Filters + \brief Filters rows matching exactly a value. A ValueFilter is a simple \l RoleFilter that accepts rows matching exactly the filter's value diff --git a/index.qdoc b/index.qdoc new file mode 100644 index 0000000..e4917bb --- /dev/null +++ b/index.qdoc @@ -0,0 +1,27 @@ +/*! + \page index.html overview + + \title SortFilterProxyModel QML Module + + SortFilterProxyModel is an implementation of QSortFilterProxyModel conveniently exposed for QML. + \annotatedlist SortFilterProxyModel + + \section1 Filters + \annotatedlist Filters + + \section2 Related attached types + \annotatedlist FilterAttached + + \section1 Sorters + \annotatedlist Sorters + + \section2 Related attached types + \annotatedlist SorterAttached + + \section1 ProxyRoles + \annotatedlist ProxyRoles +*/ + +/*! + \qmlmodule SortFilterProxyModel +*/ diff --git a/offline.css b/offline.css new file mode 100644 index 0000000..13c9427 --- /dev/null +++ b/offline.css @@ -0,0 +1,805 @@ +body { + font: normal 400 14px/1.2 Arial; + margin-top: 85px; + font-family: Arial, Helvetica; + text-align: left; + margin-left: 5px; + margin-right: 5px; + background-color: #fff; +} + +p { + line-height: 20px +} + +img { + margin-left: 0px; + max-width: 800px; + height: auto; +} + +.content .border img { + box-shadow:3px 3px 8px 3px rgba(200,200,200,0.5) +} + +.content .border .player { + box-shadow:3px 3px 8px 3px rgba(200,200,200,0.5) +} + +.content .indexboxcont li { + font: normal bold 13px/1 Verdana + } + +.content .normallist li { + font: normal 13px/1 Verdana + } + +.descr { + margin-top: 35px; + margin-bottom: 45px; + margin-left: 5px; + text-align: left; + vertical-align: top; +} + +.name { + max-width: 75%; + font-weight: 100; +} + +tt { + text-align: left +} + +/* +----------- +links +----------- +*/ + +a:link { + color: #007330; + text-decoration: none; + text-align: left; +} + +a.qa-mark:target:before { + content: "***"; + color: #ff0000; +} + +a:hover { + color: #44a51c; + text-align: left; +} + +a:visited { + color: #007330; + text-align: left; +} + +a:visited:hover { + color: #44a51c; + text-align: left; +} + +/* +----------- +offline viewing: HTML links display an icon +----------- +*/ + +a[href*="http://"], a[href*="ftp://"], a[href*="https://"] { + text-decoration: none; + background-image: url(../images/ico_out.png); + background-repeat: no-repeat; + background-position: left; + padding-left: 20px; + text-align: left; +} + +.flags { + text-decoration: none; + text-height: 24px; +} + +.flags:target { + background-color: #FFFFD6; +} + +/* +------------------------------- +NOTE styles +------------------------------- +*/ + +.notetitle, .tiptitle, .fastpathtitle { + font-weight: bold +} + +.attentiontitle, .cautiontitle, .dangertitle, .importanttitle, .remembertitle, .restrictiontitle { + font-weight: bold +} + +.note, .tip, .fastpath { + background: #F2F2F2 url(../images/ico_note.png); + background-repeat: no-repeat; + background-position: top left; + padding: 5px; + padding-left: 40px; + padding-bottom: 10px; + border: #999 1px dotted; + color: #666666; + margin: 5px; +} + +.attention, .caution, .danger, .important, .remember, .restriction { + background: #F2F2F2 url(../images/ico_note_attention.png); + background-repeat: no-repeat; + background-position: top left; + padding: 5px; + padding-left: 40px; + padding-bottom: 10px; + border: #999 1px dotted; + color: #666666; + margin: 5px; +} + +/* +------------------------------- +Top navigation +------------------------------- +*/ + +.qtref { + display: block; + position: relative; + height: 15px; + z-index: 1; + font-size: 11px; + padding-right: 10px; + float: right; +} + +.naviNextPrevious { + clear: both; + display: block; + position: relative; + text-align: right; + top: -47px; + float: right; + height: 20px; + z-index: 1; + padding-right: 10px; + padding-top: 2px; + vertical-align: top; + margin: 0px; +} + +.naviNextPrevious > a:first-child { + background-image: url(../images/btn_prev.png); + background-repeat: no-repeat; + background-position: left; + padding-left: 20px; + height: 20px; + padding-left: 20px; + } + +.naviNextPrevious > a:last-child { + background-image: url(../images/btn_next.png); + background-repeat: no-repeat; + background-position: right; + padding-right: 20px; + height: 20px; + margin-left: 30px; + } + +.naviSeparator { display: none } +/* +----------- +footer and license +----------- +*/ + +.footer { + text-align: left; + padding-top: 45px; + padding-left: 5px; + margin-top: 45px; + margin-bottom: 45px; + font-size: 10px; + border-top: 1px solid #999; +} + +.footer p { + line-height: 14px; + font-size: 11px; + padding: 0; + margin: 0; +} + +.footer a[href*="http://"], a[href*="ftp://"], a[href*="https://"] { + font-weight: bold; +} + +.footerNavi { + width: auto; + text-align: right; + margin-top: 50px; + z-index: 1; +} + +.navigationbar { + display: block; + position: relative; + top: -20px; + border-top: 1px solid #cecece; + border-bottom: 1px solid #cecece; + background-color: #F2F2F2; + z-index: 1; + height: 20px; + padding-left: 7px; + margin: 0px; + padding-top: 2px; + margin-left: -5px; + margin-right: -5px; +} + +.navigationbar .first { + background: url(../images/home.png); + background-position: left; + background-repeat: no-repeat; + padding-left: 20px; + } + +.navigationbar ul { + margin: 0px; + padding: 0px; + } + + .navigationbar ul li { + list-style-type: none; + padding-top: 2px; + padding-left: 4px; + margin: 0; + height: 20px; + } + +.navigationbar li { + float: left + } + + .navigationbar li a, .navigationbar td a { + display: block; + text-decoration: none; + background: url(../images/arrow_bc.png); + background-repeat: no-repeat; + background-position: right; + padding-right: 17px; + } + +table.buildversion { + float: right; + margin-top: -18px !important; +} + +.navigationbar table { + border-radius: 0; + border: 0 none; + background-color: #F2F2F2; + margin: 0; +} + +.navigationbar table td { + padding: 0; + border: 0 none; +} + +#buildversion { + font-style: italic; + font-size: small; + float: right; + margin-right: 5px; +} + +/* + +/* table of content +no display +*/ + +/* +----------- +headers +----------- +*/ + +@media screen { + .title { + color: #313131; + font-size: 24px; + font-weight: normal; + left: 0; + padding-bottom: 20px; + padding-left: 10px; + padding-top: 20px; + position: absolute; + right: 0; + top: 0; + background-color: #E6E6E6; + border-bottom: 1px #CCC solid; + border-top: 2px #CCC solid; + font-weight: bold; + margin-left: 0px; + margin-right: 0px; + } + .subtitle, .small-subtitle { + display: block; + clear: left; + } +} + +h1 { + margin: 0 +} + +h2, p.h2 { + font: 500 16px/1.2 Arial; + font-weight: 100; + background-color: #F2F3F4; + padding: 4px; + margin-bottom: 30px; + margin-top: 30px; + border-top: #E0E0DE 1px solid; + border-bottom: #E0E0DE 1px solid; + max-width: 99%; +} + +h2:target { + background-color: #F2F3D4; +} + +h3 { + font: 500 14px/1.2 Arial; + font-weight: 100; + text-decoration: underline; + margin-bottom: 30px; + margin-top: 30px; +} + +h3.fn, span.fn { + border-width: 1px; + border-style: solid; + border-color: #E6E6E6; + -moz-border-radius: 7px 7px 7px 7px; + -webkit-border-radius: 7px 7px 7px 7px; + border-radius: 7px 7px 7px 7px; + background-color: #F6F6F6; + word-spacing: 3px; + padding: 5px 5px; + text-decoration: none; + font-weight: bold; + max-width: 75%; + font-size: 14px; + margin: 0px; + margin-top: 45px; +} +.fngroup h3.fngroupitem { + margin-bottom: 5px; +} +h3.fn code { + float: right; +} +h3.fn:target { + background-color: #F6F6D6; +} + +.name { + color: #1A1A1A +} + +.type { + color: #808080 +} + +@media print { + .title { + color: #0066CB; + font-family: Arial, Helvetica; + font-size: 32px; + font-weight: normal; + left: 0; + position: absolute; + right: 0; + top: 0; + } +} + +/* +----------------- +table styles +----------------- +*/ + +.table img { + border: none; + margin-left: 0px; + -moz-box-shadow: 0px 0px 0px #fff; + -webkit-box-shadow: 0px 0px 0px #fff; + box-shadow: 0px 0px 0px #fff; +} + +/* table with border alternative colours*/ + +table, pre, .LegaleseLeft { + -moz-border-radius: 7px 7px 7px 7px; + -webkit-border-radius: 7px 7px 7px 7px; + border-radius: 7px 7px 7px 7px; + background-color: #F6F6F6; + border: 1px solid #E6E6E6; + border-collapse: separate; + margin-bottom: 25px; + margin-left: 15px; + font-size: 12px; + line-height: 1.2; +} + + table tr.even { + background-color: white; + color: #66666E; + } + + table tr.odd { + background-color: #F6F6F6; + color: #66666E; + } + + table tr:target { + background-color: #F6F6D6; + } + + table thead { + text-align: left; + padding-left: 20px; + background-color: #e1e0e0; + border-left: none; + border-right: none; + } + + table thead th { + padding-top: 5px; + padding-left: 10px; + padding-bottom: 5px; + border-bottom: 2px solid #D1D1D1; + padding-right: 10px; + } + + table th { + text-align: left; + padding-left: 20px; + } + + table td { + padding: 3px 15px 3px 20px; + border-bottom: #CCC dotted 1px; + } + + table p { + margin: 0px + } + +.LegaleseLeft { + font-family: monospace; + white-space: pre-wrap; +} +/* table bodless & white*/ + +.borderless { + border-radius: 0px 0px 0px 0px; + background-color: #fff; + border: 1px solid #fff; +} + +.borderless tr { + background-color: #FFF; + color: #66666E; + } + +.borderless td { + border: none; + border-bottom: #fff dotted 1px; + } + +/* +----------- +List +----------- +*/ + +ul { + margin-top: 10px; +} + +li { + margin-bottom: 10px; + padding-left: 8px; + list-style: outside; + text-align: left; +} + + ul > li { + list-style-type: square; + } + +ol { + margin: 10px; + padding: 0; +} + +ol.A > li { + list-style-type: upper-alpha; +} + +ol.a > li{ + list-style-type: lower-alpha; +} + + ol > li { + margin-left: 30px; + padding-left: 8px; + list-style: decimal; + } + +.centerAlign { + text-align: left +} + +.cpp, .LegaleseLeft { + display: block; + margin: 10px; + overflow: auto; + padding: 20px 20px 20px 20px; +} + +.js { + display: block; + margin: 10px; + overflow: auto; + padding: 20px 20px 20px 20px; +} + +.memItemLeft { + padding-right: 3px +} + +.memItemRight { + padding: 3px 15px 3px 0 +} + +.qml { + display: block; + margin: 10px; + overflow: auto; + padding: 20px 20px 20px 20px; +} + +.qmldefault { + padding-left: 5px; + float: right; + color: red; +} + +.qmlreadonly { + padding-left: 5px; + float: right; + color: #254117; +} + +.rightAlign { + padding: 3px 5px 3px 10px; + text-align: right; +} + +.qmldoc { + margin-left: 15px +} + +.flowList { + padding: 25px +} +.flowList dd { + display: inline-block; + margin-left: 10px; + width: 255px; + line-height: 1.15em; + overflow-x: hidden; + text-overflow: ellipsis +} +.alphaChar { + font-size: 2em; + position: relative +} +/* +----------- +Content table +----------- +*/ + +@media print { + .toc { + float: right; + clear: right; + padding-bottom: 10px; + padding-top: 50px; + width: 100%; + background-image: url(../images/bgrContent.png); + background-position: top; + background-repeat: no-repeat; + } +} + +@media screen { + .toc { + float: right; + clear: right; + vertical-align: top; + -moz-border-radius: 7px 7px 7px 7px; + -webkit-border-radius: 7px 7px 7px 7px; + border-radius: 7px 7px 7px 7px; + background: #FFF url('../images/bgrContent.png'); + background-position: top; + background-repeat: repeat-x; + border: 1px solid #E6E6E6; + padding-left: 5px; + padding-bottom: 10px; + height: auto; + width: 200px; + text-align: left; + margin-left: 20px; + } +} + + +.toc h3 { + text-decoration: none +} + +.toc h3 { + font: 500 14px/1.2 Arial; + font-weight: 100; + padding: 0px; + margin: 0px; + padding-top: 5px; + padding-left: 5px; +} + +.toc ul { + padding-left: 10px; + padding-right: 5px; +} + +.toc ul li { + margin-left: 15px; + list-style-image: url(../images/bullet_dn.png); + marker-offset: 0px; + margin-bottom: 8px; + padding-left: 0px; + } + +.toc .level1 { + border: none +} + +.toc .level2 { + border: none; + margin-left: 25px; +} + +.level3 { + border: none; + margin-left: 30px; +} + +.clearfix { + clear: both +} + +/* +----------- +Landing page +----------- +*/ + +.col-group { + white-space: nowrap; + vertical-align: top; +} + + +.landing h2 { + background-color: transparent; + border: none; + margin-bottom: 0px; + font-size: 18px; +} + +.landing a, .landing li { + font-size: 13px; + font-weight: bold !important; +} + +.col-1 { + display: inline-block; + white-space: normal; + width: 70%; + height: 100%; + float: left; +} + +.col-2 { + display: inline-block; + white-space: normal; + width: 20%; + margin-left: 5%; + position: relative; + top: -20px; +} + +.col-1 h1 { + margin: 20px 0 0 0; + } + +.col-1 h2 { + font-size: 18px; + font-weight: bold !important; +} + +.landingicons { + display: inline-block; + width: 100%; +} + +.icons1of3 { + display: inline-block; + width: 33.3333%; + float: left; +} + +.icons1of3 h2, .doc-column h2 { + font-size: 15px; + margin: 0px; + padding: 0px; +} + +div.multi-column { + position: relative; +} + +div.multi-column div { + display: -moz-inline-box; + display: inline-block; + vertical-align: top; + margin-top: 1em; + margin-right: 4em; + width: 24em; +} + +.mainContent .video { + width:40%; + max-width:640px; + margin: 15px 0 0 15px; + position:relative; + display:table +} + +.mainContent .video > .vspan { + padding-top:60%; + display:block +} +.mainContent .video iframe { + width:100%; + height:100%; + position:absolute; + top:0; + left:0 +} diff --git a/proxyroles/expressionrole.cpp b/proxyroles/expressionrole.cpp index 2e40c32..70af4fa 100644 --- a/proxyroles/expressionrole.cpp +++ b/proxyroles/expressionrole.cpp @@ -8,7 +8,8 @@ namespace qqsfpm { \qmltype ExpressionRole \inherits SingleRole \inqmlmodule SortFilterProxyModel - \brief A custom role computed from a javascrip expression + \ingroup ProxyRoles + \brief A custom role computed from a javascript expression. An ExpressionRole is a \l ProxyRole allowing to implement a custom role based on a javascript expression. diff --git a/proxyroles/filterrole.cpp b/proxyroles/filterrole.cpp index 1619985..84dcbcd 100644 --- a/proxyroles/filterrole.cpp +++ b/proxyroles/filterrole.cpp @@ -7,7 +7,9 @@ namespace qqsfpm { \qmltype FilterRole \inherits SingleRole \inqmlmodule SortFilterProxyModel - \brief A role resolving to \c true for rows matching all its filters + \ingroup ProxyRoles + \ingroup FilterContainer + \brief A role resolving to \c true for rows matching all its filters. A FilterRole is a \l ProxyRole that returns \c true for rows matching all its filters. @@ -21,15 +23,17 @@ namespace qqsfpm { } } \endcode + \sa FilterContainer */ /*! - \qmlproperty string FilterRole::filters + \qmlproperty list FilterRole::filters + \default This property holds the list of filters for this filter role. The data of this role will be equal to the \c true if all its filters match the model row, \c false otherwise. - \sa Filter + \sa Filter, FilterContainer */ void FilterRole::onFilterAppended(Filter* filter) diff --git a/proxyroles/joinrole.cpp b/proxyroles/joinrole.cpp index 077b1fe..c252be3 100644 --- a/proxyroles/joinrole.cpp +++ b/proxyroles/joinrole.cpp @@ -7,7 +7,8 @@ namespace qqsfpm { \qmltype JoinRole \inherits SingleRole \inqmlmodule SortFilterProxyModel - \brief a role made from concatenating other roles + \ingroup ProxyRoles + \brief a role made from concatenating other roles. A JoinRole is a simple \l ProxyRole that concatenates other roles. diff --git a/proxyroles/proxyrole.cpp b/proxyroles/proxyrole.cpp index 52c94f6..172b0c2 100644 --- a/proxyroles/proxyrole.cpp +++ b/proxyroles/proxyrole.cpp @@ -13,7 +13,8 @@ namespace qqsfpm { /*! \qmltype ProxyRole \inqmlmodule SortFilterProxyModel - \brief Base type for the \l SortFilterProxyModel proxy roles + \ingroup ProxyRoles + \brief Base type for the \l SortFilterProxyModel proxy roles. The ProxyRole type cannot be used directly in a QML file. It exists to provide a set of common properties and methods, diff --git a/proxyroles/proxyrolecontainer.cpp b/proxyroles/proxyrolecontainer.cpp index 1f81fcc..f8ea665 100644 --- a/proxyroles/proxyrolecontainer.cpp +++ b/proxyroles/proxyrolecontainer.cpp @@ -2,11 +2,6 @@ namespace qqsfpm { -ProxyRoleContainer::~ProxyRoleContainer() -{ - -} - QList ProxyRoleContainer::proxyRoles() const { return m_proxyRoles; diff --git a/proxyroles/proxyrolecontainer.h b/proxyroles/proxyrolecontainer.h index f1572da..bcd932e 100644 --- a/proxyroles/proxyrolecontainer.h +++ b/proxyroles/proxyrolecontainer.h @@ -11,7 +11,7 @@ class QQmlSortFilterProxyModel; class ProxyRoleContainer { public: - virtual ~ProxyRoleContainer(); + virtual ~ProxyRoleContainer() = default; QList proxyRoles() const; void appendProxyRole(ProxyRole* proxyRole); diff --git a/proxyroles/regexprole.cpp b/proxyroles/regexprole.cpp index 70d5c18..fc9784d 100644 --- a/proxyroles/regexprole.cpp +++ b/proxyroles/regexprole.cpp @@ -8,6 +8,7 @@ namespace qqsfpm { \qmltype RegExpRole \inherits ProxyRole \inqmlmodule SortFilterProxyModel + \ingroup ProxyRoles \brief A ProxyRole extracting data from a source role via a regular expression. A RegExpRole is a \l ProxyRole that provides a role for each named capture group of its regular expression \l pattern. diff --git a/proxyroles/singlerole.cpp b/proxyroles/singlerole.cpp index f142588..fb2ddde 100644 --- a/proxyroles/singlerole.cpp +++ b/proxyroles/singlerole.cpp @@ -5,9 +5,11 @@ namespace qqsfpm { /*! \qmltype SingleRole + \qmlabstract \inherits ProxyRole \inqmlmodule SortFilterProxyModel - \brief Base type for the \l SortFilterProxyModel proxy roles defining a single role + \ingroup ProxyRoles + \brief Base type for the \l SortFilterProxyModel proxy roles defining a single role. SingleRole is a convenience base class for proxy roles who define a single role. It cannot be used directly in a QML file. diff --git a/proxyroles/switchrole.cpp b/proxyroles/switchrole.cpp index 900a274..f21de84 100644 --- a/proxyroles/switchrole.cpp +++ b/proxyroles/switchrole.cpp @@ -9,7 +9,9 @@ namespace qqsfpm { \qmltype SwitchRole \inherits SingleRole \inqmlmodule SortFilterProxyModel - \brief A role using \l Filter to conditionnaly compute its data + \ingroup ProxyRoles + \ingroup FilterContainer + \brief A role using \l Filter to conditionnaly compute its data. A SwitchRole is a \l ProxyRole that computes its data with the help of \l Filter. Each top level filters specified in the \l SwitchRole is evaluated on the rows of the model, if a \l Filter evaluates to true, the data of the \l SwitchRole for this row will be the one of the attached \l {value} {SwitchRole.value} property. @@ -30,7 +32,7 @@ namespace qqsfpm { } } \endcode - + \sa FilterContainer */ SwitchRoleAttached::SwitchRoleAttached(QObject* parent) : QObject (parent) { @@ -101,11 +103,12 @@ void SwitchRole::setDefaultValue(const QVariant& defaultValue) /*! \qmlproperty list SwitchRole::filters + \default This property holds the list of filters for this proxy role. The data of this role will be equal to the attached \l {value} {SwitchRole.value} property of the first filter that matches the model row. - \sa Filter + \sa Filter, FilterContainer */ void SwitchRole::proxyModelCompleted(const QQmlSortFilterProxyModel& proxyModel) diff --git a/qqmlsortfilterproxymodel.cpp b/qqmlsortfilterproxymodel.cpp index cdb6a0e..bd06435 100644 --- a/qqmlsortfilterproxymodel.cpp +++ b/qqmlsortfilterproxymodel.cpp @@ -7,24 +7,17 @@ namespace qqsfpm { -/*! - \page index.html overview - - \title SortFilterProxyModel QML Module - - SortFilterProxyModel is an implementation of QSortFilterProxyModel conveniently exposed for QML. - - \generatelist qmltypesbymodule SortFilterProxyModel -*/ - /*! \qmltype SortFilterProxyModel \inqmlmodule SortFilterProxyModel - \brief Filters and sorts data coming from a source \l {http://doc.qt.io/qt-5/qabstractitemmodel.html} {QAbstractItemModel} + \ingroup SortFilterProxyModel + \ingroup FilterContainer + \ingroup SorterContainer + \brief Filters and sorts data coming from a source \l {http://doc.qt.io/qt-5/qabstractitemmodel.html} {QAbstractItemModel}. The SortFilterProxyModel type provides support for filtering and sorting data coming from a source model. + \sa FilterContainer, SorterContainer */ - QQmlSortFilterProxyModel::QQmlSortFilterProxyModel(QObject *parent) : QSortFilterProxyModel(parent), #ifdef SFPM_DELAYED @@ -54,7 +47,6 @@ QQmlSortFilterProxyModel::QQmlSortFilterProxyModel(QObject *parent) : The number of rows in the proxy model (not filtered out the source model) */ - int QQmlSortFilterProxyModel::count() const { return rowCount(); @@ -67,9 +59,8 @@ int QQmlSortFilterProxyModel::count() const This can be used as an optimization when multiple filters, sorters or proxyRoles are changed in a single event loop. They will be executed once in a single batch at the next event loop instead of being executed in multiple sequential batches. - By default, the SortFilterProxyModel is not delayed, unless the SFPM_DELAYED environment variable is defined at compile time. + By default, the SortFilterProxyModel is not delayed, unless the \c SFPM_DELAYED environment variable is defined at compile time. */ - bool QQmlSortFilterProxyModel::delayed() const { return m_delayed; @@ -154,7 +145,6 @@ void QQmlSortFilterProxyModel::setFilterValue(const QVariant& filterValue) \sa {http://doc.qt.io/qt-5/qsortfilterproxymodel.html#sortRole-prop} {sortRole}, roleForName */ - const QString& QQmlSortFilterProxyModel::sortRoleName() const { return m_sortRoleName; @@ -190,7 +180,7 @@ void QQmlSortFilterProxyModel::setAscendingSortOrder(bool ascendingSortOrder) This property holds the list of filters for this proxy model. To be included in the model, a row of the source model has to be accepted by all the top level filters of this list. - \sa Filter + \sa Filter, FilterContainer */ /*! @@ -198,7 +188,7 @@ void QQmlSortFilterProxyModel::setAscendingSortOrder(bool ascendingSortOrder) This property holds the list of sorters for this proxy model. The rows of the source model are sorted by the sorters of this list, in their order of insertion. - \sa Sorter + \sa Sorter, SorterContainer */ /*! @@ -284,7 +274,7 @@ QVariantMap QQmlSortFilterProxyModel::get(int row) const /*! \qmlmethod variant SortFilterProxyModel::get(int row, string roleName) - Return the data for the given \a roleNamte of the item at \a row in the proxy model. This allows the role data to be read (not modified) from JavaScript. + Return the data for the given \a roleName of the item at \a row in the proxy model. This allows the role data to be read (not modified) from JavaScript. This equivalent to calling \c {data(index(row, 0), roleForName(roleName))}. */ QVariant QQmlSortFilterProxyModel::get(int row, const QString& roleName) const @@ -318,7 +308,7 @@ int QQmlSortFilterProxyModel::mapToSource(int proxyRow) const /*! \qmlmethod QModelIndex SortFilterProxyModel::mapFromSource(QModelIndex sourceIndex) - Returns the model index in the SortFilterProxyModel given the sourceIndex from the source model. + Returns the model index in the SortFilterProxyModel given the \a sourceIndex from the source model. */ QModelIndex QQmlSortFilterProxyModel::mapFromSource(const QModelIndex& sourceIndex) const { diff --git a/sorters/expressionsorter.cpp b/sorters/expressionsorter.cpp index e1fbd0a..7bb9206 100644 --- a/sorters/expressionsorter.cpp +++ b/sorters/expressionsorter.cpp @@ -8,7 +8,8 @@ namespace qqsfpm { \qmltype ExpressionSorter \inherits Sorter \inqmlmodule SortFilterProxyModel - \brief Sorts row with a custom sorting + \ingroup Sorters + \brief Sorts row with a custom javascript expression. An ExpressionSorter is a \l Sorter allowing to implement custom sorting based on a javascript expression. */ diff --git a/sorters/filtersorter.cpp b/sorters/filtersorter.cpp index 31783ac..185c504 100644 --- a/sorters/filtersorter.cpp +++ b/sorters/filtersorter.cpp @@ -7,7 +7,9 @@ namespace qqsfpm { \qmltype FilterSorter \inherits Sorter \inqmlmodule SortFilterProxyModel - \brief Sorts rows based on if they match filters + \ingroup Sorters + \ingroup FilterContainer + \brief Sorts rows based on if they match filters. A FilterSorter is a \l Sorter that orders row matching its filters before the rows not matching the filters. @@ -20,15 +22,17 @@ namespace qqsfpm { } } \endcode + \sa FilterContainer */ /*! - \qmlproperty string FilterSorter::filters + \qmlproperty list FilterSorter::filters + \default 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. - \sa Filter + \sa Filter, FilterContainer */ int FilterSorter::compare(const QModelIndex& sourceLeft, const QModelIndex& sourceRight, const QQmlSortFilterProxyModel &proxyModel) const diff --git a/sorters/rolesorter.cpp b/sorters/rolesorter.cpp index f4932eb..db2d446 100644 --- a/sorters/rolesorter.cpp +++ b/sorters/rolesorter.cpp @@ -7,7 +7,8 @@ namespace qqsfpm { \qmltype RoleSorter \inherits Sorter \inqmlmodule SortFilterProxyModel - \brief Sorts rows based on a source model role + \ingroup Sorters + \brief Sorts rows based on a source model role. A RoleSorter is a simple \l Sorter that sorts rows based on a source model role. diff --git a/sorters/sorter.cpp b/sorters/sorter.cpp index d2d92e1..e9d0547 100644 --- a/sorters/sorter.cpp +++ b/sorters/sorter.cpp @@ -5,8 +5,10 @@ namespace qqsfpm { /*! \qmltype Sorter + \qmlabstract \inqmlmodule SortFilterProxyModel - \brief Base type for the \l SortFilterProxyModel sorters + \ingroup Sorters + \brief Base type for the \l SortFilterProxyModel sorters. The Sorter type cannot be used directly in a QML file. It exists to provide a set of common properties and methods, diff --git a/sorters/sortercontainer.cpp b/sorters/sortercontainer.cpp index 36b1c62..f986e37 100644 --- a/sorters/sortercontainer.cpp +++ b/sorters/sortercontainer.cpp @@ -4,10 +4,16 @@ namespace qqsfpm { -SorterContainer::~SorterContainer() -{ +/*! + \qmltype SorterContainer + \qmlabstract + \inqmlmodule SortFilterProxyModel + \ingroup SorterAttached + \brief Abstract interface for types containing \l {Sorter}{Sorters}. -} + \section2 Types implementing this interface: + \annotatedlist SorterContainer +*/ QList SorterContainer::sorters() const { diff --git a/sorters/sortercontainer.h b/sorters/sortercontainer.h index e4c8e53..016cc6d 100644 --- a/sorters/sortercontainer.h +++ b/sorters/sortercontainer.h @@ -13,7 +13,7 @@ class QQmlSortFilterProxyModel; class SorterContainer { public: - virtual ~SorterContainer(); + virtual ~SorterContainer() = default; QList sorters() const; void appendSorter(Sorter* sorter); diff --git a/sorters/stringsorter.cpp b/sorters/stringsorter.cpp index 451d226..0c331d0 100644 --- a/sorters/stringsorter.cpp +++ b/sorters/stringsorter.cpp @@ -6,7 +6,8 @@ namespace qqsfpm { \qmltype StringSorter \inherits RoleSorter \inqmlmodule SortFilterProxyModel - \brief Sorts rows based on a source model string role + \ingroup Sorters + \brief Sorts rows based on a source model string role. \l StringSorter is a specialized \l RoleSorter that sorts rows based on a source model string role. \l StringSorter compares strings according to a localized collation algorithm. diff --git a/sortfilterproxymodel.qdocconf b/sortfilterproxymodel.qdocconf index f89aeb6..7a3a653 100644 --- a/sortfilterproxymodel.qdocconf +++ b/sortfilterproxymodel.qdocconf @@ -1,5 +1,4 @@ project = SortFilterProxyModel -description = lol sourcedirs = . @@ -9,7 +8,6 @@ headers.fileextensions = "*.h" outputdir = docs/ HTML.templatedir = . -HTML.stylesheets = "D:\\coding\\Qt\\Docs\\Qt-5.8\\global\\template\\style\\offline.css" +HTML.stylesheets = "offline.css" -HTML.headerstyles = \ - " \n" +HTML.headerstyles = " \n"