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 | |
23 | QT_BEGIN_NAMESPACE |
24 | |
25 | class QSqlQuery; |
26 | |
27 | class QHelpEngineCore; |
28 | class QHelpDBReader; |
29 | class QHelpContentModel; |
30 | class QHelpContentWidget; |
31 | class QHelpIndexModel; |
32 | class QHelpIndexWidget; |
33 | class QHelpSearchEngine; |
34 | class QHelpCollectionHandler; |
35 | class QHelpFilterEngine; |
36 | |
37 | class QHelpEngineCorePrivate : public QObject |
38 | { |
39 | Q_OBJECT |
40 | |
41 | public: |
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 | |
58 | protected: |
59 | QHelpEngineCore *q; |
60 | |
61 | private slots: |
62 | void errorReceived(const QString &msg); |
63 | }; |
64 | |
65 | class QHelpEnginePrivate : public QHelpEngineCorePrivate |
66 | { |
67 | Q_OBJECT |
68 | |
69 | public: |
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 | |
86 | public slots: |
87 | void setContentsWidgetBusy(); |
88 | void unsetContentsWidgetBusy(); |
89 | void setIndexWidgetBusy(); |
90 | void unsetIndexWidgetBusy(); |
91 | |
92 | private slots: |
93 | void scheduleApplyCurrentFilter(); |
94 | void applyCurrentFilter(); |
95 | |
96 | private: |
97 | bool m_isApplyCurrentFilterScheduled = false; |
98 | |
99 | }; |
100 | |
101 | QT_END_NAMESPACE |
102 | |
103 | #endif |
104 | |