Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qhelpindexwidget.h
Go to the documentation of this file.
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 QHELPINDEXWIDGET_H
5#define QHELPINDEXWIDGET_H
6
7#include <QtHelp/qhelp_global.h>
8
9#include <QtCore/qstringlistmodel.h>
10#include <QtCore/qurl.h>
11
12#include <QtWidgets/qlistview.h>
13
15
16class QHelpEngineCore;
19struct QHelpLink;
20
21class QHELP_EXPORT QHelpIndexModel : public QStringListModel
22{
23 Q_OBJECT
24
25public:
26 void createIndexForCurrentFilter();
27 void createIndex(const QString &customFilterName);
28 QModelIndex filter(const QString &filter, const QString &wildcard = {});
29
30 bool isCreatingIndex() const;
31 QHelpEngineCore *helpEngine() const;
32
33Q_SIGNALS:
34 void indexCreationStarted();
35 void indexCreated();
36
37private Q_SLOTS:
38 void insertIndices();
39
40private:
41 QHelpIndexModel(QHelpEngineCore *helpEngine);
42 ~QHelpIndexModel();
43
44 QHelpIndexModelPrivate *d;
45 friend class QHelpEnginePrivate;
46};
47
48class QHELP_EXPORT QHelpIndexWidget : public QListView
49{
50 Q_OBJECT
51 Q_MOC_INCLUDE(<QtHelp/qhelplink.h>)
52
53Q_SIGNALS:
54#if QT_DEPRECATED_SINCE(5, 15)
55 QT_DEPRECATED_X("Use documentActivated() instead")
56 void linkActivated(const QUrl &link, const QString &keyword);
57 QT_DEPRECATED_X("Use documentsActivated() instead")
58 void linksActivated(const QMultiMap<QString, QUrl> &links, const QString &keyword);
59#endif
60 void documentActivated(const QHelpLink &document, const QString &keyword);
61 void documentsActivated(const QList<QHelpLink> &documents, const QString &keyword);
62
63public Q_SLOTS:
64 void filterIndices(const QString &filter, const QString &wildcard = {});
65 void activateCurrentItem();
66
67private Q_SLOTS:
68 void showLink(const QModelIndex &index);
69
70private:
71 QHelpIndexWidget();
72 friend class QHelpEngine;
73};
74
75QT_END_NAMESPACE
76
77#endif // QHELPINDEXWIDGET_H
QHelpSearchEngine * searchEngine
QHelpIndexWidget * indexWidget
QHelpContentModel * contentModel
QHelpEnginePrivate(QHelpEngineCore *helpEngineCore)
QHelpEngineCore * m_helpEngineCore
bool m_isApplyCurrentFilterScheduled
QHelpIndexModel * indexModel
QHelpContentWidget * contentWidget
The QHelpEngine class provides access to contents and indices of the help engine.
Definition qhelpengine.h:19
The QHelpFilterEngine class provides a filtered view of the help contents.
The QHelpIndexModel class provides a model that supplies index keywords to views.
\inmodule QtHelp
Definition qmap.h:189
\inmodule QtCore
Combined button and popup list for selecting options.