QGIS API Documentation  3.18.1-Zürich (202f1bf7e5)
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 
Abstract base class for GeoPDF exporters.
Handles GeoPDF export specific setup, cleanup and processing steps.
QMap< QString, bool > initialLayerVisibility() const
Optional map of map layer ID to initial visibility state.
QMap< QString, QString > customLayerTreeGroups() const
Returns any custom layer tree groups defined in the layer's settings.
QStringList layerOrder() const
Optional list of map layer IDs in the order they should be shown in the generated GeoPDF layer tree.
Base class for layouts, which can contain items such as maps, labels, scalebars, etc.
Definition: qgslayout.h:50