QGIS API Documentation 3.41.0-Master (cea29feecf2)
Loading...
Searching...
No Matches
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 public:
37 QgsLayoutAtlasToPdfAlgorithmBase() = default;
38 void initAlgorithm( const QVariantMap &configuration = QVariantMap() ) override;
40 QStringList tags() const override;
41 QString group() const override;
42 QString groupId() const override;
43
44 QgsLayoutAtlas *atlas();
45 QgsLayoutExporter exporter();
47 QString error();
48
49 protected:
50 QVariantMap processAlgorithm( const QVariantMap &parameters, QgsProcessingContext &context, QgsProcessingFeedback *feedback ) override;
51
52 virtual QVariantMap exportAtlas( QgsLayoutAtlas *atlas, const QgsLayoutExporter &exporter, const QgsLayoutExporter::PdfExportSettings &settings, const QVariantMap &parameters, QgsProcessingContext &context, QgsProcessingFeedback *feedback ) = 0;
53};
54
55
59class QgsLayoutAtlasToPdfAlgorithm : public QgsLayoutAtlasToPdfAlgorithmBase
60{
61 public:
62 QgsLayoutAtlasToPdfAlgorithm() = default;
63 void initAlgorithm( const QVariantMap &configuration = QVariantMap() ) override;
64 QString name() const override;
65 QString displayName() const override;
66 QString shortDescription() const override;
67 QString shortHelpString() const override;
68 QgsLayoutAtlasToPdfAlgorithm *createInstance() const override SIP_FACTORY;
69
70 protected:
71 QVariantMap exportAtlas( QgsLayoutAtlas *atlas, const QgsLayoutExporter &exporter, const QgsLayoutExporter::PdfExportSettings &settings, const QVariantMap &parameters, QgsProcessingContext &context, QgsProcessingFeedback *feedback ) override;
72};
73
77class QgsLayoutAtlasToMultiplePdfAlgorithm : public QgsLayoutAtlasToPdfAlgorithmBase
78{
79 public:
80 QgsLayoutAtlasToMultiplePdfAlgorithm() = default;
81 void initAlgorithm( const QVariantMap &configuration = QVariantMap() ) override;
82 QString name() const override;
83 QString displayName() const override;
84 QString shortDescription() const override;
85 QString shortHelpString() const override;
86 QgsLayoutAtlasToMultiplePdfAlgorithm *createInstance() const override SIP_FACTORY;
87
88 protected:
89 QVariantMap exportAtlas( QgsLayoutAtlas *atlas, const QgsLayoutExporter &exporter, const QgsLayoutExporter::PdfExportSettings &settings, const QVariantMap &parameters, QgsProcessingContext &context, QgsProcessingFeedback *feedback ) override;
90};
91
93
94#endif // QGSALGORITHMLAYOUTATLASTOPDF_H
QFlags< ProcessingAlgorithmFlag > ProcessingAlgorithmFlags
Flags indicating how and when an algorithm operates and should be exposed to users.
Definition qgis.h:3392
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 Qgis::ProcessingAlgorithmFlags 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)=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.