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
qhelpcontentwidget.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// Qt-Security score:significant reason:default
4
5#ifndef QHELPCONTENTWIDGET_H
6#define QHELPCONTENTWIDGET_H
7
8#include <QtHelp/qhelp_global.h>
9#include <QtHelp/qhelpcontentitem.h>
10#include <QtWidgets/qtreeview.h>
11
12QT_BEGIN_NAMESPACE
13
14class QHelpContentModelPrivate;
15class QHelpEngine;
16class QHelpEngineCore;
17class QUrl;
18
19class QHELP_EXPORT QHelpContentModel : public QAbstractItemModel
20{
21 Q_OBJECT
22
23public:
24 ~QHelpContentModel() override;
25
26 void createContentsForCurrentFilter();
27 void createContents(const QString &customFilterName);
28 QHelpContentItem *contentItemAt(const QModelIndex &index) const;
29
30 QVariant data(const QModelIndex &index, int role) const override;
31 QModelIndex index(int row, int column, const QModelIndex &parent = {}) const override;
32 QModelIndex parent(const QModelIndex &index) const override;
33 int rowCount(const QModelIndex &parent = {}) const override;
34 int columnCount(const QModelIndex &parent = {}) const override;
35 bool isCreatingContents() const;
36
37Q_SIGNALS:
38 void contentsCreationStarted();
39 void contentsCreated();
40
41private Q_SLOTS:
42 void insertContents();
43
44private:
45 QHelpContentModel(QHelpEngineCore *helpEngine);
46 QHelpContentModelPrivate *d;
47 friend class QHelpEnginePrivate;
48 friend class QHelpContentModelPrivate;
49};
50
51class QHELP_EXPORT QHelpContentWidget : public QTreeView
52{
53 Q_OBJECT
54
55public:
56 QModelIndex indexOf(const QUrl &link);
57
58Q_SIGNALS:
59 void linkActivated(const QUrl &link);
60
61private Q_SLOTS:
62 void showLink(const QModelIndex &index);
63
64private:
65 bool searchContentItem(QHelpContentModel *model, const QModelIndex &parent,
66 const QString &path);
67 QModelIndex m_syncIndex;
68
69private:
70 QHelpContentWidget();
71 friend class QHelpEngine;
72};
73
74QT_END_NAMESPACE
75
76#endif // QHELPCONTENTWIDGET_H
std::shared_ptr< QHelpContentItem > rootItem
\inmodule QtHelp
Combined button and popup list for selecting options.