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 TOPICCHOOSER_H
5#define TOPICCHOOSER_H
6
7#include "ui_topicchooser.h"
8
9#include <QtWidgets/QDialog>
10
11QT_BEGIN_NAMESPACE
12
13class QSortFilterProxyModel;
14struct QHelpLink;
15
16class TopicChooser : public QDialog
17{
18 Q_OBJECT
19
20public:
21 TopicChooser(QWidget *parent, const QString &keyword, const QList<QHelpLink> &docs);
22 ~TopicChooser() override;
23
24 QUrl link() const;
25
26private slots:
27 void acceptDialog();
28 void setFilter(const QString &pattern);
29 void activated(const QModelIndex &index);
30
31private:
32 bool eventFilter(QObject *object, QEvent *event) override;
33
34private:
35 Ui::TopicChooser ui;
36 QList<QUrl> m_links;
37
38 QModelIndex m_activedIndex;
39 QSortFilterProxyModel *m_filterModel;
40};
41
42QT_END_NAMESPACE
43
44#endif // TOPICCHOOSER_H
45

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