QGIS API Documentation 4.1.0-Master (376402f9aeb)
Loading...
Searching...
No Matches
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
23#include <QList>
24#include <QTemporaryDir>
25
26#define SIP_NO_FILE
27
28class QgsLayout;
29class QgsGeospatialPdfRenderedFeatureHandler;
30
49{
50 public:
55
57
63 QMap< QString, QString > customLayerTreeGroups() const { return mCustomLayerTreeGroups; }
64
71 QMap< QString, bool > initialLayerVisibility() const { return mInitialLayerVisibility; }
72
80 QStringList layerOrder() const { return mLayerOrder; }
81
92 QStringList layerTreeGroupOrder() const { return mLayerTreeGroupOrder; }
93
105 bool setMapItemLayersBeforeRendering();
106
114 void restoreMapItemLayersAfterRendering();
115
116 private:
117 VectorComponentDetail componentDetailForLayerId( const QString &layerId ) override;
118
119 QgsLayerTree *layerTree() const override;
120
121 QgsLayout *mLayout = nullptr;
122 QHash< QgsLayoutItemMap *, QgsGeospatialPdfRenderedFeatureHandler * > mMapHandlers;
123
124 QMap< QString, bool > mInitialLayerVisibility;
125 QMap< QString, QString > mCustomLayerTreeGroups;
126 QStringList mLayerOrder;
127 QStringList mLayerTreeGroupOrder;
128
133 QMap< QString, QList< QgsMapLayer * > > mTemporaryLayersToRender;
134
136};
137
138#endif //QGSLAYOUTGEOPDFEXPORTER_H
Namespace with helper functions for layer tree operations.
QMap< QString, bool > initialLayerVisibility() const
Optional map of map layer ID to initial visibility state.
QStringList layerOrder() const
Optional list of map layer IDs in the order they should be shown in the generated geospatial PDF laye...
QMap< QString, QString > customLayerTreeGroups() const
Returns any custom layer tree groups defined in the layer's settings.
QStringList layerTreeGroupOrder() const
Specifies the ordering of layer tree groups in the generated geospatial PDF file.
QgsLayoutGeospatialPdfExporter(QgsLayout *layout)
Constructor for QgsLayoutGeospatialPdfExporter, associated with the specified layout.
Base class for layouts, which can contain items such as maps, labels, scalebars, etc.
Definition qgslayout.h:51