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

kpimtextedit/richtextbuilders

  • kpimtextedit
  • richtextbuilders
bbcodebuilder.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 BBCODEBUILDER_H
23 #define BBCODEBUILDER_H
24 
25 #include "kabstractmarkupbuilder.h"
26 #include <kdebug.h>
27 
31 class BBCodeBuilder : public KAbstractMarkupBuilder
32 {
33 public:
34 
38  BBCodeBuilder();
39 
40  virtual void beginStrong();
41  virtual void endStrong();
42  virtual void beginEmph();
43  virtual void endEmph();
44  virtual void beginUnderline();
45  virtual void endUnderline();
46  virtual void beginStrikeout();
47  virtual void endStrikeout();
48  virtual void beginForeground(const QBrush &brush);
49  virtual void endForeground();
50 
51  // Background colour not supported by BBCode.
52 
53  virtual void beginAnchor(const QString &href = QString(), const QString &name = QString());
54  virtual void endAnchor();
55 
56  // Font family not supported by BBCode.
57 
63  virtual void beginFontPointSize(int size);
64  virtual void endFontPointSize();
65 
66  virtual void beginParagraph(Qt::Alignment a = Qt::AlignLeft, qreal top = 0.0, qreal bottom = 0.0, qreal left = 0.0, qreal right = 0.0);
67 
68  virtual void endParagraph();
69  virtual void addNewline();
70 
71  virtual void insertImage(const QString &src, qreal width, qreal height);
72 
73  virtual void beginList(QTextListFormat::Style type);
74 
75  virtual void endList();
76 
77 
78  virtual void beginListItem();
79 
80  virtual void beginSuperscript();
81 
82  virtual void endSuperscript();
83 
84  virtual void beginSubscript();
85 
86  virtual void endSubscript();
87 
88 
89  virtual void beginTable(qreal, qreal, const QString &);
90 
91  virtual void beginTableRow();
92 
93 
94  virtual void appendLiteralText(const QString &text);
95 
96  const QString escape(const QString &s);
97 
98  virtual QString& getResult();
99 
100 private:
101  QList<QTextListFormat::Style> currentListItemStyles;
102 
103  QString m_text;
104 
105  Qt::Alignment currentAlignment;
106 
107 };
108 
109 #endif
110 
This file is part of the KDE documentation.
Documentation copyright © 1996-2012 The KDE developers.
Generated on Mon Nov 26 2012 16:47:22 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.3 API Reference

Skip menu "kdepimlibs-4.9.3 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