QGIS API Documentation 3.27.0-Master (1c05421486)
qgsalgorithmlayoutatlastopdf.h
Go to the documentation of this file.
1/***************************************************************************
2 qgsalgorithmlayoutatlastopdf.h
3 ---------------------
4 begin : August 2020
5 copyright : (C) 2020 by Mathieu Pellerin
6 email : nirvn dot asia 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 QGSALGORITHMLAYOUTATLASTOPDF_H
19#define QGSALGORITHMLAYOUTATLASTOPDF_H
20
21#define SIP_NO_FILE
22
23#include "qgis_sip.h"
25#include "qgslayoutexporter.h"
26
27class QgsLayoutAtlas;
28
30
34class QgsLayoutAtlasToPdfAlgorithmBase : public QgsProcessingAlgorithm
35{
36
37 public:
38
39 QgsLayoutAtlasToPdfAlgorithmBase() = default;
40 void initAlgorithm( const QVariantMap &configuration = QVariantMap() ) override;
41 Flags flags() const override;
42 QStringList tags() const override;
43 QString group() const override;
44 QString groupId() const override;
45
46 QgsLayoutAtlas *atlas();
47 QgsLayoutExporter exporter();
49 QString error();
50
51 protected:
52
53 QVariantMap processAlgorithm( const QVariantMap &parameters,
54 QgsProcessingContext &context, QgsProcessingFeedback *feedback ) override;
55
56 virtual QVariantMap exportAtlas( QgsLayoutAtlas *atlas, const QgsLayoutExporter &exporter, const QgsLayoutExporter::PdfExportSettings &settings,
57 const QVariantMap &parameters, QgsProcessingContext &context, QgsProcessingFeedback *feedback ) = 0;
58
59};
60
61
65class QgsLayoutAtlasToPdfAlgorithm : public QgsLayoutAtlasToPdfAlgorithmBase
66{
67
68 public:
69
70 QgsLayoutAtlasToPdfAlgorithm() = default;
71 void initAlgorithm( const QVariantMap &configuration = QVariantMap() ) override;
72 QString name() const override;
73 QString displayName() const override;
74 QString shortDescription() const override;
75 QString shortHelpString() const override;
76 QgsLayoutAtlasToPdfAlgorithm *createInstance() const override SIP_FACTORY;
77
78 protected:
79 QVariantMap exportAtlas( QgsLayoutAtlas *atlas, const QgsLayoutExporter &exporter, const QgsLayoutExporter::PdfExportSettings &settings,
80 const QVariantMap &parameters, QgsProcessingContext &context, QgsProcessingFeedback *feedback ) override;
81
82};
83
87class QgsLayoutAtlasToMultiplePdfAlgorithm : public QgsLayoutAtlasToPdfAlgorithmBase
88{
89
90 public:
91
92 QgsLayoutAtlasToMultiplePdfAlgorithm() = default;
93 void initAlgorithm( const QVariantMap &configuration = QVariantMap() ) override;
94 QString name() const override;
95 QString displayName() const override;
96 QString shortDescription() const override;
97 QString shortHelpString() const override;
98 QgsLayoutAtlasToMultiplePdfAlgorithm *createInstance() const override SIP_FACTORY;
99
100 protected:
101 QVariantMap exportAtlas( QgsLayoutAtlas *atlas, const QgsLayoutExporter &exporter, const QgsLayoutExporter::PdfExportSettings &settings,
102 const QVariantMap &parameters, QgsProcessingContext &context, QgsProcessingFeedback *feedback ) override;
103
104};
105
107
108#endif // QGSALGORITHMLAYOUTATLASTOPDF_H
109
110
Class used to render QgsLayout as an atlas, by iterating over the features from an associated vector ...
Handles rendering and exports of layouts to various formats.
Abstract base class for processing algorithms.
virtual QString group() const
Returns the name of the group this algorithm belongs to.
virtual QString groupId() const
Returns the unique ID of the group this algorithm belongs to.
virtual Flags flags() const
Returns the flags indicating how and when the algorithm operates and should be exposed to users.
virtual QVariantMap processAlgorithm(const QVariantMap &parameters, QgsProcessingContext &context, QgsProcessingFeedback *feedback) SIP_THROW(QgsProcessingException)=0
Runs the algorithm using the specified parameters.
virtual QStringList tags() const
Returns a list of tags which relate to the algorithm, and are used to assist users in searching for s...
virtual void initAlgorithm(const QVariantMap &configuration=QVariantMap())=0
Initializes the algorithm using the specified configuration.
Contains information about the context in which a processing algorithm is executed.
Base class for providing feedback from a processing algorithm.
#define SIP_FACTORY
Definition: qgis_sip.h:76
Contains settings relating to exporting layouts to PDF.