QGIS API Documentation 3.32.0-Lima (311a8cb8a6)
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
36class GUI_EXPORT QgsLayoutImageExportOptionsDialog: public QDialog, private Ui::QgsLayoutImageExportOptionsDialog
37{
38 Q_OBJECT
39
40 public:
41
47 QgsLayoutImageExportOptionsDialog( QWidget *parent = nullptr, 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
137 private slots:
138
139 void mWidthSpinBox_valueChanged( int value );
140 void mHeightSpinBox_valueChanged( int value );
141 void mResolutionSpinBox_valueChanged( int value );
142 void clipToContentsToggled( bool state );
143 void showHelp();
144
145 private:
146
147 QSizeF mImageSize;
148
149
150};
151
152#endif // QGSLAYOUTIMAGEEXPORTOPTIONSDIALOG_H
A dialog for customizing the properties of an exported image file.