• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdepimlibs-4.9.4 API Reference
  • KDE Home
  • Contact Us
 

kpimtextedit/richtextbuilders

  • kpimtextedit
  • richtextbuilders
ktexthtmlbuilder.h
1 /*
2  This file is part of KDE.
3 
4  Copyright (c) 2008 Stephen Kelly <steveire@gmail.com>
5 
6  This library is free software; you can redistribute it and/or modify it
7  under the terms of the GNU Library General Public License as published by
8  the Free Software Foundation; either version 2 of the License, or (at your
9  option) any later version.
10 
11  This library is distributed in the hope that it will be useful, but WITHOUT
12  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
14  License for more details.
15 
16  You should have received a copy of the GNU Library General Public License
17  along with this library; see the file COPYING.LIB. If not, write to the
18  Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
19  02110-1301, USA.
20 */
21 
22 #ifndef KTEXTHTMLBUILDER_H
23 #define KTEXTHTMLBUILDER_H
24 
25 #include "kabstractmarkupbuilder.h"
26 
27 class KTextHTMLBuilderPrivate;
28 
83 class KTextHTMLBuilder : public KAbstractMarkupBuilder
84 {
85 public:
86 
90  KTextHTMLBuilder();
91  virtual ~KTextHTMLBuilder();
92 
93  virtual void beginStrong();
94  virtual void endStrong();
95  virtual void beginEmph();
96  virtual void endEmph();
97  virtual void beginUnderline();
98  virtual void endUnderline();
99  virtual void beginStrikeout();
100  virtual void endStrikeout();
101  virtual void beginForeground(const QBrush &brush);
102  virtual void endForeground();
103  virtual void beginBackground(const QBrush &brush);
104  virtual void endBackground();
105  virtual void beginAnchor(const QString &href = QString(), const QString &name = QString());
106  virtual void endAnchor();
107 
108  // Maybe this stuff should just be added to a list, and then when I add literal text,
109  // add some kind of style attribute in one span instead of many.
110  virtual void beginFontFamily(const QString &family);
111  virtual void endFontFamily();
112 
117  virtual void beginFontPointSize(int size);
118  virtual void endFontPointSize();
119 
128  virtual void beginParagraph(Qt::Alignment al = Qt::AlignLeft, qreal topMargin = 0.0, qreal bottomMargin = 0.0, qreal leftMargin = 0.0, qreal rightMargin = 0.0);
129 
134  virtual void beginHeader(int level);
135 
140  virtual void endHeader(int level);
141 
142  virtual void endParagraph();
143  virtual void addNewline();
144 
145  virtual void insertHorizontalRule(int width = -1);
146 
147  virtual void insertImage(const QString &src, qreal width, qreal height);
148 
149  virtual void beginList(QTextListFormat::Style type);
150 
151  virtual void endList();
152 
153  virtual void beginListItem();
154  virtual void endListItem();
155 
156  virtual void beginSuperscript();
157 
158  virtual void endSuperscript();
159 
160  virtual void beginSubscript();
161 
162  virtual void endSubscript();
163 
164 
165  virtual void beginTable(qreal cellpadding, qreal cellspacing, const QString &width);
166 
167  virtual void beginTableRow();
168  virtual void beginTableHeaderCell(const QString &width, int colspan, int rowspan);
169 
170  virtual void beginTableCell(const QString &width, int colspan, int rowspan);
171 
172  virtual void endTable();
173  virtual void endTableRow();
174  virtual void endTableHeaderCell();
175  virtual void endTableCell();
176 
193  virtual void appendLiteralText(const QString &text);
194 
195 
196  virtual QString& getResult();
197 
198 private:
199  KTextHTMLBuilderPrivate *d_ptr;
200  Q_DECLARE_PRIVATE(KTextHTMLBuilder)
201 
202 };
203 
204 #endif
This file is part of the KDE documentation.
Documentation copyright © 1996-2012 The KDE developers.
Generated on Tue Dec 4 2012 14:35:27 by doxygen 1.8.1.2 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kpimtextedit/richtextbuilders

Skip menu "kpimtextedit/richtextbuilders"
  • Main Page
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • Related Pages

kdepimlibs-4.9.4 API Reference

Skip menu "kdepimlibs-4.9.4 API Reference"
  • akonadi
  •   contact
  •   kmime
  • kabc
  • kalarmcal
  • kblog
  • kcal
  • kcalcore
  • kcalutils
  • kholidays
  • kimap
  • kioslave
  •   imap4
  •   mbox
  •   nntp
  • kldap
  • kmbox
  • kmime
  • kontactinterface
  • kpimidentities
  • kpimtextedit
  •   richtextbuilders
  • kpimutils
  • kresources
  • ktnef
  • kxmlrpcclient
  • mailtransport
  • microblog
  • qgpgme
  • syndication
  •   atom
  •   rdf
  •   rss2
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