gws.plugin.qgis.template

QGIS print template.

Source code: gws.plugin.qgis.template

Module Contents

class gws.plugin.qgis.template.Config

Bases: gws.base.template.Config

Print template based on a print layout of a QGIS project.

cssPath: gws.FilePath | None

Stylesheet for the HTML map overlay.

index: int | None

Print layout index in the QGIS project.

mapPosition: gws.UomSizeStr | None

Position of the main map on the page.

provider: Config.provider | None

QGIS project that contains the print layout.

class gws.plugin.qgis.template.Object

Bases: gws.base.template.Object

Print template based on a print layout of a QGIS project.

The map is rendered by WebSuite and the layout by QGIS Server; the result is one PDF.

cssPath: str

Stylesheet for the HTML map overlay.

htmlBlocks: dict[str, _HtmlBlock]

Label and HTML items of the layout, keyed by item UUID.

mapPosition: gws.UomSize

Position of the map item on the page.

provider: Object.provider

QGIS provider.

qgisTemplate: gws.plugin.qgis.caps.PrintTemplate

The print layout.

configure()
configure_provider()

Set the QGIS provider.

Returns:

True if a provider was set.

Raises:

gws.Error – If no provider is found.

render(tri)