Messagelib

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

KDE's Doxygen guidelines are available online.