1 /*
2  SPDX-FileCopyrightText: 2009 Klarälvdalens Datakonsult AB, a KDAB Group company,
3  SPDX-FileCopyrightText: 2009 Andras Mantia <>
5  SPDX-License-Identifier: GPL-2.0-or-later
6 */
8 #pragma once
10 #include "objecttreeemptysource.h"
11 #include <QStringDecoder>
12 class QString;
14 namespace MessageViewer
15 {
16 class AttachmentStrategy;
17 class HtmlWriter;
18 class ViewerPrivate;
20 /** An ObjectTreeParser source working on a MailViewer object */
22 {
23 public:
24  explicit MailViewerSource(ViewerPrivate *viewer);
25  ~MailViewerSource() override;
26  [[nodiscard]] bool decryptMessage() const override;
27  [[nodiscard]] bool htmlLoadExternal() const override;
28  void setHtmlMode(MimeTreeParser::Util::HtmlMode mode, const QList<MimeTreeParser::Util::HtmlMode> &availableModes) override;
29  [[nodiscard]] MimeTreeParser::Util::HtmlMode preferredMode() const override;
30  [[nodiscard]] int levelQuote() const override;
31  QByteArray overrideCodecName() const override;
33  [[nodiscard]] QString createMessageHeader(KMime::Message *message) override;
34  const AttachmentStrategy *attachmentStrategy() const override;
35  HtmlWriter *htmlWriter() const override;
36  CSSHelperBase *cssHelper() const override;
38  [[nodiscard]] bool autoImportKeys() const override;
39  [[nodiscard]] bool showSignatureDetails() const override;
40  [[nodiscard]] bool showEncryptionDetails() const override;
41  [[nodiscard]] bool showEmoticons() const override;
42  [[nodiscard]] bool showExpandQuotesMark() const override;
43  [[nodiscard]] bool isPrinting() const override;
45 private:
46  ViewerPrivate *const mViewer;
47 };
48 }
bool decryptMessage() const override
Return true if an encrypted mail should be decrypted.
bool htmlLoadExternal() const override
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.
MimeTreeParser::Util::HtmlMode preferredMode() const override
Return the mode that is the preferred to display.
The CSSHelperBase class.
Definition: csshelperbase.h:26
Describes the type of the displayed message.
An interface for HTML sinks.
Definition: htmlwriter.h:28
The AttachmentStrategy class.
An ObjectTreeParser source working on a MailViewer object.
void setHtmlMode(MimeTreeParser::Util::HtmlMode mode, const QList< MimeTreeParser::Util::HtmlMode > &availableModes) override
Sets the type of mail that is currently displayed.
bool autoImportKeys() const override
should keys be imported automatically
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Thu Feb 15 2024 03:55:21 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.