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 #pragma once
8 
9 #include "webengineviewer_export.h"
10 #include <QWebEngineScript>
11 #include <QWebEngineView>
12 #include <WebEngineViewer/BlockTrackingUrlInterceptor>
13 namespace WebEngineViewer
14 {
15 class WebEngineViewPrivate;
16 class WebEngineManageScript;
17 class LocalDataBaseManager;
18 
19 /**
20  * @brief The WebEngineView class
21  * @author Laurent Montel <[email protected]>
22  */
23 class WEBENGINEVIEWER_EXPORT WebEngineView : public QWebEngineView
24 {
25  Q_OBJECT
26 public:
27  explicit WebEngineView(QWidget *parent = nullptr);
28  ~WebEngineView() override;
29 
30  void clearRelativePosition();
31  void saveRelativePosition();
32  Q_REQUIRED_RESULT qreal relativePosition() const;
33 
34  void addScript(const QString &source, const QString &scriptName, QWebEngineScript::InjectionPoint injectionPoint);
35 
36  Q_REQUIRED_RESULT WebEngineManageScript *webEngineManagerScript() const;
37 
38  Q_REQUIRED_RESULT WebEngineViewer::LocalDataBaseManager *phishingDatabase() const;
39 
40 Q_SIGNALS:
41  void mailTrackingFound(const WebEngineViewer::BlockTrackingUrlInterceptor::TrackerBlackList &);
42 
43 protected:
44  bool eventFilter(QObject *obj, QEvent *event) override;
45  QWebEngineView *createWindow(QWebEnginePage::WebWindowType type) override;
46 
47  virtual void forwardWheelEvent(QWheelEvent *event);
48  virtual void forwardKeyPressEvent(QKeyEvent *event);
49  virtual void forwardKeyReleaseEvent(QKeyEvent *event);
50  virtual void forwardMousePressEvent(QMouseEvent *event);
51  virtual void forwardMouseMoveEvent(QMouseEvent *event);
52  virtual void forwardMouseReleaseEvent(QMouseEvent *event);
53 
54 private:
55  std::unique_ptr<WebEngineViewPrivate> const d;
56 };
57 }
The LocalDataBaseManager class.
PartitionTable::TableType type
The WebEngineManageScript class.
The WebEngineView class.
Definition: webengineview.h:23
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Sun Dec 5 2021 23:04:55 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.