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
qhelpfilterdata.cpp
Go to the documentation of this file.
1
// Copyright (C) 2018 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
#
include
"qhelpfilterdata.h"
6
7
#
include
<
QtCore
/
qversionnumber
.
h
>
8
9
QT_BEGIN_NAMESPACE
10
11
class
QHelpFilterDataPrivate
:
public
QSharedData
12
{
13
public
:
14
QHelpFilterDataPrivate
() =
default
;
15
QHelpFilterDataPrivate
(
const
QHelpFilterDataPrivate
&other)
16
:
QSharedData
(
other
)
17
,
m_components
(
other
.
m_components
)
18
,
m_versions
(
other
.
m_versions
)
19
{}
20
21
QStringList
m_components
;
22
QList
<
QVersionNumber
>
m_versions
;
23
};
24
25
/*!
26
\class QHelpFilterData
27
\since 5.13
28
\inmodule QtHelp
29
\brief The QHelpFilterData class provides details for the filters
30
used by QHelpFilterEngine.
31
32
By using setComponents() you may constrain the search results to
33
documents that belong only to components specified on the given list.
34
By using setVersions() you may constrain the search results to
35
documents that belong only to versions specified on the given list.
36
37
\sa QHelpFilterEngine
38
*/
39
40
/*!
41
Constructs the empty filter.
42
*/
43
QHelpFilterData::QHelpFilterData() : d(
new
QHelpFilterDataPrivate) { }
44
45
/*!
46
Constructs a copy of \a other.
47
*/
48
QHelpFilterData::QHelpFilterData(
const
QHelpFilterData &) =
default
;
49
50
/*!
51
Move-constructs a QHelpFilterData instance, making it point at the same object that \a other was pointing to.
52
*/
53
QHelpFilterData::QHelpFilterData(QHelpFilterData &&) =
default
;
54
55
/*!
56
Destroys the filter.
57
*/
58
QHelpFilterData::~QHelpFilterData() =
default
;
59
60
/*!
61
Assigns \a other to this filter and returns a reference to this filter.
62
*/
63
QHelpFilterData &QHelpFilterData::operator=(
const
QHelpFilterData &) =
default
;
64
65
/*!
66
Move-assigns \a other to this QHelpFilterData instance.
67
*/
68
QHelpFilterData &QHelpFilterData::operator=(QHelpFilterData &&) =
default
;
69
70
/*!
71
\fn void QHelpFilterData::swap(QHelpFilterData &other)
72
73
Swaps the filter \a other with this filter. This
74
operation is very fast and never fails.
75
*/
76
77
bool
QHelpFilterData::operator==(
const
QHelpFilterData &other)
const
78
{
79
return
(d->m_components == other.d->m_components && d->m_versions == other.d->m_versions);
80
}
81
82
/*!
83
Specifies the component list that is used for filtering
84
the search results. Only results from components in the list
85
\a components shall be returned.
86
*/
87
void
QHelpFilterData::setComponents(
const
QStringList &components)
88
{
89
d->m_components = components;
90
}
91
92
/*!
93
Specifies the version list that is used for filtering
94
the search results. Only results from versions in the list
95
\a versions shall be returned.
96
*/
97
void
QHelpFilterData::setVersions(
const
QList<QVersionNumber> &versions)
98
{
99
d->m_versions = versions;
100
}
101
102
/*!
103
Returns the component list that is used for filtering
104
the search results.
105
*/
106
QStringList QHelpFilterData::components()
const
107
{
108
return
d->m_components;
109
}
110
111
/*!
112
Returns the version list that is used for filtering
113
the search results.
114
*/
115
QList<QVersionNumber> QHelpFilterData::versions()
const
116
{
117
return
d->m_versions;
118
}
119
120
QT_END_NAMESPACE
QHelpFilterDataPrivate
Definition
qhelpfilterdata.cpp:12
QHelpFilterDataPrivate::m_components
QStringList m_components
Definition
qhelpfilterdata.cpp:21
QHelpFilterDataPrivate::QHelpFilterDataPrivate
QHelpFilterDataPrivate(const QHelpFilterDataPrivate &other)
Definition
qhelpfilterdata.cpp:15
QHelpFilterDataPrivate::m_versions
QList< QVersionNumber > m_versions
Definition
qhelpfilterdata.cpp:22
QHelpFilterDataPrivate::QHelpFilterDataPrivate
QHelpFilterDataPrivate()=default
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qsequentialanimationgroup.cpp:47
qttools
src
assistant
help
qhelpfilterdata.cpp
Generated on
for Qt by
1.18.0