KD Reports API Documentation  2.0
Public Member Functions | List of all members
KDReports::HtmlElement Class Reference

#include <KDReportsHtmlElement.h>

Inheritance diagram for KDReports::HtmlElement:
Inheritance graph
[legend]
Collaboration diagram for KDReports::HtmlElement:
Collaboration graph
[legend]

Public Member Functions

 HtmlElement (const HtmlElement &other)
 
 HtmlElement (const QString &html=QString())
 
 ~HtmlElement () override
 
void build (ReportBuilder &builder) const override
 
Elementclone () const override
 
QString html () const
 
QString id () const
 
HtmlElementoperator<< (const QString &)
 
HtmlElementoperator= (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)
 
Elementoperator= (const Element &other)
 

Detailed Description

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 45 of file KDReportsHtmlElement.h.

Constructor & Destructor Documentation

◆ HtmlElement() [1/2]

KDReports::HtmlElement::HtmlElement ( const QString &  html = QString())
explicit

Creates an HTML report element.

Definition at line 28 of file KDReportsHtmlElement.cpp.

References html().

◆ ~HtmlElement()

KDReports::HtmlElement::~HtmlElement ( )
override

Destroys this element.

Definition at line 50 of file KDReportsHtmlElement.cpp.

◆ HtmlElement() [2/2]

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.

Member Function Documentation

◆ build()

void KDReports::HtmlElement::build ( ReportBuilder builder) const
overridevirtual

◆ clone()

KDReports::Element * KDReports::HtmlElement::clone ( ) const
overridevirtual

Implements KDReports::Element.

Definition at line 75 of file KDReportsHtmlElement.cpp.

◆ html()

QString KDReports::HtmlElement::html ( ) const
Returns
the full HTML text in this element.
Since
1.4

Definition at line 90 of file KDReportsHtmlElement.cpp.

Referenced by HtmlElement().

◆ id()

QString KDReports::HtmlElement::id ( ) const
Returns
the ID associated with this text element.
Since
1.2

Definition at line 85 of file KDReportsHtmlElement.cpp.

◆ operator<<()

KDReports::HtmlElement & KDReports::HtmlElement::operator<< ( const QString &  str)

Adds more text to the HTML in this element.

Definition at line 64 of file KDReportsHtmlElement.cpp.

◆ operator=()

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=().

◆ setHtml()

void KDReports::HtmlElement::setHtml ( const QString &  html)

Sets the full HTML text in this element.

Definition at line 70 of file KDReportsHtmlElement.cpp.

◆ setId()

void KDReports::HtmlElement::setId ( const QString &  id)

Set the ID associated with this text element.

Since
1.2

Definition at line 80 of file KDReportsHtmlElement.cpp.


The documentation for this class was generated from the following files:

© 2007-2021 Klarälvdalens Datakonsult AB (KDAB)
"The Qt, C++ and OpenGL Experts"
https://www.kdab.com/
https://www.kdab.com/development-resources/qt-tools/kd-reports/
Generated on Sat Jan 8 2022 02:38:32 for KD Reports API Documentation by doxygen 1.8.17