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 QHELPSEARCHQUERYWIDGET_H
5#define QHELPSEARCHQUERYWIDGET_H
6
7#include <QtHelp/qhelp_global.h>
8#include <QtHelp/qhelpsearchengine.h>
9
10#include <QtCore/QMap>
11#include <QtCore/QString>
12#include <QtCore/QStringList>
13
14#include <QtWidgets/QWidget>
15
16QT_BEGIN_NAMESPACE
17
18
19class QFocusEvent;
20class QHelpSearchQueryWidgetPrivate;
21
22class QHELP_EXPORT QHelpSearchQueryWidget : public QWidget
23{
24 Q_OBJECT
25
26public:
27 explicit QHelpSearchQueryWidget(QWidget *parent = nullptr);
28 ~QHelpSearchQueryWidget() override;
29
30 void expandExtendedSearch();
31 void collapseExtendedSearch();
32
33#if QT_DEPRECATED_SINCE(5, 9)
34 QT_DEPRECATED QList<QHelpSearchQuery> query() const;
35 QT_DEPRECATED void setQuery(const QList<QHelpSearchQuery> &queryList);
36#endif
37
38 QString searchInput() const;
39 void setSearchInput(const QString &searchInput);
40
41 bool isCompactMode() const;
42 Q_SLOT void setCompactMode(bool on);
43
44Q_SIGNALS:
45 void search();
46
47private:
48 void focusInEvent(QFocusEvent *focusEvent) override;
49 void changeEvent(QEvent *event) override;
50
51private:
52 QHelpSearchQueryWidgetPrivate *d;
53};
54
55QT_END_NAMESPACE
56
57#endif // QHELPSEARCHQUERYWIDGET_H
58

source code of qttools/src/assistant/help/qhelpsearchquerywidget.h