KanoopGuiQt 1.3.0
Qt GUI utility library
Loading...
Searching...
No Matches
HtmlUtil Class Reference

Static helpers for generating common HTML tag strings. More...

#include <htmlutil.h>

Static Public Member Functions

static QString startParagraph (const QColor &color=QColor(), const QColor &backgroundColor=QColor())
 Return an opening <p> tag with optional inline color styles.
 
static QString endParagraph ()
 Return a closing </p> tag.
 
static QString startBold ()
 Return an opening <b> tag.
 
static QString endBold ()
 Return a closing </b> tag.
 
static QString startStrong ()
 Return an opening <strong> tag.
 
static QString endStrong ()
 Return a closing </strong> tag.
 

Detailed Description

Static helpers for generating common HTML tag strings.

Each method returns a QString containing the appropriate HTML tag or attribute, ready to be concatenated into an HTML fragment.

Definition at line 14 of file htmlutil.h.

Member Function Documentation

◆ endBold()

static QString HtmlUtil::endBold ( )
static

Return a closing </b> tag.

Returns
"&lt;/b&gt;"

◆ endParagraph()

static QString HtmlUtil::endParagraph ( )
static

Return a closing </p> tag.

Returns
"&lt;/p&gt;"

◆ endStrong()

static QString HtmlUtil::endStrong ( )
static

Return a closing </strong> tag.

Returns
"&lt;/strong&gt;"

◆ startBold()

static QString HtmlUtil::startBold ( )
static

Return an opening <b> tag.

Returns
"&lt;b&gt;"

◆ startParagraph()

static QString HtmlUtil::startParagraph ( const QColor &  color = QColor(),
const QColor &  backgroundColor = QColor() 
)
static

Return an opening <p> tag with optional inline color styles.

Parameters
colorForeground text color (invalid QColor = omitted)
backgroundColorBackground color (invalid QColor = omitted)
Returns
HTML string for the opening paragraph tag

◆ startStrong()

static QString HtmlUtil::startStrong ( )
static

Return an opening <strong> tag.

Returns
"&lt;strong&gt;"

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