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
qhelpdatainterface.cpp
Go to the documentation of this file.
1
// Copyright (C) 2016 The Qt Company Ltd.
2
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
3
// Qt-Security score:insignificant reason:build-tool
4
5
#
include
"qhelpdatainterface_p.h"
6
7
QT_BEGIN_NAMESPACE
8
9
/*!
10
\internal
11
\class QHelpDataContentItem
12
\since 4.4
13
\brief The QHelpDataContentItem class provides an item which represents
14
a topic or section of the contents.
15
16
Every item holds several pieces of information, most notably the title
17
which can later be displayed in a contents overview. The reference is used
18
to store a relative file link to the corresponding section in the
19
documentation.
20
*/
21
22
/*!
23
Constructs a new content item with \a parent as parent item.
24
The constucted item has the title \a title and links to the
25
location specified by \a reference.
26
*/
27
QHelpDataContentItem::QHelpDataContentItem(QHelpDataContentItem *parent,
28
const
QString &title,
const
QString &reference)
29
: m_title(title), m_reference(reference)
30
{
31
if
(parent)
32
parent->m_children.append(
this
);
33
}
34
35
/*!
36
Destructs the item and its children.
37
*/
38
QHelpDataContentItem::~QHelpDataContentItem()
39
{
40
qDeleteAll(m_children);
41
}
42
43
/*!
44
Returns the title of the item.
45
*/
46
QString QHelpDataContentItem::title()
const
47
{
48
return
m_title;
49
}
50
51
/*!
52
Returns the file reference of the item.
53
*/
54
QString QHelpDataContentItem::reference()
const
55
{
56
return
m_reference;
57
}
58
59
/*!
60
Returns a list of all its child items.
61
*/
62
QList<QHelpDataContentItem*> QHelpDataContentItem::children()
const
63
{
64
return
m_children;
65
}
66
67
bool
QHelpDataIndexItem
::
operator
==(
const
QHelpDataIndexItem
&other)
const
68
{
69
return
(other.name == name) && (other.reference == reference);
70
}
71
72
/*!
73
\internal
74
\class QHelpDataFilterSection
75
\since 4.4
76
*/
77
78
/*!
79
Constructs a help data filter section.
80
*/
81
QHelpDataFilterSection
::
QHelpDataFilterSection
()
82
{
83
d =
new
QHelpDataFilterSectionData();
84
}
85
86
/*!
87
Adds the filter attribute \a filter to the filter attributes of
88
this section.
89
*/
90
void
QHelpDataFilterSection
::
addFilterAttribute
(
const
QString &filter)
91
{
92
d->filterAttributes.append(filter);
93
}
94
95
/*!
96
Returns a list of all filter attributes defined for this section.
97
*/
98
QStringList
QHelpDataFilterSection
::
filterAttributes
()
const
99
{
100
return
d->filterAttributes;
101
}
102
103
/*!
104
Adds the index item \a index to the list of indices.
105
*/
106
void
QHelpDataFilterSection
::
addIndex
(
const
QHelpDataIndexItem
&index)
107
{
108
d->indices.append(index);
109
}
110
111
/*!
112
Sets the filter sections list of indices to \a indices.
113
*/
114
void
QHelpDataFilterSection
::
setIndices
(
const
QList<QHelpDataIndexItem> &indices)
115
{
116
d->indices = indices;
117
}
118
119
/*!
120
Returns the list of indices.
121
*/
122
QList
<
QHelpDataIndexItem
>
QHelpDataFilterSection
::
indices
()
const
123
{
124
return
d->indices;
125
}
126
127
/*!
128
Adds the top level content item \a content to the filter section.
129
*/
130
void
QHelpDataFilterSection
::addContent(QHelpDataContentItem *content)
131
{
132
d->contents.append(content);
133
}
134
135
/*!
136
Sets the list of top level content items of the filter section to
137
\a contents.
138
*/
139
void
QHelpDataFilterSection
::
setContents
(
const
QList<QHelpDataContentItem*> &contents)
140
{
141
qDeleteAll(d->contents);
142
d->contents = contents;
143
}
144
145
/*!
146
Returns a list of top level content items.
147
*/
148
QList
<
QHelpDataContentItem
*>
QHelpDataFilterSection
::
contents
()
const
149
{
150
return
d->contents;
151
}
152
153
/*!
154
Adds the file \a file to the filter section.
155
*/
156
void
QHelpDataFilterSection
::
addFile
(
const
QString &file)
157
{
158
d->files.append(file);
159
}
160
161
/*!
162
Set the list of files to \a files.
163
*/
164
void
QHelpDataFilterSection
::
setFiles
(
const
QStringList &files)
165
{
166
d->files = files;
167
}
168
169
/*!
170
Returns the list of files.
171
*/
172
QStringList
QHelpDataFilterSection
::
files
()
const
173
{
174
return
d->files;
175
}
176
177
/*!
178
\internal
179
\class QHelpDataInterface
180
\since 4.4
181
*/
182
183
/*!
184
\fn QHelpDataInterface::QHelpDataInterface()
185
186
Constructs a new help data interface.
187
*/
188
189
/*!
190
\fn QHelpDataInterface::~QHelpDataInterface()
191
192
Destroys the help data interface.
193
*/
194
195
/*!
196
\fn QString QHelpDataInterface::namespaceName() const = 0
197
198
Returns the namespace name of the help data set.
199
*/
200
201
/*!
202
\fn QString QHelpDataInterface::virtualFolder() const = 0
203
204
Returns the virtual folder of the help data set.
205
*/
206
207
/*!
208
\fn QList<QHelpDataCustomFilter> QHelpDataInterface::customFilters () const = 0
209
210
Returns a list of custom filters. Defining custom filters is optional.
211
*/
212
213
/*!
214
\fn QList<QHelpDataFilterSection> QHelpDataInterface::filterSections() const = 0
215
216
Returns a list of filter sections.
217
*/
218
219
/*!
220
\fn QMap<QString, QVariant> QHelpDataInterface::metaData() const = 0
221
222
Returns a map of meta data. A meta data item can hold almost any data
223
and is identified by its name.
224
*/
225
226
/*!
227
\fn QString QHelpDataInterface::rootPath() const = 0
228
229
Returns the root file path of the documentation data. All referenced file
230
path or links of content items are relative to this path.
231
*/
232
233
QT_END_NAMESPACE
QHelpDataFilterSection
Definition
qhelpdatainterface_p.h:69
QHelpDataFilterSection::addFilterAttribute
void addFilterAttribute(const QString &filter)
Adds the filter attribute filter to the filter attributes of this section.
Definition
qhelpdatainterface.cpp:90
QHelpDataFilterSection::setContents
void setContents(const QList< QHelpDataContentItem * > &contents)
Sets the list of top level content items of the filter section to contents.
Definition
qhelpdatainterface.cpp:139
QHelpDataFilterSection::filterAttributes
QStringList filterAttributes() const
Returns a list of all filter attributes defined for this section.
Definition
qhelpdatainterface.cpp:98
QHelpDataFilterSection::setFiles
void setFiles(const QStringList &files)
Set the list of files to files.
Definition
qhelpdatainterface.cpp:164
QHelpDataFilterSection::indices
QList< QHelpDataIndexItem > indices() const
Returns the list of indices.
Definition
qhelpdatainterface.cpp:122
QHelpDataFilterSection::setIndices
void setIndices(const QList< QHelpDataIndexItem > &indices)
Sets the filter sections list of indices to indices.
Definition
qhelpdatainterface.cpp:114
QHelpDataFilterSection::QHelpDataFilterSection
QHelpDataFilterSection()
Constructs a help data filter section.
Definition
qhelpdatainterface.cpp:81
QHelpDataFilterSection::addFile
void addFile(const QString &file)
Adds the file file to the filter section.
Definition
qhelpdatainterface.cpp:156
QHelpDataFilterSection::files
QStringList files() const
Returns the list of files.
Definition
qhelpdatainterface.cpp:172
QHelpDataFilterSection::contents
QList< QHelpDataContentItem * > contents() const
Returns a list of top level content items.
Definition
qhelpdatainterface.cpp:148
QHelpDataFilterSection::addIndex
void addIndex(const QHelpDataIndexItem &index)
Adds the index item index to the list of indices.
Definition
qhelpdatainterface.cpp:106
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qsequentialanimationgroup.cpp:47
QHelpDataIndexItem
Definition
qhelpdatainterface_p.h:42
QHelpDataIndexItem::operator==
bool operator==(const QHelpDataIndexItem &other) const
Definition
qhelpdatainterface.cpp:67
qttools
src
assistant
qhelpgenerator
qhelpdatainterface.cpp
Generated on
for Qt by
1.18.0