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 | |
16 | QT_BEGIN_NAMESPACE |
17 | |
18 | |
19 | class QFocusEvent; |
20 | class QHelpSearchQueryWidgetPrivate; |
21 | |
22 | class QHELP_EXPORT QHelpSearchQueryWidget : public QWidget |
23 | { |
24 | Q_OBJECT |
25 | |
26 | public: |
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 | |
44 | Q_SIGNALS: |
45 | void search(); |
46 | |
47 | private: |
48 | void focusInEvent(QFocusEvent *focusEvent) override; |
49 | void changeEvent(QEvent *event) override; |
50 | |
51 | private: |
52 | QHelpSearchQueryWidgetPrivate *d; |
53 | }; |
54 | |
55 | QT_END_NAMESPACE |
56 | |
57 | #endif // QHELPSEARCHQUERYWIDGET_H |
58 | |