Messagelib

messagepartrendererfactory.h
1 /*
2  This file is part of KMail, the KDE mail client.
3  SPDX-FileCopyrightText: 2017 Sandro KnauƟ <[email protected]>
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 <QVector>
15 
16 #include <memory>
17 
18 namespace MessageViewer
19 {
20 class MessagePartRendererBase;
21 class MessagePartRendererFactoryPrivate;
22 /**
23  * @brief The MessagePartRendererFactory class
24  */
25 class MESSAGEVIEWER_EXPORT MessagePartRendererFactory
26 {
27 public:
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  Q_REQUIRED_RESULT QVector<MessagePartRendererBase *> renderersForPart(const QMetaObject *mo, const MimeTreeParser::MessagePart::Ptr &mp) const;
41 
42 private:
43  Q_DISABLE_COPY(MessagePartRendererFactory)
44  std::unique_ptr<MessagePartRendererFactoryPrivate> d;
45 };
46 }
47 
The MessagePartRendererFactory class.
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Sun Dec 5 2021 23:04:54 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.