Messagelib

webengineembedpart.h
1 /*
2  SPDX-FileCopyrightText: 2016-2023 Laurent Montel <[email protected]>
3 
4  SPDX-License-Identifier: GPL-2.0-or-later
5 */
6 
7 #pragma once
8 
9 #include <QMap>
10 #include <QObject>
11 namespace MessageViewer
12 {
13 class WebEngineEmbedPart : public QObject
14 {
15  Q_OBJECT
16 public:
17  explicit WebEngineEmbedPart(QObject *parent = nullptr);
18  ~WebEngineEmbedPart() override;
19 
20  void clear();
21  Q_REQUIRED_RESULT bool isEmpty() const;
22 
23  Q_REQUIRED_RESULT QMap<QString, QString> embeddedPartMap() const;
24 
25  void addEmbedPart(const QByteArray &contentId, const QString &contentURL);
26  Q_REQUIRED_RESULT QString contentUrl(const QString &contentId) const;
27 
28  static WebEngineEmbedPart *self();
29 
30 private:
31  // Key is Content-Id, value is URL
32  QMap<QString, QString> mEmbeddedPartMap;
33 };
34 }
Q_OBJECTQ_OBJECT
KGuiItem clear()
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Sun Mar 26 2023 04:08:12 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.