Messagelib

filehtmlwriter.h
1/* -*- c++ -*-
2 filehtmlwriter.h
3
4 This file is part of KMail, the KDE mail client.
5 SPDX-FileCopyrightText: 2003 Marc Mutz <mutz@kde.org>
6
7 SPDX-License-Identifier: GPL-2.0-or-later
8*/
9
10#pragma once
11
12#include "messageviewer_export.h"
13#include <MessageViewer/HtmlWriter>
14
15#include <QFile>
16
17namespace MessageViewer
18{
19/**
20 * @brief The FileHtmlWriter class
21 */
22class MESSAGEVIEWER_EXPORT FileHtmlWriter : public HtmlWriter
23{
24public:
25 explicit FileHtmlWriter(const QString &filename);
26 ~FileHtmlWriter() override;
27
28 void begin() override;
29 void end() override;
30 void reset() override;
31 [[nodiscard]] QIODevice *device() const override;
32 void embedPart(const QByteArray &contentId, const QString &url) override;
33 void setExtraHead(const QString &str) override;
34 void setStyleBody(const QString &styleBody) override;
35
36private:
37 QFile mFile;
38};
39} // namespace MessageViewer
void end() override
Signal the end of stuff to write.
void reset() override
Stop all possibly pending processing in order to be able to call begin() again.
void begin() override
Signal the begin of stuff to write.
QIODevice * device() const override
Returns the QIODevice backing this HtmlWriter instance.
void embedPart(const QByteArray &contentId, const QString &url) override
Embed a part with Content-ID contentId, using url url.
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.