Messagelib

simpleobjecttreesource.h
1/*
2 SPDX-FileCopyrightText: 2017 Sandro Kanuß <sknauss@kde.org>
3
4 SPDX-License-Identifier: LGPL-2.0-or-later
5*/
6
7#pragma once
8
9#include "mimetreeparser/objecttreesource.h"
10#include <memory>
11
12namespace MimeTreeParser
13{
14class SimpleObjectTreeSourcePrivate;
15
16/**
17 * A very simple ObjectTreeSource.
18 * mostly used in tests and outside the read redering
19 */
20class MIMETREEPARSER_EXPORT SimpleObjectTreeSource : public Interface::ObjectTreeSource
21{
22public:
23 SimpleObjectTreeSource();
24 ~SimpleObjectTreeSource() override;
25
26 [[nodiscard]] bool autoImportKeys() const override;
27
28 const BodyPartFormatterFactory *bodyPartFormatterFactory() override;
29 [[nodiscard]] bool decryptMessage() const override;
30 void setDecryptMessage(bool decryptMessage);
31
33
34 void setPreferredMode(MimeTreeParser::Util::HtmlMode mode);
35 [[nodiscard]] MimeTreeParser::Util::HtmlMode preferredMode() const override;
36
37 void setOverrideCodecName(const QByteArray &codec);
38 [[nodiscard]] QByteArray overrideCodecName() const override;
39
40private:
41 std::unique_ptr<SimpleObjectTreeSourcePrivate> d;
42};
43}
The place to obtain BodyPartFormatter candidates for a given mime type.
Interface for object tree sources.
MimeTreeParser::Util::HtmlMode preferredMode() const override
Return the mode that is the preferred to display.
QByteArray overrideCodecName() const override
The override codec that should be used for the mail.
bool decryptMessage() const override
Return true if an encrypted mail should be decrypted.
bool autoImportKeys() const override
should keys be imported automatically
void setHtmlMode(MimeTreeParser::Util::HtmlMode mode, const QList< MimeTreeParser::Util::HtmlMode > &availableModes) override
Sets the type of mail that is currently displayed.
HtmlMode
Describes the type of the displayed message.
This file is part of the KDE documentation.
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Jan 24 2025 11:47:40 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.