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

kpimtextedit/richtextbuilders

Public Member Functions | List of all members
BBCodeBuilder Class Reference

#include <bbcodebuilder.h>

Inheritance diagram for BBCodeBuilder:
Inheritance graph
[legend]

Public Member Functions

 BBCodeBuilder ()
virtual void addNewline ()
virtual void appendLiteralText (const QString &text)
virtual void beginAnchor (const QString &href=QString(), const QString &name=QString())
virtual void beginEmph ()
virtual void beginFontPointSize (int size)
virtual void beginForeground (const QBrush &brush)
virtual void beginList (QTextListFormat::Style type)
virtual void beginListItem ()
virtual void beginParagraph (Qt::Alignment a=Qt::AlignLeft, qreal top=0.0, qreal bottom=0.0, qreal left=0.0, qreal right=0.0)
virtual void beginStrikeout ()
virtual void beginStrong ()
virtual void beginSubscript ()
virtual void beginSuperscript ()
virtual void beginTable (qreal, qreal, const QString &)
virtual void beginTableRow ()
virtual void beginUnderline ()
virtual void endAnchor ()
virtual void endEmph ()
virtual void endFontPointSize ()
virtual void endForeground ()
virtual void endList ()
virtual void endParagraph ()
virtual void endStrikeout ()
virtual void endStrong ()
virtual void endSubscript ()
virtual void endSuperscript ()
virtual void endUnderline ()
const QString escape (const QString &s)
virtual QString & getResult ()
virtual void insertImage (const QString &src, qreal width, qreal height)
- Public Member Functions inherited from KAbstractMarkupBuilder
virtual ~KAbstractMarkupBuilder ()
virtual void beginBackground (const QBrush &brush)
virtual void beginExtraElement (int type, QVariantList args)
virtual void beginFontFamily (const QString &family)
virtual void beginHeader (int level)
virtual void beginTableCell (const QString &width, int colSpan, int rowSpan)
virtual void beginTableHeaderCell (const QString &width, int colSpan, int rowSpan)
virtual void endBackground ()
virtual void endExtraElement (int type)
virtual void endFontFamily ()
virtual void endHeader (int level)
virtual void endListItem ()
virtual void endTable ()
virtual void endTableCell ()
virtual void endTableHeaderCell ()
virtual void endTableRow ()
virtual void insertHorizontalRule (int width=-1)

Additional Inherited Members

- Public Types inherited from KAbstractMarkupBuilder
enum  ExtraElement { UserElement = 100 }

Detailed Description

Creates BBCode from a QTextDocument.

Definition at line 31 of file bbcodebuilder.h.

Constructor & Destructor Documentation

BBCodeBuilder::BBCodeBuilder ( )

Creates a new BBCodeBuilder.

Definition at line 27 of file bbcodebuilder.cpp.

Member Function Documentation

void BBCodeBuilder::addNewline ( )
virtual

Add a newline to the markup.

Reimplemented from KAbstractMarkupBuilder.

Definition at line 122 of file bbcodebuilder.cpp.

void BBCodeBuilder::appendLiteralText ( const QString &  text)
virtual

Append the plain text text to the markup.

Parameters
Thetext to append.

Implements KAbstractMarkupBuilder.

Definition at line 199 of file bbcodebuilder.cpp.

void BBCodeBuilder::beginAnchor ( const QString &  href = QString(),
const QString &  name = QString() 
)
virtual

Begin a url anchor element in the markup.

Parameters
hrefThe href of the anchor.
nameThe name of the anchor.

Reimplemented from KAbstractMarkupBuilder.

Definition at line 76 of file bbcodebuilder.cpp.

void BBCodeBuilder::beginEmph ( )
virtual

Begin an emphasised element in the markup.

Reimplemented from KAbstractMarkupBuilder.

Definition at line 41 of file bbcodebuilder.cpp.

void BBCodeBuilder::beginFontPointSize ( int  size)
virtual

Begin an element of font size size.

Note that this size is in pixels, and must be converted before it is suitable for use in BBCode.

Parameters
sizeThe size of font to begin.

Reimplemented from KAbstractMarkupBuilder.

Definition at line 87 of file bbcodebuilder.cpp.

void BBCodeBuilder::beginForeground ( const QBrush &  brush)
virtual

Begin a decorarated foreground element in the markup (A text color)

Reimplemented from KAbstractMarkupBuilder.

Definition at line 65 of file bbcodebuilder.cpp.

void BBCodeBuilder::beginList ( QTextListFormat::Style  style)
virtual

Begin a new list element in the markup.

A list element contains list items, and may contain other lists.

Parameters
styleThe style of list to create.

Reimplemented from KAbstractMarkupBuilder.

Definition at line 134 of file bbcodebuilder.cpp.

void BBCodeBuilder::beginListItem ( )
virtual

Begin a new list item in the markup.

Reimplemented from KAbstractMarkupBuilder.

Definition at line 162 of file bbcodebuilder.cpp.

void BBCodeBuilder::beginParagraph ( Qt::Alignment  a = Qt::AlignLeft,
qreal  top = 0.0,
qreal  bottom = 0.0,
qreal  left = 0.0,
qreal  right = 0.0 
)
virtual

