Grantlee 5.3.0
|
Interface for creating marked-up text output. More...
#include <grantlee/abstractmarkupbuilder.h>
The AbstractMarkupBuilder is used by a MarkupDirector to create marked-up output such as html or markdown.
See PlainTextMarkupBuilder and TextHTMLBuilder for example implementations.
This interface can be extended to handle custom format types in a QTextDocument.
Definition at line 51 of file abstractmarkupbuilder.h.
|
inlinevirtual |
Destructor
Definition at line 55 of file abstractmarkupbuilder.h.
Add a newline to the markup.
Implemented in Grantlee::BBCodeBuilder, Grantlee::MediaWikiMarkupBuilder, Grantlee::PlainTextMarkupBuilder, and Grantlee::TextHTMLBuilder.
|
pure virtual |
Append the plain text text
to the markup
text | The text to append. |
Implemented in Grantlee::BBCodeBuilder, Grantlee::MediaWikiMarkupBuilder, Grantlee::PlainTextMarkupBuilder, and Grantlee::TextHTMLBuilder.
Append the raw text text
to the markup. text
is added unescaped
Implemented in Grantlee::PlainTextMarkupBuilder, and Grantlee::TextHTMLBuilder.
|
pure virtual |
Begin a url anchor element in the markup
href | The href of the anchor. |
name | The name of the anchor. |
Implemented in Grantlee::BBCodeBuilder, Grantlee::MediaWikiMarkupBuilder, Grantlee::PlainTextMarkupBuilder, and Grantlee::TextHTMLBuilder.
Begin a decorarated background element in the markup (A text background color) using brush
Implemented in Grantlee::PlainTextMarkupBuilder, and Grantlee::TextHTMLBuilder.
Begin an emphasised element in the markup
Implemented in Grantlee::BBCodeBuilder, Grantlee::MediaWikiMarkupBuilder, Grantlee::PlainTextMarkupBuilder, and Grantlee::TextHTMLBuilder.
|
pure virtual |
Begin a new font familiy element in the markup
family | The name of the font family to begin. |
Implemented in Grantlee::PlainTextMarkupBuilder, and Grantlee::TextHTMLBuilder.
Begin a new font point size element in the markup
size | The point size to begin. |
Implemented in Grantlee::BBCodeBuilder, Grantlee::PlainTextMarkupBuilder, and Grantlee::TextHTMLBuilder.
Begin a decorarated foreground element in the markup (A text color) using brush
Implemented in Grantlee::BBCodeBuilder, Grantlee::PlainTextMarkupBuilder, and Grantlee::TextHTMLBuilder.
Begin a level level
header
level | An integer between 1 and 6 |
Implemented in Grantlee::MediaWikiMarkupBuilder, Grantlee::PlainTextMarkupBuilder, and Grantlee::TextHTMLBuilder.
|
pure virtual |
Begin a new list element in the markup. A list element contains list items, and may contain other lists.
style | The style of list to create. |
Implemented in Grantlee::PlainTextMarkupBuilder, Grantlee::BBCodeBuilder, Grantlee::MediaWikiMarkupBuilder, and Grantlee::TextHTMLBuilder.
Begin a new list item in the markup
Implemented in Grantlee::BBCodeBuilder, Grantlee::MediaWikiMarkupBuilder, Grantlee::PlainTextMarkupBuilder, and Grantlee::TextHTMLBuilder.
|
pure virtual |
Begin a new paragraph in the markup
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. |
Implemented in Grantlee::BBCodeBuilder, Grantlee::PlainTextMarkupBuilder, and Grantlee::TextHTMLBuilder.
Begin a struck out element in the markup
Implemented in Grantlee::BBCodeBuilder, Grantlee::MediaWikiMarkupBuilder, Grantlee::PlainTextMarkupBuilder, and Grantlee::TextHTMLBuilder.
Begin a bold element in the markup
Implemented in Grantlee::BBCodeBuilder, Grantlee::MediaWikiMarkupBuilder, Grantlee::PlainTextMarkupBuilder, and Grantlee::TextHTMLBuilder.
Begin a subscript element
Implemented in Grantlee::BBCodeBuilder, Grantlee::PlainTextMarkupBuilder, and Grantlee::TextHTMLBuilder.
Begin a superscript element
Implemented in Grantlee::BBCodeBuilder, Grantlee::PlainTextMarkupBuilder, and Grantlee::TextHTMLBuilder.
|
pure virtual |
Begin a table element.
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. |
Implemented in Grantlee::PlainTextMarkupBuilder, Grantlee::TextHTMLBuilder, and Grantlee::BBCodeBuilder.
|
pure virtual |
Begin a new table cell.
width | The width of the cell. |
colSpan | The column span of the cell. |
rowSpan | The row span of the cell. |
Implemented in Grantlee::PlainTextMarkupBuilder, and Grantlee::TextHTMLBuilder.
|
pure virtual |
Begin a new table header cell.
width | The width of the cell. |
colSpan | The column span of the cell. |
rowSpan | The row span of the cell. |
Implemented in Grantlee::PlainTextMarkupBuilder, and Grantlee::TextHTMLBuilder.
Begin a new table row
Implemented in Grantlee::BBCodeBuilder, Grantlee::PlainTextMarkupBuilder, and Grantlee::TextHTMLBuilder.
Begin an underlined element in the markup
Implemented in Grantlee::BBCodeBuilder, Grantlee::MediaWikiMarkupBuilder, Grantlee::PlainTextMarkupBuilder, and Grantlee::TextHTMLBuilder.
Close the anchor element
Implemented in Grantlee::BBCodeBuilder, Grantlee::MediaWikiMarkupBuilder, Grantlee::PlainTextMarkupBuilder, and Grantlee::TextHTMLBuilder.
Close the decorarated background element in the markup
Implemented in Grantlee::PlainTextMarkupBuilder, and Grantlee::TextHTMLBuilder.
Close the emphasised element in the markup
Implemented in Grantlee::BBCodeBuilder, Grantlee::MediaWikiMarkupBuilder, Grantlee::PlainTextMarkupBuilder, and Grantlee::TextHTMLBuilder.
End font family element
Implemented in Grantlee::PlainTextMarkupBuilder, and Grantlee::TextHTMLBuilder.
End font point size element
Implemented in Grantlee::BBCodeBuilder, Grantlee::PlainTextMarkupBuilder, and Grantlee::TextHTMLBuilder.
Close the decorarated foreground element in the markup
Implemented in Grantlee::BBCodeBuilder, Grantlee::PlainTextMarkupBuilder, and Grantlee::TextHTMLBuilder.
End a level level
header
level | An integer between 1 and 6 |
Implemented in Grantlee::MediaWikiMarkupBuilder, Grantlee::PlainTextMarkupBuilder, and Grantlee::TextHTMLBuilder.
Close the list.
Implemented in Grantlee::BBCodeBuilder, Grantlee::MediaWikiMarkupBuilder, Grantlee::PlainTextMarkupBuilder, and Grantlee::TextHTMLBuilder.
End the list item
Implemented in Grantlee::MediaWikiMarkupBuilder, Grantlee::PlainTextMarkupBuilder, and Grantlee::TextHTMLBuilder.
Close the paragraph in the markup.
Implemented in Grantlee::BBCodeBuilder, Grantlee::MediaWikiMarkupBuilder, Grantlee::PlainTextMarkupBuilder, and Grantlee::TextHTMLBuilder.
Close the struck out element in the markup
Implemented in Grantlee::BBCodeBuilder, Grantlee::MediaWikiMarkupBuilder, Grantlee::PlainTextMarkupBuilder, and Grantlee::TextHTMLBuilder.
Close the bold element in the markup
Implemented in Grantlee::BBCodeBuilder, Grantlee::MediaWikiMarkupBuilder, Grantlee::PlainTextMarkupBuilder, and Grantlee::TextHTMLBuilder.
End subscript element
Implemented in Grantlee::BBCodeBuilder, Grantlee::PlainTextMarkupBuilder, and Grantlee::TextHTMLBuilder.
End superscript element
Implemented in Grantlee::BBCodeBuilder, Grantlee::PlainTextMarkupBuilder, and Grantlee::TextHTMLBuilder.
End a table element
Implemented in Grantlee::PlainTextMarkupBuilder, and Grantlee::TextHTMLBuilder.
End a table cell
Implemented in Grantlee::PlainTextMarkupBuilder, and Grantlee::TextHTMLBuilder.
End a table header cell
Implemented in Grantlee::PlainTextMarkupBuilder, and Grantlee::TextHTMLBuilder.
End a table row
Implemented in Grantlee::PlainTextMarkupBuilder, and Grantlee::TextHTMLBuilder.
Close the underlined element in the markup
Implemented in Grantlee::BBCodeBuilder, Grantlee::MediaWikiMarkupBuilder, Grantlee::PlainTextMarkupBuilder, and Grantlee::TextHTMLBuilder.
|
pure virtual |
Return the fully marked up result of the building process.
This may contain metadata etc, such as a head element in html.
Implemented in Grantlee::BBCodeBuilder, Grantlee::MediaWikiMarkupBuilder, Grantlee::PlainTextMarkupBuilder, and Grantlee::TextHTMLBuilder.
Insert a horizontal rule into the markup.
width | The width of the rule. Default is full width. |
Implemented in Grantlee::PlainTextMarkupBuilder, and Grantlee::TextHTMLBuilder.
|
pure virtual |
Insert a new image element into the markup.
url | The url of the image |
width | The width of the image |
height | The height of the image. |
Implemented in Grantlee::BBCodeBuilder, Grantlee::PlainTextMarkupBuilder, and Grantlee::TextHTMLBuilder.