QGIS API Documentation 4.3.0-Master (0cef2469b72)
Loading...
Searching...
No Matches
QgsHtmlRenderSettings Class Reference

Encapsulates settings for rendering HTML content. More...

#include <qgshtmlrendersettings.h>

Public Member Functions

QVariantMap asMap () const
 Returns the settings encapsulated in a variantmap, for passing to the qgis_html_to_pdf utility.
QUrl baseUrl () const
 Returns the base URL used when resolving relative links.
QVariantMap featureJson () const
 Returns the feature json (as a variant map).
bool isEmpty () const
 Returns true no settings are set.
void setBaseUrl (const QUrl &url)
 Sets the base url to use when resolving relative links.
void setFeatureJson (const QVariantMap &json)
 Sets the feature json (as a variant map).
void setUserStylesheet (const QString &stylesheet)
 Sets the user stylesheet CSS rules to use while rendering the HTML content.
QString userStylesheet () const
 Returns the user stylesheet CSS rules used while rendering the HTML content.

Detailed Description

Encapsulates settings for rendering HTML content.

Since
QGIS 4.4

Definition at line 33 of file qgshtmlrendersettings.h.

Member Function Documentation

◆ asMap()

QVariantMap QgsHtmlRenderSettings::asMap ( ) const

Returns the settings encapsulated in a variantmap, for passing to the qgis_html_to_pdf utility.

Definition at line 30 of file qgshtmlrendersettings.cpp.

◆ baseUrl()

QUrl QgsHtmlRenderSettings::baseUrl ( ) const
inline

Returns the base URL used when resolving relative links.

See also
setBaseUrl()

Definition at line 46 of file qgshtmlrendersettings.h.

◆ featureJson()

QVariantMap QgsHtmlRenderSettings::featureJson ( ) const
inline

Returns the feature json (as a variant map).

When the HTML has been loaded, an attempt will be made to call a "setFeature" function, passing this custom json object.

See also
setFeatureJson()

Definition at line 91 of file qgshtmlrendersettings.h.

◆ isEmpty()

bool QgsHtmlRenderSettings::isEmpty ( ) const

Returns true no settings are set.

Definition at line 25 of file qgshtmlrendersettings.cpp.

◆ setBaseUrl()

void QgsHtmlRenderSettings::setBaseUrl ( const QUrl & url)
inline

Sets the base url to use when resolving relative links.

See also
baseUrl()

Definition at line 53 of file qgshtmlrendersettings.h.

◆ setFeatureJson()

void QgsHtmlRenderSettings::setFeatureJson ( const QVariantMap & json)
inline

Sets the feature json (as a variant map).

When the HTML has been loaded, an attempt will be made to call a "setFeature" function, passing this custom json object.

See also
featureJson()

Definition at line 81 of file qgshtmlrendersettings.h.

◆ setUserStylesheet()

void QgsHtmlRenderSettings::setUserStylesheet ( const QString & stylesheet)
inline

Sets the user stylesheet CSS rules to use while rendering the HTML content.

These allow for overriding the styles specified within the HTML source.

See also
userStylesheet()

Definition at line 62 of file qgshtmlrendersettings.h.

◆ userStylesheet()

QString QgsHtmlRenderSettings::userStylesheet ( ) const
inline

Returns the user stylesheet CSS rules used while rendering the HTML content.

These overriding the styles specified within the HTML source.

See also
setUserStylesheet()

Definition at line 71 of file qgshtmlrendersettings.h.


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