Begin a new paragraph in the markup.

Parameters
aThe alignment of the new paragraph.
topThe top margin of the new paragraph.
bottomThe bottom margin of the new paragraph.
leftThe left margin of the new paragraph.
rightThe right margin of the new paragraph.

Reimplemented from KAbstractMarkupBuilder.

Definition at line 96 of file bbcodebuilder.cpp.

void BBCodeBuilder::beginStrikeout ( )
virtual

Begin a struck out element in the markup.

Reimplemented from KAbstractMarkupBuilder.

Definition at line 57 of file bbcodebuilder.cpp.

void BBCodeBuilder::beginStrong ( )
virtual

Begin a bold element in the markup.

Reimplemented from KAbstractMarkupBuilder.

Definition at line 33 of file bbcodebuilder.cpp.

void BBCodeBuilder::beginSubscript ( )
virtual

Begin a subscript element.

Reimplemented from KAbstractMarkupBuilder.

Definition at line 177 of file bbcodebuilder.cpp.

void BBCodeBuilder::beginSuperscript ( )
virtual

Begin a superscript element.

Reimplemented from KAbstractMarkupBuilder.

Definition at line 167 of file bbcodebuilder.cpp.

void BBCodeBuilder::beginTable ( qreal  cellpadding,
qreal  cellspacing,
const QString &  width 
)
virtual

Begin a table element.

Parameters
cellpaddingThe padding attribute for the table.
cellspacingThe spacing attribute for the table.
widthThe width of the table. May be either an integer, or a percentage value.

Reimplemented from KAbstractMarkupBuilder.

Definition at line 188 of file bbcodebuilder.cpp.

void BBCodeBuilder::beginTableRow ( )
virtual

Begins a new table row.

Reimplemented from KAbstractMarkupBuilder.

Definition at line 193 of file bbcodebuilder.cpp.

void BBCodeBuilder::beginUnderline ( )
virtual

Begin an underlined element in the markup.

Reimplemented from KAbstractMarkupBuilder.

Definition at line 49 of file bbcodebuilder.cpp.

void BBCodeBuilder::endAnchor ( )
virtual

Close the anchor element.

Reimplemented from KAbstractMarkupBuilder.

Definition at line 80 of file bbcodebuilder.cpp.

void BBCodeBuilder::endEmph ( )
virtual

Close the emphasised element in the markup.

Reimplemented from KAbstractMarkupBuilder.

Definition at line 45 of file bbcodebuilder.cpp.

void BBCodeBuilder::endFontPointSize ( )
virtual

End font point size element.

Reimplemented from KAbstractMarkupBuilder.

Definition at line 91 of file bbcodebuilder.cpp.

void BBCodeBuilder::endForeground ( )
virtual

Close the decorarated foreground element in the markup.

Reimplemented from KAbstractMarkupBuilder.

Definition at line 69 of file bbcodebuilder.cpp.

void BBCodeBuilder::endList ( )
virtual

Close the list.

Reimplemented from KAbstractMarkupBuilder.

Definition at line 156 of file bbcodebuilder.cpp.

void BBCodeBuilder::endParagraph ( )
virtual

Close the paragraph in the markup.

Reimplemented from KAbstractMarkupBuilder.

Definition at line 110 of file bbcodebuilder.cpp.

void BBCodeBuilder::endStrikeout ( )
virtual

Close the struck out element in the markup.

Reimplemented from KAbstractMarkupBuilder.

Definition at line 61 of file bbcodebuilder.cpp.

void BBCodeBuilder::endStrong ( )
virtual

Close the bold element in the markup.

Reimplemented from KAbstractMarkupBuilder.

Definition at line 37 of file bbcodebuilder.cpp.

void BBCodeBuilder::endSubscript ( )
virtual

End subscript element.

Reimplemented from KAbstractMarkupBuilder.

Definition at line 182 of file bbcodebuilder.cpp.

void BBCodeBuilder::endSuperscript ( )
virtual

End superscript element.

Reimplemented from KAbstractMarkupBuilder.

Definition at line 172 of file bbcodebuilder.cpp.

void BBCodeBuilder::endUnderline ( )
virtual

Close the underlined element in the markup.

Reimplemented from KAbstractMarkupBuilder.

Definition at line 53 of file bbcodebuilder.cpp.

QString & BBCodeBuilder::getResult ( )
virtual

Return the fully marked up result of the building process.

This may contain metadata etc, such as a head element in html.

Returns
The fully marked up text.

Implements KAbstractMarkupBuilder.

Definition at line 212 of file bbcodebuilder.cpp.

void BBCodeBuilder::insertImage ( const QString &  url,
qreal  width,
qreal  height 
)
virtual

Insert a new image element into the markup.

Parameters
urlThe url of the image
widthThe width of the image
heightThe height of the image.

Reimplemented from KAbstractMarkupBuilder.

Definition at line 127 of file bbcodebuilder.cpp.


The documentation for this class was generated from the following files:
  • bbcodebuilder.h
  • bbcodebuilder.cpp
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