QGIS API Documentation 3.40.0-Bratislava (b56115d8743)
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
46 QgsLayoutImageExportOptionsDialog( QWidget *parent = nullptr, Qt::WindowFlags flags = Qt::WindowFlags() );
47
53 void setResolution( double resolution );
54
60 double resolution() const;
61
67 void setImageSize( QSizeF size );
68
73 int imageWidth() const;
74
79 int imageHeight() const;
80
86 void setCropToContents( bool crop );
87
92 bool cropToContents() const;
93
98 void setGenerateWorldFile( bool generate );
99
104 bool generateWorldFile() const;
105
110 void setAntialiasing( bool antialias );
111
116 bool antialiasing() const;
117
125 void getCropMargins( int &topMargin, int &rightMargin, int &bottomMargin, int &leftMargin ) const;
126
134 void setCropMargins( int topMargin, int rightMargin, int bottomMargin, int leftMargin );
135
137 void setOpenAfterExporting( bool enabled );
139 bool openAfterExporting() const;
140
141 private slots:
142
143 void mWidthSpinBox_valueChanged( int value );
144 void mHeightSpinBox_valueChanged( int value );
145 void mResolutionSpinBox_valueChanged( int value );
146 void clipToContentsToggled( bool state );
147 void showHelp();
148
149 private:
150
151 QSizeF mImageSize;
152
153
154};
155
156#endif // QGSLAYOUTIMAGEEXPORTOPTIONSDIALOG_H
A dialog for customizing the properties of an exported image file.