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
9QT_BEGIN_NAMESPACE
10
11class QVersionNumber;
12class QHelpEngineCore;
13class HelpDocSettingsPrivate;
14
15class HelpDocSettings final
16{
17public:
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
40private:
41 QSharedDataPointer<HelpDocSettingsPrivate> d;
42};
43
44QT_END_NAMESPACE
45
46#endif // HELPDOCSETTINGS_H
47

source code of qttools/src/assistant/assistant/helpdocsettings.h