KD Reports API Documentation
2.1
|
#include <KDReportsHtmlElement.h>
Public Member Functions | |
HtmlElement (const HtmlElement &other) | |
HtmlElement (const QString &html=QString()) | |
~HtmlElement () override | |
void | build (ReportBuilder &builder) const override |
Element * | clone () const override |
QString | html () const |
QString | id () const |
HtmlElement & | operator<< (const QString &) |
HtmlElement & | operator= (const HtmlElement &other) |
void | setHtml (const QString &html) |
void | setId (const QString &id) |
Public Member Functions inherited from KDReports::Element | |
virtual | ~Element () |
QBrush | background () const |
void | setBackground (const QBrush &brush) |
Additional Inherited Members | |
Protected Member Functions inherited from KDReports::Element | |
Element () | |
Element (const Element &other) | |
Element & | operator= (const Element &other) |
The KDReports::HtmlElement class represents any part of the report that can be expressed in HTML. This is one way to insert rich text into the report (the other way is with TextElement). This can be used to create bullet-point lists and numbered lists.
Definition at line 31 of file KDReportsHtmlElement.h.
Creates an HTML report element.
Definition at line 28 of file KDReportsHtmlElement.cpp.
References html().
|
override |
Destroys this element.
Definition at line 50 of file KDReportsHtmlElement.cpp.
KDReports::HtmlElement::HtmlElement | ( | const HtmlElement & | other | ) |
Copies an HTML element. The HTML and settings are copied over.
Definition at line 35 of file KDReportsHtmlElement.cpp.
|
overridevirtual |
Implements KDReports::Element.
Definition at line 54 of file KDReportsHtmlElement.cpp.
References KDReports::ReportBuilder::currentDocumentData(), KDReports::ReportBuilder::cursor(), QTextCursor::insertHtml(), QTextCursor::position(), and KDReports::TextDocumentData::setTextValueMarker().
|
overridevirtual |
Implements KDReports::Element.
Definition at line 74 of file KDReportsHtmlElement.cpp.
QString KDReports::HtmlElement::html | ( | ) | const |
Definition at line 89 of file KDReportsHtmlElement.cpp.
Referenced by HtmlElement().
QString KDReports::HtmlElement::id | ( | ) | const |
Definition at line 84 of file KDReportsHtmlElement.cpp.
KDReports::HtmlElement & KDReports::HtmlElement::operator<< | ( | const QString & | str | ) |
Adds more text to the HTML in this element.
Definition at line 63 of file KDReportsHtmlElement.cpp.
KDReports::HtmlElement & KDReports::HtmlElement::operator= | ( | const HtmlElement & | other | ) |
Copies the HTML and settings from another HTML element.
Definition at line 41 of file KDReportsHtmlElement.cpp.
References KDReports::Element::operator=().
void KDReports::HtmlElement::setHtml | ( | const QString & | html | ) |
Sets the full HTML text in this element.
Definition at line 69 of file KDReportsHtmlElement.cpp.
void KDReports::HtmlElement::setId | ( | const QString & | id | ) |
Set the ID associated with this text element.
Definition at line 79 of file KDReportsHtmlElement.cpp.