QGIS API Documentation 3.39.0-Master (93ce9bf5c90)
|
Abstract base class for GeoPDF exporters. More...
#include <qgsabstractgeopdfexporter.h>
Classes | |
struct | ComponentLayerDetail |
Contains details of a particular input component to be used during PDF composition. More... | |
struct | ControlPoint |
Contains details of a control point used during georeferencing GeoPDF outputs. More... | |
struct | ExportDetails |
struct | GeoReferencedSection |
struct | RenderedFeature |
Contains information about a feature rendered inside the PDF. More... | |
struct | VectorComponentDetail |
Contains information relating to a single PDF layer in the GeoPDF export. More... | |
Public Member Functions | |
QgsAbstractGeoPdfExporter ()=default | |
virtual | ~QgsAbstractGeoPdfExporter ()=default |
QString | errorMessage () const |
Returns the last error message encountered during the export. | |
bool | finalize (const QList< QgsAbstractGeoPdfExporter::ComponentLayerDetail > &components, const QString &destinationFile, const ExportDetails &details) |
To be called after the rendering operation is complete. | |
QString | generateTemporaryFilepath (const QString &filename) const |
Returns a file path to use for temporary files required for GeoPDF creation. | |
void | pushRenderedFeature (const QString &layerId, const QgsAbstractGeoPdfExporter::RenderedFeature &feature, const QString &group=QString()) |
Called multiple times during the rendering operation, whenever a feature associated with the specified layerId is rendered. | |
Static Public Member Functions | |
static bool | compositionModeSupported (QPainter::CompositionMode mode) |
Returns true if the specified composition mode is supported for layers during GeoPDF exports. | |
static QString | geoPDFAvailabilityExplanation () |
Returns a user-friendly, translated string explaining why GeoPDF export support is not available on the current QGIS build (or an empty string if GeoPDF support IS available). | |
static bool | geoPDFCreationAvailable () |
Returns true if the current QGIS build is capable of GeoPDF support. | |
Friends | |
class | TestQgsGeoPdfExport |
class | TestQgsLayoutGeoPdfExport |
Abstract base class for GeoPDF exporters.
The base class handles generic GeoPDF export setup, cleanup and processing steps.
This class is a low level implementation detail only. Generally, you should use the high level interface exposed by classes like QgsLayoutExporter instead.
Definition at line 55 of file qgsabstractgeopdfexporter.h.
|
default |
|
virtualdefault |
|
static |
Returns true
if the specified composition mode is supported for layers during GeoPDF exports.
Definition at line 161 of file qgsabstractgeopdfexporter.cpp.
|
inline |
Returns the last error message encountered during the export.
Definition at line 326 of file qgsabstractgeopdfexporter.h.
bool QgsAbstractGeoPdfExporter::finalize | ( | const QList< QgsAbstractGeoPdfExporter::ComponentLayerDetail > & | components, |
const QString & | destinationFile, | ||
const ExportDetails & | details | ||
) |
To be called after the rendering operation is complete.
Will export the list of PDF layer components to a new PDF file at destinationFile. The components argument gives a list of additional layers to include in the generated PDF file. These must have already been created, e.g. as a result of rendering layers to separate PDF source files.
Any features previously collected by calls to pushRenderedFeature() will be included automatically in the GeoPDF export.
Returns true
if the operation was successful, or false
if an error occurred. If an error occurred, it can be retrieved by calling errorMessage().
Definition at line 84 of file qgsabstractgeopdfexporter.cpp.
QString QgsAbstractGeoPdfExporter::generateTemporaryFilepath | ( | const QString & | filename | ) | const |
Returns a file path to use for temporary files required for GeoPDF creation.
Definition at line 156 of file qgsabstractgeopdfexporter.cpp.
|
static |
Returns a user-friendly, translated string explaining why GeoPDF export support is not available on the current QGIS build (or an empty string if GeoPDF support IS available).
Definition at line 55 of file qgsabstractgeopdfexporter.cpp.
|
static |
Returns true
if the current QGIS build is capable of GeoPDF support.
If false
is returned, a user-friendly explanation why can be retrieved via geoPDFAvailabilityExplanation().
Definition at line 35 of file qgsabstractgeopdfexporter.cpp.
void QgsAbstractGeoPdfExporter::pushRenderedFeature | ( | const QString & | layerId, |
const QgsAbstractGeoPdfExporter::RenderedFeature & | feature, | ||
const QString & | group = QString() |
||
) |
Called multiple times during the rendering operation, whenever a feature associated with the specified layerId is rendered.
The optional group argument can be used to differentiate features from the same layer exported multiple times as part of different layer groups.
Definition at line 186 of file qgsabstractgeopdfexporter.cpp.
|
friend |
Definition at line 394 of file qgsabstractgeopdfexporter.h.
|
friend |
Definition at line 393 of file qgsabstractgeopdfexporter.h.