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 "webengineviewer_export.h" 0010 #include <QObject> 0011 class QWebEngineView; 0012 namespace WebEngineViewer 0013 { 0014 class NetworkPluginUrlInterceptorInterface; 0015 /** 0016 * @brief The NetworkPluginUrlInterceptor class 0017 * @author Laurent Montel <montel@kde.org> 0018 */ 0019 class WEBENGINEVIEWER_EXPORT NetworkPluginUrlInterceptor : public QObject 0020 { 0021 Q_OBJECT 0022 public: 0023 explicit NetworkPluginUrlInterceptor(QObject *parent = nullptr); 0024 ~NetworkPluginUrlInterceptor() override; 0025 virtual NetworkPluginUrlInterceptorInterface *createInterface(QWebEngineView *webEngine, QObject *parent = nullptr) = 0; 0026 0027 [[nodiscard]] virtual bool hasConfigureDialog() const; 0028 virtual void showConfigureDialog(QWidget *parent = nullptr); 0029 0030 void setIsEnabled(bool enabled); 0031 [[nodiscard]] bool isEnabled() const; 0032 0033 private: 0034 bool mIsEnabled = false; 0035 }; 0036 }