4
This file is part of KMail, the KDE mail client.
5
Copyright (c) 2003 Marc Mutz <mutz@kde.org>
6
Copyright (c) 2009 Torgny Nyblom <kde@nyblom.org>
8
KMail is free software; you can redistribute it and/or modify it
9
under the terms of the GNU General Public License, version 2, as
10
published by the Free Software Foundation.
12
KMail is distributed in the hope that it will be useful, but
13
WITHOUT ANY WARRANTY; without even the implied warranty of
14
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15
General Public License for more details.
17
You should have received a copy of the GNU General Public License
18
along with this program; if not, write to the Free Software
19
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21
In addition, as a special exception, the copyright holders give
22
permission to link the code of this program with any edition of
23
the Qt library by Trolltech AS, Norway (or with modified versions
24
of Qt that use the same license as Qt), and distribute linked
25
combinations including the two. You must obey the GNU General
26
Public License in all respects for all of the code used other than
27
Qt. If you modify this file, you may extend this exception to
28
your version of the file, but you are not obligated to do so. If
29
you do not wish to do so, delete this exception statement from
33
#ifndef MESSAGEVIEWER_WEBKITPARTHTMLWRITER_H
34
#define MESSAGEVIEWER_WEBKITPARTHTMLWRITER_H
36
#include "interfaces/htmlwriter.h"
43
namespace MessageViewer {
47
namespace MessageViewer {
49
class WebKitPartHtmlWriter : public QObject, public HtmlWriter {
52
explicit WebKitPartHtmlWriter( MailWebView * view, QObject * parent=0 );
53
~WebKitPartHtmlWriter();
55
void begin( const QString & cssDefs );
58
void write( const QString & str );
59
void queue( const QString & str );
61
void embedPart( const QByteArray & contentId, const QString & url );
67
void resolveCidUrls();
70
MailWebView * mHtmlView;
78
// Key is Content-Id, value is URL
79
typedef QMap<QString, QString> EmbeddedPartMap;
80
EmbeddedPartMap mEmbeddedPartMap;
85
#endif // __MESSAGEVIEWER_WEBKITPARTHTMLWRITER_H__