kpimtextedit/richtextbuilders
#include <bbcodebuilder.h>

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) |
![]() | |
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 | |
![]() | |
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
|
virtual |
Add a newline to the markup.
Reimplemented from KAbstractMarkupBuilder.
Definition at line 122 of file bbcodebuilder.cpp.
|
virtual |
Append the plain text text
to the markup.
- Parameters
-
The text to append.
Implements KAbstractMarkupBuilder.
Definition at line 199 of file bbcodebuilder.cpp.
|
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.
|
virtual |
Begin an emphasised element in the markup.
Reimplemented from KAbstractMarkupBuilder.
Definition at line 41 of file bbcodebuilder.cpp.
|
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.
|
virtual |
Begin a decorarated foreground element in the markup (A text color)
Reimplemented from KAbstractMarkupBuilder.
Definition at line 65 of file bbcodebuilder.cpp.
|
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.
|
virtual |
Begin a new list item in the markup.
Reimplemented from KAbstractMarkupBuilder.
Definition at line 162 of file bbcodebuilder.cpp.
|
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.
|
virtual |
Begin a struck out element in the markup.
Reimplemented from KAbstractMarkupBuilder.
Definition at line 57 of file bbcodebuilder.cpp.
|
virtual |
Begin a bold element in the markup.
Reimplemented from KAbstractMarkupBuilder.
Definition at line 33 of file bbcodebuilder.cpp.
|
virtual |
Begin a subscript element.
Reimplemented from KAbstractMarkupBuilder.
Definition at line 177 of file bbcodebuilder.cpp.
|
virtual |
Begin a superscript element.
Reimplemented from KAbstractMarkupBuilder.
Definition at line 167 of file bbcodebuilder.cpp.
|
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.
|
virtual |
Begins a new table row.
Reimplemented from KAbstractMarkupBuilder.
Definition at line 193 of file bbcodebuilder.cpp.
|
virtual |
Begin an underlined element in the markup.
Reimplemented from KAbstractMarkupBuilder.
Definition at line 49 of file bbcodebuilder.cpp.
|
virtual |
Close the anchor element.
Reimplemented from KAbstractMarkupBuilder.
Definition at line 80 of file bbcodebuilder.cpp.
|
virtual |
Close the emphasised element in the markup.
Reimplemented from KAbstractMarkupBuilder.
Definition at line 45 of file bbcodebuilder.cpp.
|
virtual |
End font point size element.
Reimplemented from KAbstractMarkupBuilder.
Definition at line 91 of file bbcodebuilder.cpp.
|
virtual |
Close the decorarated foreground element in the markup.
Reimplemented from KAbstractMarkupBuilder.
Definition at line 69 of file bbcodebuilder.cpp.
|
virtual |
Close the list.
Reimplemented from KAbstractMarkupBuilder.
Definition at line 156 of file bbcodebuilder.cpp.
|
virtual |
Close the paragraph in the markup.
Reimplemented from KAbstractMarkupBuilder.
Definition at line 110 of file bbcodebuilder.cpp.
|
virtual |
Close the struck out element in the markup.
Reimplemented from KAbstractMarkupBuilder.
Definition at line 61 of file bbcodebuilder.cpp.
|
virtual |
Close the bold element in the markup.
Reimplemented from KAbstractMarkupBuilder.
Definition at line 37 of file bbcodebuilder.cpp.
|
virtual |
End subscript element.
Reimplemented from KAbstractMarkupBuilder.
Definition at line 182 of file bbcodebuilder.cpp.
|
virtual |
End superscript element.
Reimplemented from KAbstractMarkupBuilder.
Definition at line 172 of file bbcodebuilder.cpp.
|
virtual |
Close the underlined element in the markup.
Reimplemented from KAbstractMarkupBuilder.
Definition at line 53 of file bbcodebuilder.cpp.
|
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.
|
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:
Documentation copyright © 1996-2012 The KDE developers.
Generated on Wed Nov 28 2012 21:46:17 by doxygen 1.8.1.2 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.