Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Toggle main menu visibility
Loading...
Searching...
No Matches
qqmlrolefilter_p.h
Go to the documentation of this file.
1
// Copyright (C) 2025 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
QQMLROLEFILTER_P_H
6
#
define
QQMLROLEFILTER_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
<
QtQmlModels
/
private
/
qqmlfilterbase_p
.
h
>
20
21
QT_BEGIN_NAMESPACE
22
23
class
QQmlSortFilterProxyModel;
24
class
QQmlRoleFilterPrivate
;
25
26
class
Q_QMLMODELS_EXPORT
QQmlRoleFilter
:
public
QQmlFilterBase
27
{
28
Q_OBJECT
29
Q_PROPERTY(QString roleName READ roleName WRITE setRoleName NOTIFY roleNameChanged)
30
QML_NAMED_ELEMENT(RoleFilter)
31
QML_UNCREATABLE(
""
)
32
QML_ADDED_IN_VERSION(6, 10)
33
34
public
:
35
explicit
QQmlRoleFilter(QObject *parent =
nullptr
);
36
QQmlRoleFilter(QQmlFilterBasePrivate *priv, QObject *parent =
nullptr
);
37
~QQmlRoleFilter() =
default
;
38
39
const
QString& roleName()
const
;
40
void
setRoleName(
const
QString& roleName);
41
virtual
void
update(
const
QQmlSortFilterProxyModel *) override;
42
43
Q_SIGNALS:
44
void
roleNameChanged();
45
46
protected
:
47
int
itemRole(
const
QQmlSortFilterProxyModel *proxyModel)
const
;
48
49
private
:
50
Q_DECLARE_PRIVATE(QQmlRoleFilter)
51
};
52
53
class
QQmlRoleFilterPrivate
:
public
QQmlFilterBasePrivate
54
{
55
Q_DECLARE_PUBLIC (QQmlRoleFilter)
56
57
public
:
58
QString
m_roleName
=
QString
::
fromUtf8
(
"display"
);
59
mutable
bool
m_roleNameValidated
=
false
;
60
};
61
62
QT_END_NAMESPACE
63
64
#
endif
// QQMLROLEFILTER_P_H
QQmlRoleFilterPrivate
Definition
qqmlrolefilter_p.h:54
QQmlRoleFilterPrivate::m_roleNameValidated
bool m_roleNameValidated
Definition
qqmlrolefilter_p.h:59
QQmlRoleFilter
Definition
qqmlrolefilter_p.h:27
qtdeclarative
src
qmlmodels
sfpm
filters
qqmlrolefilter_p.h
Generated on
for Qt by
1.18.0