• Skip to content
  • Skip to link menu
KDE 4.3 API Reference
  • KDE API Reference
  • KDE-PIM Libraries
  • Sitemap
  • Contact Us
 

kpimtextedit/richtextbuilders

bbcodebuilder.h

00001 /*
00002     This file is part of KDE.
00003 
00004     Copyright (c) 2008 Stephen Kelly <steveire@gmail.com>
00005 
00006     This library is free software; you can redistribute it and/or modify it
00007     under the terms of the GNU Library General Public License as published by
00008     the Free Software Foundation; either version 2 of the License, or (at your
00009     option) any later version.
00010 
00011     This library is distributed in the hope that it will be useful, but WITHOUT
00012     ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00013     FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Library General Public
00014     License for more details.
00015 
00016     You should have received a copy of the GNU Library General Public License
00017     along with this library; see the file COPYING.LIB.  If not, write to the
00018     Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
00019     02110-1301, USA.
00020 */
00021 
00022 #ifndef BBCODEBUILDER_H
00023 #define BBCODEBUILDER_H
00024 
00025 #include "kabstractmarkupbuilder.h"
00026 #include <kdebug.h>
00027 
00031 class BBCodeBuilder : public KAbstractMarkupBuilder
00032 {
00033 public:
00034 
00038     BBCodeBuilder();
00039 
00040     virtual void beginStrong();
00041     virtual void endStrong();
00042     virtual void beginEmph();
00043     virtual void endEmph();
00044     virtual void beginUnderline();
00045     virtual void endUnderline();
00046     virtual void beginStrikeout();
00047     virtual void endStrikeout();
00048     virtual void beginForeground(const QBrush &brush);
00049     virtual void endForeground();
00050 
00051     // Background colour not supported by BBCode.
00052 
00053     virtual void beginAnchor(const QString &href = QString(), const QString &name = QString());
00054     virtual void endAnchor();
00055 
00056     // Font family not supported by BBCode.
00057 
00063     virtual void beginFontPointSize(int size);
00064     virtual void endFontPointSize();
00065 
00066     virtual void beginParagraph(Qt::Alignment a = Qt::AlignLeft, qreal top = 0.0, qreal bottom = 0.0, qreal left = 0.0, qreal right = 0.0);
00067 
00068     virtual void endParagraph();
00069     virtual void addNewline();
00070 
00071     virtual void insertImage(const QString &src, qreal width, qreal height);
00072 
00073     virtual void beginList(QTextListFormat::Style type);
00074 
00075     virtual void endList();
00076 
00077 
00078     virtual void beginListItem();
00079 
00080     virtual void beginSuperscript();
00081 
00082     virtual void endSuperscript();
00083 
00084     virtual void beginSubscript();
00085 
00086     virtual void endSubscript();
00087 
00088 
00089     virtual void beginTable(qreal, qreal, const QString &);
00090 
00091     virtual void beginTableRow();
00092 
00093 
00094     virtual void appendLiteralText(const QString &text);
00095 
00096     const QString escape(const QString &s);
00097 
00098     virtual QString& getResult();
00099 
00100 private:
00101     QList<QTextListFormat::Style> currentListItemStyles;
00102 
00103     QString m_text;
00104 
00105     Qt::Alignment currentAlignment;
00106 
00107 };
00108 
00109 #endif
00110 

kpimtextedit/richtextbuilders

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

KDE-PIM Libraries

Skip menu "KDE-PIM Libraries"
  • akonadi
  • kabc
  • kblog
  • kcal
  • kholidays
  • kimap
  • kioslave
  •   imap4
  •   mbox
  • kldap
  • kmime
  • kpimidentities
  • kpimtextedit
  •   richtextbuilders
  • kpimutils
  • kresources
  • ktnef
  • kxmlrpcclient
  • mailtransport
  • microblog
  • qgpgme
  • syndication
  •   atom
  •   rdf
  •   rss2
Generated for KDE-PIM Libraries by doxygen 1.6.1
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal