File indexing completed on 2025-01-26 04:57:24

0001 /*
0002    SPDX-FileCopyrightText: 2016-2024 Laurent Montel <montel@kde.org>
0003 
0004    SPDX-License-Identifier: LGPL-2.0-or-later
0005 */
0006 
0007 #pragma once
0008 
0009 #include <QWebEngineView>
0010 #include <QWidget>
0011 namespace WebEngineViewer
0012 {
0013 class WebEnginePage;
0014 class WebHitTestResult;
0015 }
0016 
0017 class TestWebEngineView : public QWebEngineView
0018 {
0019     Q_OBJECT
0020 public:
0021     explicit TestWebEngineView(QWidget *parent = nullptr);
0022 
0023 protected:
0024     void contextMenuEvent(QContextMenuEvent *e) override;
0025 private Q_SLOTS:
0026     void slotHitTestFinished(const WebEngineViewer::WebHitTestResult &result);
0027 };
0028 
0029 class TestWebEngine : public QWidget
0030 {
0031     Q_OBJECT
0032 public:
0033     explicit TestWebEngine(QWidget *parent = nullptr);
0034     ~TestWebEngine() override;
0035 
0036 private:
0037     WebEngineViewer::WebEnginePage *mEnginePage;
0038 };