Messagelib

bodypartformatterfactory.h
1 /*
2  bodypartformatterfactory.h
3 
4  This file is part of KMail, the KDE mail client.
5  SPDX-FileCopyrightText: 2004 Marc Mutz <[email protected]>
6  SPDX-FileCopyrightText: 2004 Ingo Kloecker <[email protected]>
7 
8  SPDX-License-Identifier: GPL-2.0-or-later
9 */
10 
11 #pragma once
12 
13 #include "mimetreeparser_export.h"
14 
15 #include <QVector>
16 #include <memory>
17 namespace MimeTreeParser
18 {
19 namespace Interface
20 {
21 class BodyPartFormatter;
22 }
23 
24 class BodyPartFormatterFactoryPrivate;
25 
26 /** The place to obtain BodyPartFormatter candidates for a given mime type. */
27 class MIMETREEPARSER_EXPORT BodyPartFormatterFactory
28 {
29 public:
31  virtual ~BodyPartFormatterFactory();
32 
33  static BodyPartFormatterFactory *instance();
34 
35  /**
36  * Returns all suitable formatters for the given mimetype.
37  * The candidates are ordered by priority, with the catch-call
38  * formatter coming last.
39  */
40  Q_REQUIRED_RESULT QVector<const Interface::BodyPartFormatter *> formattersForType(const QString &mimeType) const;
41 
42 protected:
43  void insert(const QString &mimeType, const Interface::BodyPartFormatter *formatter, int priority);
44  virtual void loadPlugins();
45 
46 private:
47  Q_DISABLE_COPY(BodyPartFormatterFactory)
48  std::unique_ptr<BodyPartFormatterFactoryPrivate> const d;
49  friend class BodyPartFormatterFactoryPrivate;
50 };
51 }
52 
The place to obtain BodyPartFormatter candidates for a given mime type.
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Thu Dec 2 2021 23:06:07 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.