Messagelib

webengineembedpart.cpp
1 /*
2  SPDX-FileCopyrightText: 2016-2023 Laurent Montel <[email protected]>
3 
4  SPDX-License-Identifier: GPL-2.0-or-later
5 */
6 
7 #include "webengineembedpart.h"
8 
9 using namespace MessageViewer;
10 
11 WebEngineEmbedPart::WebEngineEmbedPart(QObject *parent)
12  : QObject(parent)
13 {
14 }
15 
16 WebEngineEmbedPart::~WebEngineEmbedPart() = default;
17 
18 WebEngineEmbedPart *WebEngineEmbedPart::self()
19 {
20  static WebEngineEmbedPart s_self;
21  return &s_self;
22 }
23 
24 QString WebEngineEmbedPart::contentUrl(const QString &contentId) const
25 {
26  return mEmbeddedPartMap.value(contentId);
27 }
28 
29 void WebEngineEmbedPart::addEmbedPart(const QByteArray &contentId, const QString &contentURL)
30 {
31  mEmbeddedPartMap[QLatin1String(contentId)] = contentURL;
32 }
33 
34 void WebEngineEmbedPart::clear()
35 {
36  mEmbeddedPartMap.clear();
37 }
38 
39 bool WebEngineEmbedPart::isEmpty() const
40 {
41  return mEmbeddedPartMap.isEmpty();
42 }
43 
44 QMap<QString, QString> WebEngineEmbedPart::embeddedPartMap() const
45 {
46  return mEmbeddedPartMap;
47 }
void clear()
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Mar 27 2023 04:08:19 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.