mirror of
https://github.com/qgis/QGIS.git
synced 2025-03-02 00:02:12 -05:00
Expose world file option in image settings dialog
This commit is contained in:
parent
953d2c437d
commit
0f9aaf4c44
@ -1456,6 +1456,7 @@ void QgsLayoutDesignerDialog::exportToRaster()
|
||||
imageDlg.setResolution( dpi );
|
||||
imageDlg.setCropToContents( cropToContents );
|
||||
imageDlg.setCropMargins( marginTop, marginRight, marginBottom, marginLeft );
|
||||
imageDlg.setGenerateWorldFile( mLayout->customProperty( QStringLiteral( "exportWorldFile" ), false ).toBool() );
|
||||
|
||||
#if 0 //TODO
|
||||
QgsAtlasComposition *atlasMap = &mComposition->atlasComposition();
|
||||
@ -1505,7 +1506,7 @@ void QgsLayoutDesignerDialog::exportToRaster()
|
||||
{
|
||||
settings.imageSize = QSize( imageDlg.imageWidth(), imageDlg.imageHeight() );
|
||||
}
|
||||
settings.generateWorldFile = mLayout->customProperty( QStringLiteral( "exportWorldFile" ), false ).toBool();
|
||||
settings.generateWorldFile = imageDlg.generateWorldFile();
|
||||
|
||||
switch ( exporter.exportToImage( fileNExt.first, settings ) )
|
||||
{
|
||||
|
@ -95,6 +95,16 @@ bool QgsLayoutImageExportOptionsDialog::cropToContents() const
|
||||
return mClipToContentGroupBox->isChecked();
|
||||
}
|
||||
|
||||
void QgsLayoutImageExportOptionsDialog::setGenerateWorldFile( bool generate )
|
||||
{
|
||||
mGenerateWorldFile->setChecked( generate );
|
||||
}
|
||||
|
||||
bool QgsLayoutImageExportOptionsDialog::generateWorldFile() const
|
||||
{
|
||||
return mGenerateWorldFile->isChecked();
|
||||
}
|
||||
|
||||
void QgsLayoutImageExportOptionsDialog::getCropMargins( int &topMargin, int &rightMargin, int &bottomMargin, int &leftMargin ) const
|
||||
{
|
||||
topMargin = mTopMarginSpinBox->value();
|
||||
|
@ -84,6 +84,18 @@ class QgsLayoutImageExportOptionsDialog: public QDialog, private Ui::QgsLayoutIm
|
||||
*/
|
||||
bool cropToContents() const;
|
||||
|
||||
/**
|
||||
* Sets whether the generate world file option should be checked.
|
||||
* \see generateWorldFile()
|
||||
*/
|
||||
void setGenerateWorldFile( bool generate );
|
||||
|
||||
/**
|
||||
* Returns whether the generate world file option is checked in the dialog.
|
||||
* \see setGenerateWorldFile()
|
||||
*/
|
||||
bool generateWorldFile() const;
|
||||
|
||||
/**
|
||||
* Fetches the current crop to contents margin values, in pixels.
|
||||
* \param topMargin destination for top margin
|
||||
|
@ -7,7 +7,7 @@
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>533</width>
|
||||
<height>651</height>
|
||||
<height>394</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
@ -234,6 +234,16 @@
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="mGenerateWorldFile">
|
||||
<property name="toolTip">
|
||||
<string>If checked, a separate world file which georeferences exported images will be created</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Generate world file</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
|
Loading…
x
Reference in New Issue
Block a user