QGIS API Documentation  3.26.3-Buenos Aires (65e4edfdad)
qgslayoutgeopdfexporter.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgslayoutgeopdfexporter.h
3  --------------------------
4  begin : August 2019
5  copyright : (C) 2019 by Nyall Dawson
6  email : nyall dot dawson at gmail dot com
7  ***************************************************************************/
8 /***************************************************************************
9  * *
10  * This program is free software; you can redistribute it and/or modify *
11  * it under the terms of the GNU General Public License as published by *
12  * the Free Software Foundation; either version 2 of the License, or *
13  * (at your option) any later version. *
14  * *
15  ***************************************************************************/
16 #ifndef QGSLAYOUTGEOPDFEXPORTER_H
17 #define QGSLAYOUTGEOPDFEXPORTER_H
18 
19 #include "qgis_core.h"
21 #include "qgslayoutitemmap.h"
22 #include <QList>
23 #include <QTemporaryDir>
24 
25 #define SIP_NO_FILE
26 
27 class QgsLayout;
28 class QgsGeoPdfRenderedFeatureHandler;
29 
48 {
49  public:
50 
55 
56  ~QgsLayoutGeoPdfExporter() override;
57 
61  QMap< QString, QString > customLayerTreeGroups() const { return mCustomLayerTreeGroups; }
62 
69  QMap< QString, bool > initialLayerVisibility() const { return mInitialLayerVisibility; }
70 
77  QStringList layerOrder() const { return mLayerOrder; }
78 
79  private:
80 
81  VectorComponentDetail componentDetailForLayerId( const QString &layerId ) override;
82 
83  QgsLayout *mLayout = nullptr;
84  QHash< QgsLayoutItemMap *, QgsGeoPdfRenderedFeatureHandler * > mMapHandlers;
85 
86  QMap< QString, bool > mInitialLayerVisibility;
87  QMap< QString, QString > mCustomLayerTreeGroups;
88  QStringList mLayerOrder;
89 
90  friend class TestQgsLayoutGeoPdfExport;
91 };
92 
93 #endif //QGSLAYOUTGEOPDFEXPORTER_H
94 
95 
96 
QgsLayoutGeoPdfExporter
Handles GeoPDF export specific setup, cleanup and processing steps.
Definition: qgslayoutgeopdfexporter.h:47
QgsLayoutGeoPdfExporter::initialLayerVisibility
QMap< QString, bool > initialLayerVisibility() const
Optional map of map layer ID to initial visibility state.
Definition: qgslayoutgeopdfexporter.h:69
QgsLayoutGeoPdfExporter::layerOrder
QStringList layerOrder() const
Optional list of map layer IDs in the order they should be shown in the generated GeoPDF layer tree.
Definition: qgslayoutgeopdfexporter.h:77
QgsLayoutGeoPdfExporter::customLayerTreeGroups
QMap< QString, QString > customLayerTreeGroups() const
Returns any custom layer tree groups defined in the layer's settings.
Definition: qgslayoutgeopdfexporter.h:61
QgsLayout
Base class for layouts, which can contain items such as maps, labels, scalebars, etc.
Definition: qgslayout.h:50
qgsabstractgeopdfexporter.h
QgsAbstractGeoPdfExporter
Abstract base class for GeoPDF exporters.
Definition: qgsabstractgeopdfexporter.h:55
qgslayoutitemmap.h