MessageViewer::HtmlWriter

Search for usage in LXR

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 mutz@.nosp@m.kde..nosp@m.org

Definition at line 28 of file htmlwriter.h.

Member Function Documentation

◆ begin()

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

Definition at line 16 of file htmlwriter.cpp.

◆ codec()

QByteArray HtmlWriter::codec ( ) const

Definition at line 60 of file htmlwriter.cpp.

◆ device()

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

◆ embedPart()

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.

◆ end()

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

Definition at line 33 of file htmlwriter.cpp.

◆ reset()

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

Definition at line 42 of file htmlwriter.cpp.

◆ setCodec()

void HtmlWriter::setCodec ( const QByteArray & codec)

Definition at line 55 of file htmlwriter.cpp.

◆ stream()

QTextStream * HtmlWriter::stream ( ) const

Returns a QTextStream on device().

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

Definition at line 50 of file htmlwriter.cpp.

◆ write()

void HtmlWriter::write ( const QString & html)

Write out a chunk of text.

No HTML escaping is performed.

Deprecated
use stream() instead

Definition at line 24 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-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:12:44 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.