Messagelib

simpleobjecttreesource.cpp
1 /*
2  SPDX-FileCopyrightText: 2017 Sandro Kanuß <[email protected]>
3 
4  SPDX-License-Identifier: GPL-2.0-or-later
5 */
6 
7 #include "simpleobjecttreesource.h"
8 
9 #include <MimeTreeParser/BodyPartFormatterFactory>
10 #include <MimeTreeParser/MessagePart>
11 #include <MimeTreeParser/ObjectTreeSource>
12 
13 using namespace MimeTreeParser;
14 
15 namespace MimeTreeParser
16 {
17 class SimpleObjectTreeSourcePrivate
18 {
19 public:
20  bool mDecryptMessage = false;
21  Util::HtmlMode mPreferredMode = Util::Html;
22 };
23 }
24 
25 SimpleObjectTreeSource::SimpleObjectTreeSource()
26  : d(new SimpleObjectTreeSourcePrivate)
27 {
28 }
29 
30 SimpleObjectTreeSource::~SimpleObjectTreeSource() = default;
31 
32 bool SimpleObjectTreeSource::autoImportKeys() const
33 {
34  return true;
35 }
36 
37 const BodyPartFormatterFactory *SimpleObjectTreeSource::bodyPartFormatterFactory()
38 {
39  return BodyPartFormatterFactory::instance();
40 }
41 
42 bool SimpleObjectTreeSource::decryptMessage() const
43 {
44  return d->mDecryptMessage;
45 }
46 
47 void SimpleObjectTreeSource::setDecryptMessage(bool decryptMessage)
48 {
49  d->mDecryptMessage = decryptMessage;
50 }
51 
52 void SimpleObjectTreeSource::setPreferredMode(MimeTreeParser::Util::HtmlMode mode)
53 {
54  d->mPreferredMode = mode;
55 }
56 
57 MimeTreeParser::Util::HtmlMode SimpleObjectTreeSource::preferredMode() const
58 {
59  return d->mPreferredMode;
60 }
61 
62 const QTextCodec *SimpleObjectTreeSource::overrideCodec()
63 {
64  return nullptr;
65 }
66 
67 void SimpleObjectTreeSource::setHtmlMode(MimeTreeParser::Util::HtmlMode mode, const QList<MimeTreeParser::Util::HtmlMode> &availableModes)
68 {
69  Q_UNUSED(mode)
70  Q_UNUSED(availableModes)
71 }
HtmlMode
Describes the type of the displayed message.
The place to obtain BodyPartFormatter candidates for a given mime type.
A HTML message, non-multipart.
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Sat Dec 4 2021 23:12:54 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.