Doc: Qt Qml Models: Fix documentation issues
Fix linking issues in qqmlsortfilterproxymodel.cpp:
qqmlsortfilterproxymodel.cpp:86: (qdoc) warning: Can't link to
'SortFilterProxyModel::setPrimarySorter(sorter)'
qqmlsortfilterproxymodel.cpp:343: (qdoc) warning: Can't link to
'recursiveFilteringEnabled'
Add an \internal class topic for private class QQmlSortFilterProxyModel.
This removes warnings such as:
qqmlsortfilterproxymodel.cpp:287: (qdoc) warning: No output generated
for 'QQmlSortFilterProxyModel::~QQmlSortFilterProxyModel()'
because 'QQmlSortFilterProxyModel' is undocumented
Change-Id: I6ea3a6be606a5fdff18750beab28cdb16dba9755
Reviewed-by: Mate Barany <mate.barany@qt.io>
(cherry picked from commit 506f128103
)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
985b6c7094
commit
e12be9f7df
|
@ -68,36 +68,33 @@ Q_LOGGING_CATEGORY (lcSortFilterProxyModel, "qt.qml.sortfilterproxymodel")
|
||||||
|
|
||||||
The SortFilterProxyModel dynamically sorts and filters data whenever there
|
The SortFilterProxyModel dynamically sorts and filters data whenever there
|
||||||
is a change to the data in the source model and can be disabled through the
|
is a change to the data in the source model and can be disabled through the
|
||||||
\l{SortFilterProxyModel::dynamicSortFilter}{dynamicSortFilter} property.
|
\l{SortFilterProxyModel::}{dynamicSortFilter} property.
|
||||||
|
|
||||||
The sorters \l RoleSorter, \l StringSorter and \l FunctionSorter can be
|
The sorters \l RoleSorter, \l StringSorter and \l FunctionSorter can be
|
||||||
configured in SortFilterProxyModel. Each sorter can be configured with a
|
configured in SortFilterProxyModel. Each sorter can be configured with a
|
||||||
specific column index through \l{Sorter::column}{column} property. If a
|
specific column index through \l{Sorter::}{column} property. If a
|
||||||
column index is not specified, the sorting will be applied to the column
|
column index is not specified, the sorting will be applied to the column
|
||||||
index 0 of the model by default. The execution order of the sorter can be
|
index 0 of the model by default. The execution order of the sorter can be
|
||||||
modified through the \l{Sorter::priority}{priority} property. This is
|
modified through the \l{Sorter::priority}{priority} property. This is
|
||||||
particularly useful when performing hierarchical sorting, such as sorting
|
particularly useful when performing hierarchical sorting, such as sorting
|
||||||
data in the first column and then applying sorting to subsequent columns.
|
data in the first column and then applying sorting to subsequent columns.
|
||||||
|
|
||||||
To disable a specific sorter, \l{Sorter::enabled}{enabled} can be set to
|
To disable a specific sorter, \l{Sorter::}{enabled} can be set to \c false.
|
||||||
\c false.
|
|
||||||
|
|
||||||
The sorter priority can also be overridden by setting the primary sorter
|
The sorter priority can also be overridden by setting the primary sorter
|
||||||
through the method call
|
through the method call \l{SortFilterProxyModel::}{setPrimarySorter()}.
|
||||||
\l{SortFilterProxyModel::setPrimarySorter(sorter)}{setPrimarySorter}. This
|
This would be helpful in the case where the view wants to sort the data of
|
||||||
would be helpful in the case where the view wants to sort the data of any
|
any specific column by clicking on the column header such as in
|
||||||
specific column by clicking on the column header such as in \l TableView,
|
\l TableView, when there are other sorters also configured for the model.
|
||||||
when there are other sorters also configured for the model.
|
|
||||||
|
|
||||||
The filter \l ValueFilter and \l FunctionFilter can be configured
|
The filter \l ValueFilter and \l FunctionFilter can be configured
|
||||||
in SortFilterProxyModel. Each filter can be set with the
|
in SortFilterProxyModel. Each filter can be set with the
|
||||||
\l{Filter::column}{column} property, similar to the
|
\l{Filter::}{column} property, similar to the sorter, to filter data in a
|
||||||
sorter, to filter data in a specific column. If no column is specified,
|
specific column. If no column is specified, then the filter will be applied
|
||||||
then the filter will be applied to all the column indexes in
|
to all the column indexes in the model. To reduce the overhead of unwanted
|
||||||
the model. To reduce the overhead of unwanted checks during filtering,
|
checks during filtering, it's recommended to specify the column index.
|
||||||
it's recommended to specify the column index.
|
|
||||||
|
|
||||||
To disable a specific filter, \l{Filter::enabled}{enabled} can be set to
|
To disable a specific filter, \l{Filter::}{enabled} can be set to
|
||||||
\c false.
|
\c false.
|
||||||
|
|
||||||
\snippet qml/sortfilterproxymodel/qml-sortfilterproxymodel.qml sfpm-usage
|
\snippet qml/sortfilterproxymodel/qml-sortfilterproxymodel.qml sfpm-usage
|
||||||
|
@ -120,6 +117,10 @@ Q_LOGGING_CATEGORY (lcSortFilterProxyModel, "qt.qml.sortfilterproxymodel")
|
||||||
order as specified in the list.
|
order as specified in the list.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/*!
|
||||||
|
\class QQmlSortFilterProxyModel
|
||||||
|
\internal
|
||||||
|
*/
|
||||||
QQmlSortFilterProxyModel::QQmlSortFilterProxyModel(QObject *parent)
|
QQmlSortFilterProxyModel::QQmlSortFilterProxyModel(QObject *parent)
|
||||||
: QAbstractProxyModel (*new QQmlSortFilterProxyModelPrivate, parent)
|
: QAbstractProxyModel (*new QQmlSortFilterProxyModelPrivate, parent)
|
||||||
{
|
{
|
||||||
|
@ -183,7 +184,8 @@ void QQmlSortFilterProxyModel::setDynamicSortFilter(const bool enabled)
|
||||||
|
|
||||||
This property allows all the configured filters to be applied recursively
|
This property allows all the configured filters to be applied recursively
|
||||||
on children. The behavior is similar to that of
|
on children. The behavior is similar to that of
|
||||||
\l recursiveFilteringEnabled in \l QSortFilterProxyModel.
|
\l {QSortFilterProxyModel::}{recursiveFilteringEnabled} in
|
||||||
|
\l QSortFilterProxyModel.
|
||||||
|
|
||||||
The default value is \c false.
|
The default value is \c false.
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in New Issue