Messagelib

trackingwarningwidget.h
1 /*
2  SPDX-FileCopyrightText: 2017-2021 Laurent Montel <[email protected]>
3 
4  SPDX-License-Identifier: LGPL-2.0-or-later
5 */
6 
7 #pragma once
8 
9 #include <KMessageWidget>
10 
11 #include "webengineviewer_export.h"
12 
13 #include <QMap>
14 #include <QPointer>
15 
16 #include <WebEngineViewer/BlockTrackingUrlInterceptor>
17 
18 namespace WebEngineViewer
19 {
20 class TrackingDetailsDialog;
21 class WEBENGINEVIEWER_EXPORT TrackingWarningWidget : public KMessageWidget
22 {
23  Q_OBJECT
24 public:
25  explicit TrackingWarningWidget(QWidget *parent = nullptr);
26  ~TrackingWarningWidget() override;
27  void addTracker(const WebEngineViewer::BlockTrackingUrlInterceptor::TrackerBlackList &);
28  void hideAndClear();
29 
30 private:
31  void slotShowDetails(const QString &content);
32  Q_REQUIRED_RESULT QString generateDetails() const;
33 
34  struct blackListFound {
35  QString url;
36  int number = 1;
37  };
39  QPointer<TrackingDetailsDialog> mMailTrackingDetailDialog;
40 };
41 }
KIOCORE_EXPORT QString number(KIO::filesize_t size)
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Fri Nov 26 2021 23:16:44 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.