• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdepim API Reference
  • KDE Home
  • Contact Us
 

messageviewer

  • sources
  • kde-4.12
  • kdepim
  • messageviewer
  • htmlwriter
teehtmlwriter.cpp
Go to the documentation of this file.
1 /* -*- c++ -*-
2  teehtmlwriter.cpp
3 
4  This file is part of KMail, the KDE mail client.
5  Copyright (c) 2003 Marc Mutz <mutz@kde.org>
6 
7  KMail is free software; you can redistribute it and/or modify it
8  under the terms of the GNU General Public License, version 2, as
9  published by the Free Software Foundation.
10 
11  KMail is distributed in the hope that it will be useful, but
12  WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  General Public License for more details.
15 
16  You should have received a copy of the GNU General Public License
17  along with this program; if not, write to the Free Software
18  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 
20  In addition, as a special exception, the copyright holders give
21  permission to link the code of this program with any edition of
22  the Qt library by Trolltech AS, Norway (or with modified versions
23  of Qt that use the same license as Qt), and distribute linked
24  combinations including the two. You must obey the GNU General
25  Public License in all respects for all of the code used other than
26  Qt. If you modify this file, you may extend this exception to
27  your version of the file, but you are not obligated to do so. If
28  you do not wish to do so, delete this exception statement from
29  your version.
30 */
31 
32 
33 
34 
35 #include "teehtmlwriter.h"
36 
37 #include <kdebug.h>
38 
39 
40 
41 namespace MessageViewer {
42 
43  TeeHtmlWriter::TeeHtmlWriter( HtmlWriter * writer1, HtmlWriter * writer2 )
44  : HtmlWriter()
45  {
46  if ( writer1 )
47  mWriters.append( writer1 );
48  if ( writer2 )
49  mWriters.append( writer2 );
50  }
51 
52  TeeHtmlWriter::~TeeHtmlWriter() {
53  for ( QList<HtmlWriter*>::Iterator it = mWriters.begin(); it != mWriters.end(); ++it )
54  delete (*it);
55  }
56 
57  void TeeHtmlWriter::addHtmlWriter( HtmlWriter * writer ) {
58  if ( writer )
59  mWriters.append( writer );
60  }
61 
62  void TeeHtmlWriter::begin( const QString & css ) {
63  for ( QList<HtmlWriter*>::Iterator it = mWriters.begin(); it != mWriters.end(); ++it )
64  (*it)->begin( css );
65  }
66 
67  void TeeHtmlWriter::end() {
68  for ( QList<HtmlWriter*>::Iterator it = mWriters.begin(); it != mWriters.end(); ++it )
69  (*it)->end();
70  }
71 
72  void TeeHtmlWriter::reset() {
73  for ( QList<HtmlWriter*>::Iterator it = mWriters.begin(); it != mWriters.end(); ++it )
74  (*it)->reset();
75  }
76 
77  void TeeHtmlWriter::write( const QString & str ) {
78  for ( QList<HtmlWriter*>::Iterator it = mWriters.begin(); it != mWriters.end(); ++it )
79  (*it)->write( str );
80  }
81 
82  void TeeHtmlWriter::queue( const QString & str ) {
83  for ( QList<HtmlWriter*>::Iterator it = mWriters.begin(); it != mWriters.end(); ++it )
84  (*it)->queue( str );
85  }
86 
87  void TeeHtmlWriter::flush() {
88  for ( QList<HtmlWriter*>::Iterator it = mWriters.begin(); it != mWriters.end(); ++it )
89  (*it)->flush();
90  }
91 
92  void TeeHtmlWriter::embedPart( const QByteArray & contentId, const QString & url ) {
93  for ( QList<HtmlWriter*>::Iterator it = mWriters.begin(); it != mWriters.end(); ++it )
94  (*it)->embedPart( contentId, url );
95  }
96  void TeeHtmlWriter::extraHead( const QString& ) {}
97 } //
MessageViewer::TeeHtmlWriter::embedPart
void embedPart(const QByteArray &contentId, const QString &url)
Embed a part with Content-ID contentId, using url url.
Definition: teehtmlwriter.cpp:92
MessageViewer::TeeHtmlWriter::TeeHtmlWriter
TeeHtmlWriter(HtmlWriter *writer1=0, HtmlWriter *writer2=0)
Definition: teehtmlwriter.cpp:43
MessageViewer::TeeHtmlWriter::addHtmlWriter
void addHtmlWriter(HtmlWriter *writer)
Definition: teehtmlwriter.cpp:57
MessageViewer::TeeHtmlWriter::queue
void queue(const QString &str)
Definition: teehtmlwriter.cpp:82
MessageViewer::TeeHtmlWriter::reset
void reset()
Stop all possibly pending processing in order to be able to call begin() again.
Definition: teehtmlwriter.cpp:72
MessageViewer::TeeHtmlWriter::begin
void begin(const QString &cssDefs)
Signal the begin of stuff to write, and give the CSS definitions.
Definition: teehtmlwriter.cpp:62
MessageViewer::TeeHtmlWriter::~TeeHtmlWriter
virtual ~TeeHtmlWriter()
Definition: teehtmlwriter.cpp:52
teehtmlwriter.h
MessageViewer::TeeHtmlWriter::flush
void flush()
(Start) flushing internal buffers, if any.
Definition: teehtmlwriter.cpp:87
MessageViewer::TeeHtmlWriter::write
void write(const QString &str)
Write out a chunk of text.
Definition: teehtmlwriter.cpp:77
MessageViewer::TeeHtmlWriter::extraHead
void extraHead(const QString &str)
Definition: teehtmlwriter.cpp:96
MessageViewer::HtmlWriter
An interface to HTML sinks.
Definition: htmlwriter.h:98
MessageViewer::TeeHtmlWriter::end
void end()
Signal the end of stuff to write.
Definition: teehtmlwriter.cpp:67
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:55:57 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

messageviewer

Skip menu "messageviewer"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdepim API Reference

Skip menu "kdepim API Reference"
  • akonadi_next
  • akregator
  • blogilo
  • calendarsupport
  • console
  •   kabcclient
  •   konsolekalendar
  • kaddressbook
  • kalarm
  •   lib
  • kdgantt2
  • kjots
  • kleopatra
  • kmail
  • knode
  • knotes
  • kontact
  • korgac
  • korganizer
  • ktimetracker
  • libkdepim
  • libkleo
  • libkpgp
  • mailcommon
  • messagelist
  • messageviewer

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal