Messagelib

webengineview.h
1 /*
2  SPDX-FileCopyrightText: 2016-2024 Laurent Montel <montel@kde.org>
3 
4  SPDX-License-Identifier: LGPL-2.0-or-later
5 */
6 
7 #pragma once
8 
9 #include "webengineviewer_export.h"
10 #include <QWebEngineView>
11 #include <WebEngineViewer/BlockTrackingUrlInterceptor>
12 namespace WebEngineViewer
13 {
14 class WebEngineViewPrivate;
15 class LocalDataBaseManager;
16 
17 /**
18  * @brief The WebEngineView class
19  * @author Laurent Montel <montel@kde.org>
20  */
21 class WEBENGINEVIEWER_EXPORT WebEngineView : public QWebEngineView
22 {
23  Q_OBJECT
24 public:
25  explicit WebEngineView(QWidget *parent = nullptr);
26  ~WebEngineView() override;
27 
28  void clearRelativePosition();
29  void saveRelativePosition();
30  [[nodiscard]] qreal relativePosition() const;
31 
32  [[nodiscard]] WebEngineViewer::LocalDataBaseManager *phishingDatabase() const;
33 
34 Q_SIGNALS:
35  void mailTrackingFound(const WebEngineViewer::BlockTrackingUrlInterceptor::TrackerBlackList &);
36 
37 protected:
38  bool eventFilter(QObject *obj, QEvent *event) override;
39  QWebEngineView *createWindow(QWebEnginePage::WebWindowType type) override;
40 
41  virtual void forwardWheelEvent(QWheelEvent *event);
42  virtual void forwardKeyPressEvent(QKeyEvent *event);
43  virtual void forwardKeyReleaseEvent(QKeyEvent *event);
44  virtual void forwardMousePressEvent(QMouseEvent *event);
45  virtual void forwardMouseMoveEvent(QMouseEvent *event);
46  virtual void forwardMouseReleaseEvent(QMouseEvent *event);
47 
48 private:
49  std::unique_ptr<WebEngineViewPrivate> const d;
50 };
51 }
The WebEngineView class.
Definition: webengineview.h:21
The LocalDataBaseManager class.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Thu Feb 15 2024 03:55:21 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.