Messagelib

webengineembedpart.cpp
1 /*
2  SPDX-FileCopyrightText: 2016-2021 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-2021 The KDE developers.
Generated on Mon Dec 6 2021 23:04:59 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.