Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qqmlcompositefilterbase_p.h
Go to the documentation of this file.
1// Copyright (C) 2026 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3// Qt-Security score:significant reason:default
4
5#ifndef QQMLCOMPOSITEFILTERBASE_P_H
6#define QQMLCOMPOSITEFILTERBASE_P_H
7
8//
9// W A R N I N G
10// -------------
11//
12// This file is not part of the Qt API. It exists purely as an
13// implementation detail. This header file may change from version to
14// version without notice, or even be removed.
15//
16// We mean it.
17//
18
19#include <QtQml/qqmlinfo.h>
20#include <QtQmlModels/private/qqmlsortfilterproxymodel_p.h>
21#include <QtQmlModels/private/qqmlfiltercompositor_p.h>
22
23QT_BEGIN_NAMESPACE
24
25class QQmlSortFilterProxyModel;
27
28class Q_QMLMODELS_EXPORT QQmlCompositeFilterBase: public QQmlFilterCompositor
29{
30 Q_OBJECT
31 Q_CLASSINFO("DefaultProperty", "filters")
32 Q_PROPERTY(QQmlListProperty<QQmlFilterBase> filters READ filtersListProperty CONSTANT FINAL)
33 QML_NAMED_ELEMENT(CompositeFilterBase)
34 QML_UNCREATABLE("")
35 QML_ADDED_IN_VERSION(6, 12)
36
37public:
38 explicit QQmlCompositeFilterBase(QObject *parent);
39 void update(const QQmlSortFilterProxyModel *model) override;
40 bool isActive() const override;
41
42 int column() const override {
43 qmlWarning(this) << "column is not supported on composite filters; it is always -1";
44 return -1;
45 }
46 void setColumn(int column) override{
47 Q_UNUSED (column)
48 qmlWarning(this) << "column cannot be set on composite filters, the value will be ignored";
49 };
50
51 bool supportColumnFiltering() const override;
52
53protected:
54 QQmlCompositeFilterBase(QQmlFilterCompositorPrivate *priv, QObject *parent);
55 void refreshCache() override;
56
57private:
58 Q_DECLARE_PRIVATE(QQmlCompositeFilterBase)
59};
60
62{
63 Q_DECLARE_PUBLIC(QQmlCompositeFilterBase)
64};
65
66QT_END_NAMESPACE
67
68#endif // QQMLCOMPOSITEFILTERBASE_P_H