QGIS API Documentation 3.34.0-Prizren (ffbdd678812)
|
A dialog for customizing the properties of an exported image file. More...
#include <qgslayoutimageexportoptionsdialog.h>
Public Member Functions | |
QgsLayoutImageExportOptionsDialog (QWidget *parent=nullptr, Qt::WindowFlags flags=Qt::WindowFlags()) | |
Constructor for QgsLayoutImageExportOptionsDialog. | |
bool | antialiasing () const |
Returns whether antialiasing should be used in the export. | |
bool | cropToContents () const |
Returns whether the crop to contents option is checked in the dialog. | |
bool | generateWorldFile () const |
Returns whether the generate world file option is checked in the dialog. | |
void | getCropMargins (int &topMargin, int &rightMargin, int &bottomMargin, int &leftMargin) const |
Fetches the current crop to contents margin values, in pixels. | |
int | imageHeight () const |
Returns the user-set image height in pixels. | |
int | imageWidth () const |
Returns the user-set image width in pixels. | |
bool | openAfterExporting () const |
Returns whether the pdf should be opened after exporting it. | |
double | resolution () const |
Returns the selected resolution from the dialog. | |
void | setAntialiasing (bool antialias) |
Sets whether antialiasing should be used in the export. | |
void | setCropMargins (int topMargin, int rightMargin, int bottomMargin, int leftMargin) |
Sets the current crop to contents margin values, in pixels. | |
void | setCropToContents (bool crop) |
Sets whether the crop to contents option should be checked in the dialog. | |
void | setGenerateWorldFile (bool generate) |
Sets whether the generate world file option should be checked. | |
void | setImageSize (QSizeF size) |
Sets the target image size. | |
void | setOpenAfterExporting (bool enabled) |
Sets whether to open the pdf after exporting it. | |
void | setResolution (double resolution) |
Sets the initial resolution displayed in the dialog. | |
A dialog for customizing the properties of an exported image file.
Definition at line 36 of file qgslayoutimageexportoptionsdialog.h.
QgsLayoutImageExportOptionsDialog::QgsLayoutImageExportOptionsDialog | ( | QWidget * | parent = nullptr , |
Qt::WindowFlags | flags = Qt::WindowFlags() |
||
) |
Constructor for QgsLayoutImageExportOptionsDialog.
parent | parent widget |
flags | window flags |
Definition at line 27 of file qgslayoutimageexportoptionsdialog.cpp.
bool QgsLayoutImageExportOptionsDialog::antialiasing | ( | ) | const |
Returns whether antialiasing should be used in the export.
Definition at line 114 of file qgslayoutimageexportoptionsdialog.cpp.
bool QgsLayoutImageExportOptionsDialog::cropToContents | ( | ) | const |
Returns whether the crop to contents option is checked in the dialog.
Definition at line 94 of file qgslayoutimageexportoptionsdialog.cpp.
bool QgsLayoutImageExportOptionsDialog::generateWorldFile | ( | ) | const |
Returns whether the generate world file option is checked in the dialog.
Definition at line 104 of file qgslayoutimageexportoptionsdialog.cpp.
void QgsLayoutImageExportOptionsDialog::getCropMargins | ( | int & | topMargin, |
int & | rightMargin, | ||
int & | bottomMargin, | ||
int & | leftMargin | ||
) | const |
Fetches the current crop to contents margin values, in pixels.
topMargin | destination for top margin |
rightMargin | destination for right margin |
bottomMargin | destination for bottom margin |
leftMargin | destination for left margin |
Definition at line 119 of file qgslayoutimageexportoptionsdialog.cpp.
int QgsLayoutImageExportOptionsDialog::imageHeight | ( | ) | const |
Returns the user-set image height in pixels.
Definition at line 84 of file qgslayoutimageexportoptionsdialog.cpp.
int QgsLayoutImageExportOptionsDialog::imageWidth | ( | ) | const |
Returns the user-set image width in pixels.
Definition at line 79 of file qgslayoutimageexportoptionsdialog.cpp.
bool QgsLayoutImageExportOptionsDialog::openAfterExporting | ( | ) | const |
Returns whether the pdf should be opened after exporting it.
Definition at line 135 of file qgslayoutimageexportoptionsdialog.cpp.
double QgsLayoutImageExportOptionsDialog::resolution | ( | ) | const |
Returns the selected resolution from the dialog.
Definition at line 63 of file qgslayoutimageexportoptionsdialog.cpp.
void QgsLayoutImageExportOptionsDialog::setAntialiasing | ( | bool | antialias | ) |
Sets whether antialiasing should be used in the export.
Definition at line 109 of file qgslayoutimageexportoptionsdialog.cpp.
void QgsLayoutImageExportOptionsDialog::setCropMargins | ( | int | topMargin, |
int | rightMargin, | ||
int | bottomMargin, | ||
int | leftMargin | ||
) |
Sets the current crop to contents margin values, in pixels.
topMargin | top margin |
rightMargin | right margin |
bottomMargin | bottom margin |
leftMargin | left margin |
Definition at line 127 of file qgslayoutimageexportoptionsdialog.cpp.
void QgsLayoutImageExportOptionsDialog::setCropToContents | ( | bool | crop | ) |
Sets whether the crop to contents option should be checked in the dialog.
crop | set to true to check crop to contents |
Definition at line 89 of file qgslayoutimageexportoptionsdialog.cpp.
void QgsLayoutImageExportOptionsDialog::setGenerateWorldFile | ( | bool | generate | ) |
Sets whether the generate world file option should be checked.
Definition at line 99 of file qgslayoutimageexportoptionsdialog.cpp.
void QgsLayoutImageExportOptionsDialog::setImageSize | ( | QSizeF | size | ) |
Sets the target image size.
This is used to calculate the default size in pixels and also for determining the image's width to height ratio.
size | image size |
Definition at line 68 of file qgslayoutimageexportoptionsdialog.cpp.
void QgsLayoutImageExportOptionsDialog::setOpenAfterExporting | ( | bool | enabled | ) |
Sets whether to open the pdf after exporting it.
Definition at line 140 of file qgslayoutimageexportoptionsdialog.cpp.
void QgsLayoutImageExportOptionsDialog::setResolution | ( | double | resolution | ) |
Sets the initial resolution displayed in the dialog.
resolution | default resolution in DPI |
Definition at line 40 of file qgslayoutimageexportoptionsdialog.cpp.