1 | // Copyright (C) 2020 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 | |
4 | #ifndef HELPDOCSETTINGS_H |
5 | #define HELPDOCSETTINGS_H |
6 | |
7 | #include <QtCore/QSharedDataPointer> |
8 | |
9 | QT_BEGIN_NAMESPACE |
10 | |
11 | class QVersionNumber; |
12 | class QHelpEngineCore; |
13 | class HelpDocSettingsPrivate; |
14 | |
15 | class HelpDocSettings final |
16 | { |
17 | public: |
18 | HelpDocSettings(); |
19 | HelpDocSettings(const HelpDocSettings &other); |
20 | HelpDocSettings(HelpDocSettings &&other); |
21 | ~HelpDocSettings(); |
22 | |
23 | HelpDocSettings &operator=(const HelpDocSettings &other); |
24 | HelpDocSettings &operator=(HelpDocSettings &&other); |
25 | |
26 | void swap(HelpDocSettings &other) noexcept |
27 | { d.swap(other&: other.d); } |
28 | |
29 | bool addDocumentation(const QString &fileName); |
30 | bool removeDocumentation(const QString &namespaceName); |
31 | QString namespaceName(const QString &fileName) const; |
32 | QStringList components() const; |
33 | QList<QVersionNumber> versions() const; |
34 | QStringList namespaces() const; |
35 | QMap<QString, QString> namespaceToFileName() const; |
36 | |
37 | static HelpDocSettings readSettings(QHelpEngineCore *helpEngine); |
38 | static bool applySettings(QHelpEngineCore *helpEngine, const HelpDocSettings &settings); |
39 | |
40 | private: |
41 | QSharedDataPointer<HelpDocSettingsPrivate> d; |
42 | }; |
43 | |
44 | QT_END_NAMESPACE |
45 | |
46 | #endif // HELPDOCSETTINGS_H |
47 |