Falkon Develop
Cross-platform Qt-based web browser
searchtoolbar.h
Go to the documentation of this file.
1/* ============================================================
2* Falkon - Qt web browser
3* Copyright (C) 2010-2017 David Rosca <nowrep@gmail.com>
4*
5* This program is free software: you can redistribute it and/or modify
6* it under the terms of the GNU General Public License as published by
7* the Free Software Foundation, either version 3 of the License, or
8* (at your option) any later version.
9*
10* This program is distributed in the hope that it will be useful,
11* but WITHOUT ANY WARRANTY; without even the implied warranty of
12* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13* GNU General Public License for more details.
14*
15* You should have received a copy of the GNU General Public License
16* along with this program. If not, see <http://www.gnu.org/licenses/>.
17* ============================================================ */
18#ifndef SEARCHTOOLBAR_H
19#define SEARCHTOOLBAR_H
20
21#include <QWidget>
22#include <QWebEnginePage>
23#include <QtWebEngineCoreVersion>
24
25#include <QWebEngineFindTextResult>
26
27#include "qzcommon.h"
28
29namespace Ui
30{
31class SearchToolbar;
32}
33
34class QLineEdit;
35
36class WebView;
37class LineEdit;
38
39class FALKON_EXPORT SearchToolBar : public QWidget
40{
41 Q_OBJECT
42public:
43 explicit SearchToolBar(WebView* view, QWidget* parent = nullptr);
44 ~SearchToolBar() override;
45
46 void showMinimalInPopupWindow();
47
48 void focusSearchLine();
49 bool eventFilter(QObject* obj, QEvent* event) override;
50
51public Q_SLOTS:
52 void setText(const QString &text);
53 void searchText(const QString &text);
54 void updateFindFlags();
55 void caseSensitivityChanged();
56
57 void findNext();
58 void findPrevious();
59
60 void showSearchResults(const QWebEngineFindTextResult &result);
61
62 void close();
63
64private:
65 Ui::SearchToolbar* ui;
66 WebView* m_view;
67
68 QWebEnginePage::FindFlags m_findFlags;
69 int m_searchRequests = 0;
70};
71
72#endif // SEARCHTOOLBAR_H
#define FALKON_EXPORT
Definition: qzcommon.h:28