QGIS API Documentation 3.41.0-Master (45a0abf3bec)
|
Abstract base class for Geospatial PDF 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 Geospatial PDF 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 Geospatial PDF export. More... | |
Public Member Functions | |
QgsAbstractGeospatialPdfExporter ()=default | |
virtual | ~QgsAbstractGeospatialPdfExporter ()=default |
QString | errorMessage () const |
Returns the last error message encountered during the export. | |
bool | finalize (const QList< QgsAbstractGeospatialPdfExporter::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 Geospatial PDF creation. | |
void | pushRenderedFeature (const QString &layerId, const QgsAbstractGeospatialPdfExporter::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 Geospatial PDF exports. | |
static QString | geospatialPDFAvailabilityExplanation () |
Returns a user-friendly, translated string explaining why Geospatial PDF export support is not available on the current QGIS build (or an empty string if Geospatial PDF support IS available). | |
static bool | geospatialPDFCreationAvailable () |
Returns true if the current QGIS build is capable of Geospatial PDF support. | |
Friends | |
class | TestQgsGeospatialPdfExport |
class | TestQgsLayoutGeospatialPdfExport |
Abstract base class for Geospatial PDF exporters.
The base class handles generic Geospatial PDF 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 Geospatial PDF 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 QgsAbstractGeospatialPdfExporter::finalize | ( | const QList< QgsAbstractGeospatialPdfExporter::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 Geospatial PDF 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 QgsAbstractGeospatialPdfExporter::generateTemporaryFilepath | ( | const QString & | filename | ) | const |
Returns a file path to use for temporary files required for Geospatial PDF creation.
Definition at line 156 of file qgsabstractgeopdfexporter.cpp.
|
static |
Returns a user-friendly, translated string explaining why Geospatial PDF export support is not available on the current QGIS build (or an empty string if Geospatial PDF support IS available).
Definition at line 55 of file qgsabstractgeopdfexporter.cpp.
|
static |
Returns true
if the current QGIS build is capable of Geospatial PDF support.
If false
is returned, a user-friendly explanation why can be retrieved via geospatialPDFAvailabilityExplanation().
Definition at line 35 of file qgsabstractgeopdfexporter.cpp.
void QgsAbstractGeospatialPdfExporter::pushRenderedFeature | ( | const QString & | layerId, |
const QgsAbstractGeospatialPdfExporter::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.