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