Messagelib

bufferedhtmlwriter.cpp
1/*
2 SPDX-FileCopyrightText: 2017 Volker Krause <vkrause@kde.org>
3
4 SPDX-License-Identifier: LGPL-2.0-or-later
5*/
6
7#include "bufferedhtmlwriter.h"
8
9using namespace MessageViewer;
10
11BufferedHtmlWriter::BufferedHtmlWriter()
12 : m_buffer(&m_data)
13{
14}
15
16BufferedHtmlWriter::~BufferedHtmlWriter()
17{
19}
20
26
28{
30 m_buffer.close();
31}
32
34{
36 m_buffer.close();
37 clear();
38}
39
41{
42 return const_cast<QBuffer *>(&m_buffer);
43}
44
45void BufferedHtmlWriter::setExtraHead(const QString &str)
46{
47 Q_UNUSED(str)
48}
49
50void BufferedHtmlWriter::embedPart(const QByteArray &contentId, const QString &url)
51{
52 Q_UNUSED(contentId)
53 Q_UNUSED(url)
54}
55
56void BufferedHtmlWriter::setStyleBody(const QString &styleBody)
57{
58 Q_UNUSED(styleBody)
59}
60
61QByteArray BufferedHtmlWriter::data() const
62{
63 return m_data;
64}
65
66void BufferedHtmlWriter::clear()
67{
68 m_data.clear();
69}
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.
void end() override
Signal the end of stuff to write.
virtual void end()
Signal the end of stuff to write.
virtual void begin()
Signal the begin of stuff to write.
virtual void reset()
Stop all possibly pending processing in order to be able to call begin() again.
virtual void close() override
virtual bool open(OpenMode flags) override
void clear()
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Jun 14 2024 11:49:07 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.