Messagelib

interceptormanager.h
1 /*
2  SPDX-FileCopyrightText: 2016-2023 Laurent Montel <[email protected]>
3 
4  SPDX-License-Identifier: LGPL-2.0-or-later
5 */
6 
7 #pragma once
8 
9 #include "webengineviewer/networkpluginurlinterceptor.h"
10 #include "webengineviewer_export.h"
11 #include <memory>
12 class KActionCollection;
13 class QWebEngineView;
14 class QAction;
15 namespace WebEngineViewer
16 {
17 class WebHitTestResult;
18 class NetworkPluginUrlInterceptorInterface;
19 class NetworkAccessManagerWebEnginePrivate;
20 /**
21  * @brief The InterceptorManager class
22  * @author Laurent Montel <[email protected]>
23  */
24 class WEBENGINEVIEWER_EXPORT InterceptorManager : public QObject
25 {
26  Q_OBJECT
27 public:
28  explicit InterceptorManager(QWebEngineView *webEngine, KActionCollection *ac, QObject *parent = nullptr);
29  ~InterceptorManager() override;
30  void addInterceptor(WebEngineViewer::NetworkPluginUrlInterceptorInterface *interceptor);
31  [[nodiscard]] QList<QAction *> interceptorUrlActions(const WebEngineViewer::WebHitTestResult &result) const;
32  void removeInterceptor(WebEngineViewer::NetworkPluginUrlInterceptorInterface *interceptor);
33 
34 private:
35  std::unique_ptr<NetworkAccessManagerWebEnginePrivate> const d;
36 };
37 }
The WebHitTestResult class.
The InterceptorManager class.
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Sat Dec 2 2023 03:56:53 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.