Messagelib

messagepartrendererfactory.h
1/*
2 This file is part of KMail, the KDE mail client.
3 SPDX-FileCopyrightText: 2017 Sandro Knauß <sknauss@kde.org>
4
5 SPDX-License-Identifier: GPL-2.0-or-later
6*/
7
8#pragma once
9
10#include "messageviewer_export.h"
11
12#include <MimeTreeParser/MessagePart>
13
14#include <QList>
15
16#include <memory>
17
18namespace MessageViewer
19{
20class MessagePartRendererBase;
21class MessagePartRendererFactoryPrivate;
22/**
23 * @brief The MessagePartRendererFactory class
24 */
25class MESSAGEVIEWER_EXPORT MessagePartRendererFactory
26{
27public:
30
31 /** Customize where to look for render plugins.
32 * This is the sub directory appended to the Qt plugin search paths.
33 * An empty string disables plugin loading.
34 * This only has any effect before the first call to renderersForPart().
35 */
36 void setPluginPath(const QString &subdir);
37
38 static MessagePartRendererFactory *instance();
39
40 [[nodiscard]] QList<MessagePartRendererBase *> renderersForPart(const QMetaObject *mo, const MimeTreeParser::MessagePart::Ptr &mp) const;
41
42private:
43 Q_DISABLE_COPY(MessagePartRendererFactory)
44 std::unique_ptr<MessagePartRendererFactoryPrivate> d;
45};
46}
The MessagePartRendererFactory class.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:07:25 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.