MessageViewer::BufferedHtmlWriter

Search for usage in LXR

MessageViewer::BufferedHtmlWriter Class Reference

#include <bufferedhtmlwriter.h>

Inheritance diagram for MessageViewer::BufferedHtmlWriter:

Public Member Functions

void begin () override
 
void clear ()
 
QByteArray data () const
 
QIODevicedevice () const override
 
void embedPart (const QByteArray &contentId, const QString &url) override
 
void end () override
 
void reset () override
 
void setExtraHead (const QString &str) override
 
void setStyleBody (const QString &styleBody) override
 
- Public Member Functions inherited from MessageViewer::HtmlWriter
QTextStreamstream () const
 
void write (const QString &html)
 

Protected Attributes

QByteArray m_data
 

Detailed Description

QBuffer-backed HtmlWriter.

Definition at line 20 of file bufferedhtmlwriter.h.

Constructor & Destructor Documentation

◆ BufferedHtmlWriter()

BufferedHtmlWriter::BufferedHtmlWriter ( )

Definition at line 11 of file bufferedhtmlwriter.cpp.

◆ ~BufferedHtmlWriter()

BufferedHtmlWriter::~BufferedHtmlWriter ( )
override

Definition at line 16 of file bufferedhtmlwriter.cpp.

Member Function Documentation

◆ begin()

void BufferedHtmlWriter::begin ( )
overridevirtual

Signal the begin of stuff to write.

Sub-classes should open device() in a writable mode here and then call the base class.

Reimplemented from MessageViewer::HtmlWriter.

Definition at line 21 of file bufferedhtmlwriter.cpp.

◆ clear()

void BufferedHtmlWriter::clear ( )

Definition at line 66 of file bufferedhtmlwriter.cpp.

◆ data()

QByteArray BufferedHtmlWriter::data ( ) const
nodiscard

Definition at line 61 of file bufferedhtmlwriter.cpp.

◆ device()

QIODevice * BufferedHtmlWriter::device ( ) const
nodiscardoverridevirtual

Returns the QIODevice backing this HtmlWriter instance.

Before writing to this directly, make sure to flush stream().

Implements MessageViewer::HtmlWriter.

Definition at line 40 of file bufferedhtmlwriter.cpp.

◆ embedPart()

void BufferedHtmlWriter::embedPart ( const QByteArray & contentId,
const QString & url )
overridevirtual

Embed a part with Content-ID contentId, using url url.

Implements MessageViewer::HtmlWriter.

Definition at line 50 of file bufferedhtmlwriter.cpp.

◆ end()

void BufferedHtmlWriter::end ( )
overridevirtual

Signal the end of stuff to write.

Sub-classes should call the base class and then close device() here.

Reimplemented from MessageViewer::HtmlWriter.

Definition at line 27 of file bufferedhtmlwriter.cpp.

◆ reset()

void BufferedHtmlWriter::reset ( )
overridevirtual

Stop all possibly pending processing in order to be able to call begin() again.

Sub-classes should call the base class and then reset device() here.

Reimplemented from MessageViewer::HtmlWriter.

Definition at line 33 of file bufferedhtmlwriter.cpp.

◆ setExtraHead()

void BufferedHtmlWriter::setExtraHead ( const QString & str)
overridevirtual

Implements MessageViewer::HtmlWriter.

Definition at line 45 of file bufferedhtmlwriter.cpp.

◆ setStyleBody()

void BufferedHtmlWriter::setStyleBody ( const QString & styleBody)
overridevirtual

Implements MessageViewer::HtmlWriter.

Definition at line 56 of file bufferedhtmlwriter.cpp.

Member Data Documentation

◆ m_data

QByteArray MessageViewer::BufferedHtmlWriter::m_data
protected

Definition at line 39 of file bufferedhtmlwriter.h.


The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Jul 12 2024 11:49:56 by doxygen 1.11.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.