KD Reports API Documentation
2.2
|
#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 25 of file KDReportsHtmlElement.h.
|
explicit |
Creates an HTML report element.
Definition at line 22 of file KDReportsHtmlElement.cpp.
References html().
|
override |
Destroys this element.
Definition at line 44 of file KDReportsHtmlElement.cpp.
KDReports::HtmlElement::HtmlElement | ( | const HtmlElement & | other | ) |
Copies an HTML element. The HTML and settings are copied over.
Definition at line 29 of file KDReportsHtmlElement.cpp.
|
overridevirtual |
Implements KDReports::Element.
Definition at line 48 of file KDReportsHtmlElement.cpp.
References KDReports::ReportBuilder::currentDocumentData(), KDReports::ReportBuilder::cursor(), and KDReports::TextDocumentData::setTextValueMarker().
|
overridevirtual |
Implements KDReports::Element.
Definition at line 68 of file KDReportsHtmlElement.cpp.
QString KDReports::HtmlElement::html | ( | ) | const |
Definition at line 83 of file KDReportsHtmlElement.cpp.
Referenced by HtmlElement().
QString KDReports::HtmlElement::id | ( | ) | const |
Definition at line 78 of file KDReportsHtmlElement.cpp.
KDReports::HtmlElement & KDReports::HtmlElement::operator<< | ( | const QString & | str | ) |
Adds more text to the HTML in this element.
Definition at line 57 of file KDReportsHtmlElement.cpp.
KDReports::HtmlElement & KDReports::HtmlElement::operator= | ( | const HtmlElement & | other | ) |
Copies the HTML and settings from another HTML element.
Definition at line 35 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 63 of file KDReportsHtmlElement.cpp.
void KDReports::HtmlElement::setId | ( | const QString & | id | ) |
Set the ID associated with this text element.
Definition at line 73 of file KDReportsHtmlElement.cpp.