QGIS API Documentation 4.3.0-Master (0cef2469b72)
Loading...
Searching...
No Matches
qgshtmlrendersettings.h
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#ifndef QGSHTMLRENDERSETTINGS_H
19#define QGSHTMLRENDERSETTINGS_H
20
21#include "qgis_core.h"
22#include "qgis_sip.h"
23
24#include <QUrl>
25#include <QVariantMap>
26
33class CORE_EXPORT QgsHtmlRenderSettings
34{
35 public:
39 bool isEmpty() const;
40
46 QUrl baseUrl() const { return mBaseUrl; }
47
53 void setBaseUrl( const QUrl &url ) { mBaseUrl = url; }
54
62 void setUserStylesheet( const QString &stylesheet ) { mUserStylesheet = stylesheet; }
63
71 QString userStylesheet() const { return mUserStylesheet; }
72
81 void setFeatureJson( const QVariantMap &json ) { mFeatureJson = json; }
82
91 QVariantMap featureJson() const { return mFeatureJson; }
92
96 QVariantMap asMap() const;
97
98 private:
99 QUrl mBaseUrl;
100 QString mUserStylesheet;
101 QVariantMap mFeatureJson;
102};
103
104#endif // QGSHTMLRENDERSETTINGS_H
Encapsulates settings for rendering HTML content.
QString userStylesheet() const
Returns the user stylesheet CSS rules used while rendering the HTML content.
void setUserStylesheet(const QString &stylesheet)
Sets the user stylesheet CSS rules to use while rendering the HTML content.
void setBaseUrl(const QUrl &url)
Sets the base url to use when resolving relative links.
QUrl baseUrl() const
Returns the base URL used when resolving relative links.
void setFeatureJson(const QVariantMap &json)
Sets the feature json (as a variant map).
QVariantMap featureJson() const
Returns the feature json (as a variant map).
bool isEmpty() const
Returns true no settings are set.