File indexing completed on 2025-03-09 04:54:41

0001 /*
0002   SPDX-FileCopyrightText: 2009 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.net
0003   SPDX-FileCopyrightText: 2009 Andras Mantia <andras@kdab.net>
0004 
0005   SPDX-License-Identifier: GPL-2.0-or-later
0006 */
0007 
0008 #pragma once
0009 
0010 #include "objecttreeemptysource.h"
0011 #include <QStringDecoder>
0012 class QString;
0013 
0014 namespace MessageViewer
0015 {
0016 class AttachmentStrategy;
0017 class HtmlWriter;
0018 class ViewerPrivate;
0019 
0020 /** An ObjectTreeParser source working on a MailViewer object */
0021 class MailViewerSource : public MessageViewer::EmptySource
0022 {
0023 public:
0024     explicit MailViewerSource(ViewerPrivate *viewer);
0025     ~MailViewerSource() override;
0026     [[nodiscard]] bool decryptMessage() const override;
0027     [[nodiscard]] bool htmlLoadExternal() const override;
0028     void setHtmlMode(MimeTreeParser::Util::HtmlMode mode, const QList<MimeTreeParser::Util::HtmlMode> &availableModes) override;
0029     [[nodiscard]] MimeTreeParser::Util::HtmlMode preferredMode() const override;
0030     [[nodiscard]] int levelQuote() const override;
0031     QByteArray overrideCodecName() const override;
0032 
0033     [[nodiscard]] QString createMessageHeader(KMime::Message *message) override;
0034     const AttachmentStrategy *attachmentStrategy() const override;
0035     HtmlWriter *htmlWriter() const override;
0036     CSSHelperBase *cssHelper() const override;
0037 
0038     [[nodiscard]] bool autoImportKeys() const override;
0039     [[nodiscard]] bool showSignatureDetails() const override;
0040     [[nodiscard]] bool showEncryptionDetails() const override;
0041     [[nodiscard]] bool showEmoticons() const override;
0042     [[nodiscard]] bool showExpandQuotesMark() const override;
0043     [[nodiscard]] bool isPrinting() const override;
0044 
0045 private:
0046     ViewerPrivate *const mViewer;
0047 };
0048 }