MessageViewer::HtmlWriter
#include <htmlwriter.h>
Public Member Functions | |
virtual void | begin () |
virtual QIODevice * | device () const =0 |
virtual void | embedPart (const QByteArray &contentId, const QString &url)=0 |
virtual void | end () |
virtual void | reset () |
virtual void | setExtraHead (const QString &str)=0 |
virtual void | setStyleBody (const QString &styleBody)=0 |
QTextStream * | stream () const |
void | write (const QString &html) |
Detailed Description
An interface for HTML sinks.
Definition at line 28 of file htmlwriter.h.
Member Function Documentation
◆ 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.
◆ device()
|
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()
|
pure virtual |
Embed a part with Content-ID contentId
, using url url
.
Implemented in MessageViewer::BufferedHtmlWriter, and MessageViewer::FileHtmlWriter.
◆ 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()
|
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.
◆ 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:
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 16:59:13 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.