QGIS API Documentation 4.1.0-Master (376402f9aeb)
Loading...
Searching...
No Matches
qgslayoutpdfexportoptionsdialog.h
Go to the documentation of this file.
1/***************************************************************************
2 qgslayoutpdfexportoptionsdialog.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 * *
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 QGSLAYOUTPDFEXPORTOPTIONSDIALOG_H
19#define QGSLAYOUTPDFEXPORTOPTIONSDIALOG_H
20
21// We don't want to expose this in the public API
22
23#include "ui_qgspdfexportoptions.h"
24
25#include "qgis.h"
26#include "qgis_gui.h"
27
28#include <QDialog>
29
30#define SIP_NO_FILE
31
33class QgsGeospatialPdfLayerFilteredTreeModel;
34
42class GUI_EXPORT QgsLayoutPdfExportOptionsDialog : public QDialog, private Ui::QgsPdfExportOptionsDialog
43{
44 Q_OBJECT
45
46 public:
57 QWidget *parent = nullptr,
58 bool allowGeospatialPdfExport = true,
59 const QString &geospatialPdfReason = QString(),
60 const QStringList &geospatialPdfLayerOrder = QStringList(),
61 Qt::WindowFlags flags = Qt::WindowFlags()
62 );
63
69 void setForceVector( bool force );
71 bool forceVector() const;
73 void enableGeoreferencingOptions( bool enabled );
75 void setGeoreferencingEnabled( bool enabled );
77 bool georeferencingEnabled() const;
79 void setMetadataEnabled( bool enabled );
81 bool metadataEnabled() const;
83 void setRasterTilingDisabled( bool disabled );
85 bool rasterTilingDisabled() const;
87 void setGeometriesSimplified( bool enabled );
89 bool geometriesSimplified() const;
90
92 void setLosslessImageExport( bool enabled );
94 bool losslessImageExport() const;
95
97 void setExportGeospatialPdf( bool enabled );
99 bool exportGeospatialPdf() const;
100
106 void setUseLayerTreeConfig( bool enabled );
108 bool useLayerTreeConfig() const;
116
118 void setExportThemes( const QStringList &themes );
120 QStringList exportThemes() const;
121
123 QStringList geospatialPdfLayerOrder() const;
124
126 QStringList geospatialPdfGroupOrder() const;
127
129 void setOpenAfterExporting( bool enabled );
131 bool openAfterExporting() const;
132
133 private slots:
134
135 void toggleLayerTreeConfig();
136 void showHelp();
137 void showContextMenuForGeospatialPdfStructure( QPoint point, const QModelIndex &index );
138
139 private:
140 bool mGeospatialPdfAvailable = true;
141 QgsGeospatialPdfLayerTreeModel *mGeospatialPdfStructureModel = nullptr;
142 QgsGeospatialPdfLayerFilteredTreeModel *mGeospatialPdfStructureProxyModel = nullptr;
143 QMenu *mGeospatialPdfStructureTreeMenu = nullptr;
144};
145
146#endif // QGSLAYOUTPDFEXPORTOPTIONSDIALOG_H
TextRenderFormat
Options for rendering text.
Definition qgis.h:2990
Layer tree model for Geo-PDF layers.
void setExportGeospatialPdf(bool enabled)
Sets whether to export a Geospatial PDF.
void setOpenAfterExporting(bool enabled)
Sets whether to open the pdf after exporting it.
bool useLayerTreeConfig() const
Returns whether to use QGIS layer tree config to export a Geospatial PDF.
QStringList exportThemes() const
Returns the list of export themes.
bool geometriesSimplified() const
Returns whether geometry simplification is enabled.
bool losslessImageExport() const
Returns whether lossless image compression is enabled.
void setLosslessImageExport(bool enabled)
Sets whether to use lossless image compression.
void setUseLayerTreeConfig(bool enabled)
Sets whether to use QGIS layer tree config to export a Geospatial PDF.
bool exportGeospatialPdf() const
Returns whether Geospatial PDF export is enabled.
bool openAfterExporting() const
Returns whether the pdf should be opened after exporting it.
bool georeferencingEnabled() const
Returns whether georeferencing is enabled.
void setRasterTilingDisabled(bool disabled)
Sets whether to disable raster tiling.
bool forceVector() const
Returns whether vector output is being forced.
void setGeometriesSimplified(bool enabled)
Sets whether to simplify geometries.
bool metadataEnabled() const
Returns whether metadata is enabled.
void setGeoreferencingEnabled(bool enabled)
Sets whether to enable georeferencing.
void setMetadataEnabled(bool enabled)
Sets whether to enable metadata.
void enableGeoreferencingOptions(bool enabled)
Sets whether to enable georeferencing options.
void disableUseLayerTreeConfig()
Disables the option to follow QGIS layer tree configuration from the GUI.
QStringList geospatialPdfGroupOrder() const
Returns a list of groups in the desired order they should appear in a generated Geospatial PDF file.
QgsLayoutPdfExportOptionsDialog(QWidget *parent=nullptr, bool allowGeospatialPdfExport=true, const QString &geospatialPdfReason=QString(), const QStringList &geospatialPdfLayerOrder=QStringList(), Qt::WindowFlags flags=Qt::WindowFlags())
Constructor for QgsLayoutPdfExportOptionsDialog.
QStringList geospatialPdfLayerOrder() const
Returns a list of map layer IDs in the desired order they should appear in a generated Geospatial PDF...
void setTextRenderFormat(Qgis::TextRenderFormat format)
Sets the text render format.
Qgis::TextRenderFormat textRenderFormat() const
Returns the current text render format.
bool rasterTilingDisabled() const
Returns whether raster tiling is disabled.
void setForceVector(bool force)
Set whether to force vector output.
void setExportThemes(const QStringList &themes)
Sets the list of export themes.