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