1// Copyright (C) 2016 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
3
4#ifndef CONTENTWINDOW_H
5#define CONTENTWINDOW_H
6
7#include <QtCore/QUrl>
8#include <QtCore/QModelIndex>
9#include <QtWidgets/QWidget>
10
11QT_BEGIN_NAMESPACE
12
13class QHelpContentWidget;
14
15class ContentWindow : public QWidget
16{
17 Q_OBJECT
18
19public:
20 ContentWindow();
21 ~ContentWindow() override;
22
23 bool syncToContent(const QUrl &url);
24 void expandToDepth(int depth);
25
26signals:
27 void linkActivated(const QUrl &link);
28 void escapePressed();
29
30private slots:
31 void showContextMenu(const QPoint &pos);
32 void expandTOC();
33 void itemClicked(const QModelIndex &index);
34
35private:
36 void focusInEvent(QFocusEvent *e) override;
37 void keyPressEvent(QKeyEvent *e) override;
38 bool eventFilter(QObject *o, QEvent *e) override;
39
40 QHelpContentWidget * const m_contentWidget;
41 int m_expandDepth;
42};
43
44QT_END_NAMESPACE
45
46#endif // CONTENTWINDOW_H
47

source code of qttools/src/assistant/assistant/contentwindow.h