aboutsummaryrefslogtreecommitdiff
path: root/src/mainwindow/widgets/searchform.h
diff options
context:
space:
mode:
authorAqua-sama <aqua@iserlohn-fortress.net>2018-04-17 16:37:25 +0200
committerAqua-sama <aqua@iserlohn-fortress.net>2018-04-17 16:37:25 +0200
commit5152fc15d128821b842ade2c8fa7e2fcb16c0e94 (patch)
tree446658345a873ede716006bfe10d0470b8181aa8 /src/mainwindow/widgets/searchform.h
parentClear navigation bar and address bar when last subwindow is closed (diff)
downloadsmolbote-5152fc15d128821b842ade2c8fa7e2fcb16c0e94.tar.xz
Search box works again
Diffstat (limited to 'src/mainwindow/widgets/searchform.h')
-rw-r--r--src/mainwindow/widgets/searchform.h16
1 files changed, 11 insertions, 5 deletions
diff --git a/src/mainwindow/widgets/searchform.h b/src/mainwindow/widgets/searchform.h
index 94cc2a9..59c4ef5 100644
--- a/src/mainwindow/widgets/searchform.h
+++ b/src/mainwindow/widgets/searchform.h
@@ -6,8 +6,8 @@
* SPDX-License-Identifier: GPL-3.0
*/
-#ifndef SEARCHFORM_H
-#define SEARCHFORM_H
+#ifndef SMOLBOTE_SEARCHFORM_H
+#define SMOLBOTE_SEARCHFORM_H
#include <QWidget>
@@ -16,20 +16,26 @@ namespace Ui
class SearchForm;
}
-class MainWindow;
+class QWebEngineView;
class SearchForm : public QWidget
{
Q_OBJECT
public:
- explicit SearchForm(MainWindow *parentWindow, QWidget *parent = nullptr);
+ explicit SearchForm(QWidget *parent = nullptr);
~SearchForm() override;
+public slots:
+ void setView(QWebEngineView *view);
+
protected:
+ void showEvent(QShowEvent *e) override;
+ void hideEvent(QHideEvent *e) override;
void focusInEvent(QFocusEvent *e) override;
private:
Ui::SearchForm *ui;
+ QWebEngineView *view = nullptr;
};
-#endif // SEARCHFORM_H
+#endif // SMOLBOTE_SEARCHFORM_H