QGIS API Documentation 3.99.0-Master (26c88405ac0)
Loading...
Searching...
No Matches
QgsLayoutImageExportOptionsDialog Class Reference

A dialog for customizing the properties of an exported image file. More...

#include <qgslayoutimageexportoptionsdialog.h>

Inheritance diagram for QgsLayoutImageExportOptionsDialog:

Public Member Functions

 QgsLayoutImageExportOptionsDialog (QWidget *parent=nullptr, const QString &fileExtension=QString(), 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.
int quality () const
 Returns the image quality.
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 setQuality (int quality)
 Sets the image quality (for JPEG).
void setResolution (double resolution)
 Sets the initial resolution displayed in the dialog.

Detailed Description

A dialog for customizing the properties of an exported image file.

Note
This class is not a part of public API

Definition at line 36 of file qgslayoutimageexportoptionsdialog.h.

Constructor & Destructor Documentation

◆ QgsLayoutImageExportOptionsDialog()

QgsLayoutImageExportOptionsDialog::QgsLayoutImageExportOptionsDialog ( QWidget * parent = nullptr,
const QString & fileExtension = QString(),
Qt::WindowFlags flags = Qt::WindowFlags() )

Constructor for QgsLayoutImageExportOptionsDialog.

Parameters
parentparent widget
fileExtensionoutput image file extension
flagswindow flags

Definition at line 32 of file qgslayoutimageexportoptionsdialog.cpp.

Member Function Documentation

◆ antialiasing()

bool QgsLayoutImageExportOptionsDialog::antialiasing ( ) const

Returns whether antialiasing should be used in the export.

See also
setAntialiasing()

Definition at line 130 of file qgslayoutimageexportoptionsdialog.cpp.

◆ cropToContents()

bool QgsLayoutImageExportOptionsDialog::cropToContents ( ) const

Returns whether the crop to contents option is checked in the dialog.

See also
setCropToContents()

Definition at line 110 of file qgslayoutimageexportoptionsdialog.cpp.

◆ generateWorldFile()

bool QgsLayoutImageExportOptionsDialog::generateWorldFile ( ) const

Returns whether the generate world file option is checked in the dialog.

See also
setGenerateWorldFile()

Definition at line 120 of file qgslayoutimageexportoptionsdialog.cpp.

◆ getCropMargins()

void QgsLayoutImageExportOptionsDialog::getCropMargins ( int & topMargin,
int & rightMargin,
int & bottomMargin,
int & leftMargin ) const

Fetches the current crop to contents margin values, in pixels.

Parameters
topMargindestination for top margin
rightMargindestination for right margin
bottomMargindestination for bottom margin
leftMargindestination for left margin

Definition at line 135 of file qgslayoutimageexportoptionsdialog.cpp.

◆ imageHeight()

int QgsLayoutImageExportOptionsDialog::imageHeight ( ) const

Returns the user-set image height in pixels.

See also
imageWidth

Definition at line 100 of file qgslayoutimageexportoptionsdialog.cpp.

◆ imageWidth()

int QgsLayoutImageExportOptionsDialog::imageWidth ( ) const

Returns the user-set image width in pixels.

See also
imageHeight

Definition at line 95 of file qgslayoutimageexportoptionsdialog.cpp.

◆ openAfterExporting()

bool QgsLayoutImageExportOptionsDialog::openAfterExporting ( ) const

Returns whether the pdf should be opened after exporting it.

Definition at line 151 of file qgslayoutimageexportoptionsdialog.cpp.

◆ quality()

int QgsLayoutImageExportOptionsDialog::quality ( ) const

Returns the image quality.

Definition at line 161 of file qgslayoutimageexportoptionsdialog.cpp.

◆ resolution()

double QgsLayoutImageExportOptionsDialog::resolution ( ) const

Returns the selected resolution from the dialog.

Returns
image resolution in DPI
See also
setResolution()

Definition at line 79 of file qgslayoutimageexportoptionsdialog.cpp.

◆ setAntialiasing()

void QgsLayoutImageExportOptionsDialog::setAntialiasing ( bool antialias)

Sets whether antialiasing should be used in the export.

See also
antialiasing()

Definition at line 125 of file qgslayoutimageexportoptionsdialog.cpp.

◆ setCropMargins()

void QgsLayoutImageExportOptionsDialog::setCropMargins ( int topMargin,
int rightMargin,
int bottomMargin,
int leftMargin )

Sets the current crop to contents margin values, in pixels.

Parameters
topMargintop margin
rightMarginright margin
bottomMarginbottom margin
leftMarginleft margin

Definition at line 143 of file qgslayoutimageexportoptionsdialog.cpp.

◆ setCropToContents()

void QgsLayoutImageExportOptionsDialog::setCropToContents ( bool crop)

Sets whether the crop to contents option should be checked in the dialog.

Parameters
cropset to true to check crop to contents
See also
cropToContents()

Definition at line 105 of file qgslayoutimageexportoptionsdialog.cpp.

◆ setGenerateWorldFile()

void QgsLayoutImageExportOptionsDialog::setGenerateWorldFile ( bool generate)

Sets whether the generate world file option should be checked.

See also
generateWorldFile()

Definition at line 115 of file qgslayoutimageexportoptionsdialog.cpp.

◆ setImageSize()

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.

Parameters
sizeimage size

Definition at line 84 of file qgslayoutimageexportoptionsdialog.cpp.

◆ setOpenAfterExporting()

void QgsLayoutImageExportOptionsDialog::setOpenAfterExporting ( bool enabled)

Sets whether to open the pdf after exporting it.

Definition at line 156 of file qgslayoutimageexportoptionsdialog.cpp.

◆ setQuality()

void QgsLayoutImageExportOptionsDialog::setQuality ( int quality)

Sets the image quality (for JPEG).

Definition at line 170 of file qgslayoutimageexportoptionsdialog.cpp.

◆ setResolution()

void QgsLayoutImageExportOptionsDialog::setResolution ( double resolution)

Sets the initial resolution displayed in the dialog.

Parameters
resolutiondefault resolution in DPI
See also
resolution()

Definition at line 56 of file qgslayoutimageexportoptionsdialog.cpp.


The documentation for this class was generated from the following files: