QGIS API Documentation
4.3.0-Master (0cef2469b72)
Toggle main menu visibility
Loading...
Searching...
No Matches
src
core
web
qgshtmlrendersettings.cpp
Go to the documentation of this file.
1
/***************************************************************************
2
qgshtmlrendersettings.h
3
-------------------
4
begin : November 2026
5
copyright : (C) 2026 by Nyall Dawson
6
email : nyall dot dawson at gmail dot com
7
***************************************************************************/
8
9
/***************************************************************************
10
* *
11
* This program is free software; you can redistribute it and/or modify *
12
* it under the terms of the GNU General Public License as published by *
13
* the Free Software Foundation; either version 2 of the License, or *
14
* (at your option) any later version. *
15
* *
16
***************************************************************************/
17
18
#include "
qgshtmlrendersettings.h
"
19
20
#include <QJsonValue>
21
#include <QString>
22
23
using namespace
Qt::StringLiterals;
24
25
bool
QgsHtmlRenderSettings::isEmpty
()
const
26
{
27
return
mBaseUrl.isEmpty() && mUserStylesheet.isEmpty() && mFeatureJson.isEmpty();
28
}
29
30
QVariantMap
QgsHtmlRenderSettings::asMap
()
const
31
{
32
QVariantMap res;
33
if
( !
baseUrl
().
isEmpty
() )
34
{
35
res.insert( u
"baseUrl"
_s,
baseUrl
() );
36
}
37
if
( !
userStylesheet
().
isEmpty
() )
38
{
39
res.insert( u
"userStylesheet"
_s,
userStylesheet
() );
40
}
41
if
( !
featureJson
().
isEmpty
() )
42
{
43
res.insert( u
"feature"
_s,
featureJson
() );
44
}
45
return
res;
46
}
QgsHtmlRenderSettings::userStylesheet
QString userStylesheet() const
Returns the user stylesheet CSS rules used while rendering the HTML content.
Definition
qgshtmlrendersettings.h:71
QgsHtmlRenderSettings::baseUrl
QUrl baseUrl() const
Returns the base URL used when resolving relative links.
Definition
qgshtmlrendersettings.h:46
QgsHtmlRenderSettings::featureJson
QVariantMap featureJson() const
Returns the feature json (as a variant map).
Definition
qgshtmlrendersettings.h:91
QgsHtmlRenderSettings::isEmpty
bool isEmpty() const
Returns true no settings are set.
Definition
qgshtmlrendersettings.cpp:25
QgsHtmlRenderSettings::asMap
QVariantMap asMap() const
Returns the settings encapsulated in a variantmap, for passing to the qgis_html_to_pdf utility.
Definition
qgshtmlrendersettings.cpp:30
qgshtmlrendersettings.h
Generated on
for QGIS API Documentation by
1.17.0