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

kpimidentities/richtextbuilders

BBCodeBuilder Class Reference

Creates BBCode from a QTextDocument. More...

#include <bbcodebuilder.h>

Inheritance diagram for BBCodeBuilder:

Inheritance graph
[legend]

List of all members.


Public Member Functions

virtual void addNewline ()
virtual void appendLiteralText (const QString &text)
 BBCodeBuilder ()
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)

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:
The text 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:
href The href of the anchor.
name The 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:
size The 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:
style The 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:
a The alignment of the new paragraph.
top The top margin of the new paragraph.
bottom The bottom margin of the new paragraph.
left The left margin of the new paragraph.
right The 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:
cellpadding The padding attribute for the table.
cellspacing The spacing attribute for the table.
width The 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:
url The url of the image
width The width of the image
height The 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

kpimidentities/richtextbuilders

Skip menu "kpimidentities/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
  • kimap
  • kioslave
  •   imap4
  •   mbox
  • kldap
  • kmime
  • kpimidentities
  •   richtextbuilders
  • kpimutils
  • kresources
  • ktnef
  • kxmlrpcclient
  • mailtransport
  • qgpgme
  • syndication
  •   atom
  •   rdf
  •   rss2
Generated for KDE-PIM Libraries by doxygen 1.5.8
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