Messagelib

objecttreeemptysource.h
1/*
2 SPDX-FileCopyrightText: 2009 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.net
3 SPDX-FileCopyrightText: 2009 Andras Mantia <andras@kdab.net>
4
5 SPDX-License-Identifier: GPL-2.0-or-later
6*/
7
8#pragma once
9
10#include "messageviewer_export.h"
11#include <MimeTreeParser/ObjectTreeSource>
12
13class QString;
14namespace MessageViewer
15{
17class CSSHelperBase;
18class HtmlWriter;
19
20/** An ObjectTreeSource that does not work on anything */
21class EmptySourcePrivate;
22/**
23 * @brief The EmptySource class
24 */
25class MESSAGEVIEWER_EXPORT EmptySource : public MimeTreeParser::Interface::ObjectTreeSource
26{
27public:
28 EmptySource();
29 ~EmptySource() override;
30 [[nodiscard]] bool decryptMessage() const override;
32 [[nodiscard]] MimeTreeParser::Util::HtmlMode preferredMode() const override;
33 void setAllowDecryption(bool allowDecryption);
34 QByteArray overrideCodecName() const override;
35 virtual QString createMessageHeader(KMime::Message *message);
36 [[nodiscard]] bool autoImportKeys() const override;
37
38 const MimeTreeParser::BodyPartFormatterFactory *bodyPartFormatterFactory() override;
39 void render(const MimeTreeParser::MessagePartPtr &msgPart, bool showOnlyOneMimePart);
40
41 virtual const AttachmentStrategy *attachmentStrategy() const;
42 virtual HtmlWriter *htmlWriter() const;
43 virtual CSSHelperBase *cssHelper() const;
44 /** Return true if external sources should be loaded in a html mail */
45 virtual bool htmlLoadExternal() const;
46 virtual bool showSignatureDetails() const;
47 virtual bool showEncryptionDetails() const;
48 virtual bool showEmoticons() const;
49 virtual bool showExpandQuotesMark() const;
50 virtual bool isPrinting() const;
51 virtual int levelQuote() const;
52
53private:
54 std::unique_ptr<EmptySourcePrivate> const d;
55};
56}
The AttachmentStrategy class.
The CSSHelperBase class.
MimeTreeParser::Util::HtmlMode preferredMode() const override
Return the mode that is the preferred to display.
bool autoImportKeys() const override
should keys be imported automatically
virtual bool htmlLoadExternal() const
Return true if external sources should be loaded in a html mail.
QByteArray overrideCodecName() const override
The override codec that should be used for the mail.
void setHtmlMode(MimeTreeParser::Util::HtmlMode mode, const QList< MimeTreeParser::Util::HtmlMode > &availableModes) override
Sets the type of mail that is currently displayed.
bool decryptMessage() const override
Return true if an encrypted mail should be decrypted.
An interface for HTML sinks.
Definition htmlwriter.h:29
The place to obtain BodyPartFormatter candidates for a given mime type.
Interface for object tree sources.
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.