MessageViewer::HtmlWriter

MessageViewer::HtmlWriter Class Referenceabstract

#include <htmlwriter.h>

Inheritance diagram for MessageViewer::HtmlWriter:

Public Member Functions

virtual void begin ()
 
QByteArray codec () const
 
virtual QIODevicedevice () const =0
 
virtual void embedPart (const QByteArray &contentId, const QString &url)=0
 
virtual void end ()
 
virtual void reset ()
 
void setCodec (const QByteArray &codec)
 
virtual void setExtraHead (const QString &str)=0
 
virtual void setStyleBody (const QString &styleBody)=0
 
QTextStreamstream () const
 
void write (const QString &html)
 

Detailed Description

An interface for HTML sinks.

Author
Marc Mutz [email protected][email protected]kde.[email protected]org

Definition at line 28 of file htmlwriter.h.

Member Function Documentation

void HtmlWriter::begin ( )
virtual

Signal the begin of stuff to write.

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

Reimplemented in MessageViewer::FileHtmlWriter, and MessageViewer::BufferedHtmlWriter.

Definition at line 16 of file htmlwriter.cpp.

virtual QIODevice* MessageViewer::HtmlWriter::device ( ) const
pure virtual

Returns the QIODevice backing this HtmlWriter instance.

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

Implemented in MessageViewer::FileHtmlWriter, and MessageViewer::BufferedHtmlWriter.

virtual void MessageViewer::HtmlWriter::embedPart ( const QByteArray contentId,
const QString url 
)
pure virtual

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

Implemented in MessageViewer::BufferedHtmlWriter, and MessageViewer::FileHtmlWriter.

void HtmlWriter::end ( )
virtual

Signal the end of stuff to write.

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

Reimplemented in MessageViewer::FileHtmlWriter, and MessageViewer::BufferedHtmlWriter.

Definition at line 34 of file htmlwriter.cpp.

void HtmlWriter::reset ( )
virtual

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 in MessageViewer::FileHtmlWriter, and MessageViewer::BufferedHtmlWriter.

Definition at line 43 of file htmlwriter.cpp.

QTextStream * HtmlWriter::stream ( ) const

Returns a QTextStream on device().

Use this for writing QString data, rather than local string concatenations.

Definition at line 51 of file htmlwriter.cpp.

void HtmlWriter::write ( const QString html)

Write out a chunk of text.

No HTML escaping is performed.

Deprecated:
use stream() instead

Definition at line 25 of file htmlwriter.cpp.


The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Sun Nov 29 2020 23:13:25 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.