• 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
webkitparthtmlwriter.h
Go to the documentation of this file.
1 /* -*- c++ -*-
2  webkitparthtmlwriter.h
3 
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 <nyblom@kde.org>
7 
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.
11 
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.
16 
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
20 
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
30  your version.
31 */
32 
33 #ifndef MESSAGEVIEWER_WEBKITPARTHTMLWRITER_H
34 #define MESSAGEVIEWER_WEBKITPARTHTMLWRITER_H
35 
36 #include "interfaces/htmlwriter.h"
37 #include <QObject>
38 
39 #include <QString>
40 #include <QByteArray>
41 #include <QMap>
42 
43 namespace MessageViewer {
44  class MailWebView;
45 }
46 
47 namespace MessageViewer {
48 
49 class WebKitPartHtmlWriter : public QObject, public HtmlWriter {
50  Q_OBJECT
51 public:
52  explicit WebKitPartHtmlWriter( MailWebView * view, QObject * parent=0 );
53  ~WebKitPartHtmlWriter();
54 
55  void begin( const QString & cssDefs );
56  void end();
57  void reset();
58  void write( const QString & str );
59  void queue( const QString & str );
60  void flush();
61  void embedPart( const QByteArray & contentId, const QString & url );
62  void extraHead( const QString& str );
63 signals:
64  void finished();
65 
66 private:
67  void resolveCidUrls();
68  void insertExtraHead();
69 
70 private:
71  MailWebView * mHtmlView;
72  QString mHtml;
73  QString mExtraHead;
74  enum State {
75  Begun,
76  Queued,
77  Ended
78  } mState;
79  // Key is Content-Id, value is URL
80  typedef QMap<QString, QString> EmbeddedPartMap;
81  EmbeddedPartMap mEmbeddedPartMap;
82 };
83 
84 }
85 
86 #endif // __MESSAGEVIEWER_WEBKITPARTHTMLWRITER_H__
MessageViewer::WebKitPartHtmlWriter::WebKitPartHtmlWriter
WebKitPartHtmlWriter(MailWebView *view, QObject *parent=0)
Definition: webkitparthtmlwriter.cpp:52
MessageViewer::WebKitPartHtmlWriter::reset
void reset()
Stop all possibly pending processing in order to be able to call begin() again.
Definition: webkitparthtmlwriter.cpp:104
MessageViewer::WebKitPartHtmlWriter::end
void end()
Signal the end of stuff to write.
Definition: webkitparthtmlwriter.cpp:82
QObject
MessageViewer::WebKitPartHtmlWriter::queue
void queue(const QString &str)
Definition: webkitparthtmlwriter.cpp:120
MessageViewer::WebKitPartHtmlWriter::finished
void finished()
htmlwriter.h
MessageViewer::WebKitPartHtmlWriter
Definition: webkitparthtmlwriter.h:49
MessageViewer::MailWebView
MailWebView extends KWebView so that it can emit the popupMenu() signal.
Definition: mailwebview.h:53
MessageViewer::WebKitPartHtmlWriter::flush
void flush()
(Start) flushing internal buffers, if any.
Definition: webkitparthtmlwriter.cpp:124
MessageViewer::WebKitPartHtmlWriter::~WebKitPartHtmlWriter
~WebKitPartHtmlWriter()
Definition: webkitparthtmlwriter.cpp:59
MessageViewer::WebKitPartHtmlWriter::embedPart
void embedPart(const QByteArray &contentId, const QString &url)
Embed a part with Content-ID contentId, using url url.
Definition: webkitparthtmlwriter.cpp:129
MessageViewer::WebKitPartHtmlWriter::extraHead
void extraHead(const QString &str)
Definition: webkitparthtmlwriter.cpp:165
MessageViewer::HtmlWriter
An interface to HTML sinks.
Definition: htmlwriter.h:98
MessageViewer::WebKitPartHtmlWriter::begin
void begin(const QString &cssDefs)
Signal the begin of stuff to write, and give the CSS definitions.
Definition: webkitparthtmlwriter.cpp:62
MessageViewer::WebKitPartHtmlWriter::write
void write(const QString &str)
Write out a chunk of text.
Definition: webkitparthtmlwriter.cpp:113
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