1// Copyright (C) 2016 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 QHELPENGINE_P_H
5#define QHELPENGINE_P_H
6
7//
8// W A R N I N G
9// -------------
10//
11// This file is not part of the Qt API. It exists for the convenience
12// of the help generator tools. This header file may change from version
13// to version without notice, or even be removed.
14//
15// We mean it.
16//
17
18#include <QtCore/QHash>
19#include <QtCore/QMap>
20#include <QtCore/QStringList>
21#include <QtCore/QObject>
22
23QT_BEGIN_NAMESPACE
24
25class QSqlQuery;
26
27class QHelpEngineCore;
28class QHelpDBReader;
29class QHelpContentModel;
30class QHelpContentWidget;
31class QHelpIndexModel;
32class QHelpIndexWidget;
33class QHelpSearchEngine;
34class QHelpCollectionHandler;
35class QHelpFilterEngine;
36
37class QHelpEngineCorePrivate : public QObject
38{
39 Q_OBJECT
40
41public:
42 virtual ~QHelpEngineCorePrivate();
43
44 virtual void init(const QString &collectionFile,
45 QHelpEngineCore *helpEngineCore);
46
47 bool setup();
48
49 QHelpCollectionHandler *collectionHandler = nullptr;
50 QHelpFilterEngine *filterEngine = nullptr;
51 QString currentFilter;
52 QString error;
53 bool needsSetup = true;
54 bool autoSaveFilter = true;
55 bool usesFilterEngine = false;
56 bool readOnly = true;
57
58protected:
59 QHelpEngineCore *q;
60
61private slots:
62 void errorReceived(const QString &msg);
63};
64
65class QHelpEnginePrivate : public QHelpEngineCorePrivate
66{
67 Q_OBJECT
68
69public:
70 void init(const QString &collectionFile,
71 QHelpEngineCore *helpEngineCore) override;
72
73 QHelpContentModel *contentModel = nullptr;
74 QHelpContentWidget *contentWidget = nullptr;
75
76 QHelpIndexModel *indexModel = nullptr;
77 QHelpIndexWidget *indexWidget = nullptr;
78
79 QHelpSearchEngine *searchEngine = nullptr;
80
81 friend class QHelpContentProvider;
82 friend class QHelpContentModel;
83 friend class QHelpIndexProvider;
84 friend class QHelpIndexModel;
85
86public slots:
87 void setContentsWidgetBusy();
88 void unsetContentsWidgetBusy();
89 void setIndexWidgetBusy();
90 void unsetIndexWidgetBusy();
91
92private slots:
93 void scheduleApplyCurrentFilter();
94 void applyCurrentFilter();
95
96private:
97 bool m_isApplyCurrentFilterScheduled = false;
98
99};
100
101QT_END_NAMESPACE
102
103#endif
104

source code of qttools/src/assistant/help/qhelpengine_p.h