QGIS API Documentation  3.18.1-Zürich (202f1bf7e5)
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 #define SIP_NO_FILE
23 
24 #include <QDialog>
25 #include "qgis_gui.h"
26 #include "ui_qgspdfexportoptions.h"
27 
28 #include "qgsrendercontext.h"
29 
31 class QgsGeoPdfLayerFilteredTreeModel;
32 
40 class GUI_EXPORT QgsLayoutPdfExportOptionsDialog: public QDialog, private Ui::QgsPdfExportOptionsDialog
41 {
42  Q_OBJECT
43 
44  public:
45 
55  QgsLayoutPdfExportOptionsDialog( QWidget *parent = nullptr,
56  bool allowGeoPdfExport = true,
57  const QString &geoPdfReason = QString(),
58  const QStringList &geoPdfLayerOrder = QStringList(),
59  Qt::WindowFlags flags = Qt::WindowFlags() );
60 
62  void setTextRenderFormat( QgsRenderContext::TextRenderFormat format );
64  QgsRenderContext::TextRenderFormat textRenderFormat() const;
66  void setForceVector( bool force );
68  bool forceVector() const;
70  void enableGeoreferencingOptions( bool enabled );
72  void setGeoreferencingEnabled( bool enabled );
74  bool georeferencingEnabled() const;
76  void setMetadataEnabled( bool enabled );
78  bool metadataEnabled() const;
80  void setRasterTilingDisabled( bool disabled );
82  bool rasterTilingDisabled() const;
84  void setGeometriesSimplified( bool enabled );
86  bool geometriesSimplified() const;
87 
89  void setLosslessImageExport( bool enabled );
91  bool losslessImageExport() const;
92 
94  void setExportGeoPdf( bool enabled );
96  bool exportGeoPdf() const;
97 
99  void setUseOgcBestPracticeFormat( bool enabled );
101  bool useOgcBestPracticeFormat() const;
102 
104  void setExportThemes( const QStringList &themes );
106  QStringList exportThemes() const;
107 
109  QStringList geoPdfLayerOrder() const;
110 
111  private slots:
112 
113  void showHelp();
114  void showContextMenuForGeoPdfStructure( QPoint point, const QModelIndex &index );
115 
116  private:
117 
118  bool mGeopdfAvailable = true;
119  QgsGeoPdfLayerTreeModel *mGeoPdfStructureModel = nullptr;
120  QgsGeoPdfLayerFilteredTreeModel *mGeoPdfStructureProxyModel = nullptr;
121  QMenu *mGeoPdfStructureTreeMenu = nullptr;
122 
123 };
124 
125 #endif // QGSLAYOUTPDFEXPORTOPTIONSDIALOG_H
Layer tree model for Geo-PDF layers.
A dialog for customizing the properties of an exported PDF file from a layout.
TextRenderFormat
Options for rendering text.