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>
12namespace WebEngineViewer
13{
14class WebEngineViewPrivate;
15class LocalDataBaseManager;
16
17/**
18 * @brief The WebEngineView class
19 * @author Laurent Montel <montel@kde.org>
20 */
21class WEBENGINEVIEWER_EXPORT WebEngineView : public QWebEngineView
22{
23 Q_OBJECT
24public:
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
34Q_SIGNALS:
35 void mailTrackingFound(const WebEngineViewer::BlockTrackingUrlInterceptor::TrackerBlackList &);
36
37protected:
38 [[nodiscard]] bool eventFilter(QObject *obj, QEvent *event) override;
39 [[nodiscard]] 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
48private:
49 std::unique_ptr<WebEngineViewPrivate> const d;
50};
51}
The LocalDataBaseManager class.
The WebEngineView class.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:07:25 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.