Messagelib

webengineview.h
1 /*
2  SPDX-FileCopyrightText: 2016-2021 Laurent Montel <[email protected]>
3 
4  SPDX-License-Identifier: LGPL-2.0-or-later
5 */
6 
7 #ifndef WEBENGINEVIEW_H
8 #define WEBENGINEVIEW_H
9 
10 #include <QWebEngineView>
11 #include <QWebEngineScript>
12 #include "webengineviewer_export.h"
13 namespace WebEngineViewer {
14 class WebEngineViewPrivate;
15 class WebEngineManageScript;
16 class LocalDataBaseManager;
17 
22 class WEBENGINEVIEWER_EXPORT WebEngineView : public QWebEngineView
23 {
24  Q_OBJECT
25 public:
26  explicit WebEngineView(QWidget *parent = nullptr);
27  ~WebEngineView() override;
28 
29  void clearRelativePosition();
30  void saveRelativePosition();
31  Q_REQUIRED_RESULT qreal relativePosition() const;
32 
33  void addScript(const QString &source, const QString &scriptName, QWebEngineScript::InjectionPoint injectionPoint);
34 
35  Q_REQUIRED_RESULT WebEngineManageScript *webEngineManagerScript() const;
36 
37  Q_REQUIRED_RESULT WebEngineViewer::LocalDataBaseManager *phishingDatabase() const;
38 
39 protected:
40  bool eventFilter(QObject *obj, QEvent *event) override;
41  QWebEngineView *createWindow(QWebEnginePage::WebWindowType type) override;
42 
43  virtual void forwardWheelEvent(QWheelEvent *event);
44  virtual void forwardKeyPressEvent(QKeyEvent *event);
45  virtual void forwardKeyReleaseEvent(QKeyEvent *event);
46  virtual void forwardMousePressEvent(QMouseEvent *event);
47  virtual void forwardMouseMoveEvent(QMouseEvent *event);
48  virtual void forwardMouseReleaseEvent(QMouseEvent *event);
49 private:
50  WebEngineViewPrivate *const d;
51 };
52 }
53 #endif // WEBENGINEVIEW_H
The LocalDataBaseManager class.
The WebEngineManageScript class.
The WebEngineView class.
Definition: webengineview.h:22
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Thu Jan 14 2021 23:16:39 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.