QGIS API Documentation 3.41.0-Master (fda2aa46e9a)
Loading...
Searching...
No Matches
qgslayoutimageexportoptionsdialog.h
Go to the documentation of this file.
1/***************************************************************************
2 qgslayoutimageexportoptionsdialog.h
3 -------------------------------------
4 begin : December 2017
5 copyright : (C) 2017 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 QGSLAYOUTIMAGEEXPORTOPTIONSDIALOG_H
19#define QGSLAYOUTIMAGEEXPORTOPTIONSDIALOG_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_qgslayoutimageexportoptions.h"
27
28
35class GUI_EXPORT QgsLayoutImageExportOptionsDialog: public QDialog, private Ui::QgsLayoutImageExportOptionsDialog
36{
37 Q_OBJECT
38
39 public:
40
47 QgsLayoutImageExportOptionsDialog( QWidget *parent = nullptr, const QString &fileExtension = QString(), Qt::WindowFlags flags = Qt::WindowFlags() );
48
54 void setResolution( double resolution );
55
61 double resolution() const;
62
68 void setImageSize( QSizeF size );
69
74 int imageWidth() const;
75
80 int imageHeight() const;
81
87 void setCropToContents( bool crop );
88
93 bool cropToContents() const;
94
99 void setGenerateWorldFile( bool generate );
100
105 bool generateWorldFile() const;
106
111 void setAntialiasing( bool antialias );
112
117 bool antialiasing() const;
118
126 void getCropMargins( int &topMargin, int &rightMargin, int &bottomMargin, int &leftMargin ) const;
127
135 void setCropMargins( int topMargin, int rightMargin, int bottomMargin, int leftMargin );
136
138 void setOpenAfterExporting( bool enabled );
140 bool openAfterExporting() const;
141
142
144 void setQuality( int quality );
146 int quality() const;
147
148 private slots:
149
150 void mWidthSpinBox_valueChanged( int value );
151 void mHeightSpinBox_valueChanged( int value );
152 void mResolutionSpinBox_valueChanged( int value );
153 void clipToContentsToggled( bool state );
154 void showHelp();
155
156 private:
157
158 bool shouldShowQuality() const;
159 QSizeF mImageSize;
160 QString mFileExtension;
161
162
163};
164
165#endif // QGSLAYOUTIMAGEEXPORTOPTIONSDIALOG_H
A dialog for customizing the properties of an exported image file.