Skip to content

Commit d82bde2

Browse files
rouaultnyalldawson
authored andcommitted
Don't use the The Word Which Must Not Be Used
I limited the renaming to things that are not in the public API and are not setting names. This is probably more than we strictly need to do, but at least this will help doing potential future similar 'grep' exercises. (cherry picked from commit 9f605a6)
1 parent 271d4dd commit d82bde2

29 files changed

+486
-488
lines changed

python/PyQt6/core/auto_generated/providers/qgsprovidersublayerdetails.sip.in

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ according to a specific data provider.
2121

2222
It is possible that multiple data providers may be able to utilize the same underlying
2323
sub layer in a single dataset, yet will interpret this layer differently. For instance, a layer
24-
in a GeoPDF document can be interpreted as either a vector layer by the OGR data provider or a raster
24+
in a Geospatial PDF document can be interpreted as either a vector layer by the OGR data provider or a raster
2525
layer by the GDAL provider. The :py:func:`~providerKey` property can be used to determine the data provider
2626
associated with a :py:class:`QgsProviderSubLayerDetails` instance.
2727

Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# The following has been generated automatically from src/core/qgsmapsettingsutils.h
22
# monkey patching scoped based enum
3-
QgsMapSettingsUtils.EffectsCheckFlag.IgnoreGeoPdfSupportedEffects.__doc__ = "Ignore advanced effects which are supported in GeoPDF exports"
3+
QgsMapSettingsUtils.EffectsCheckFlag.IgnoreGeoPdfSupportedEffects.__doc__ = "Ignore advanced effects which are supported in geospatial PDF exports"
44
QgsMapSettingsUtils.EffectsCheckFlag.__doc__ = "Flags for controlling the behavior of :py:func:`~QgsMapSettingsUtils.containsAdvancedEffects`\n\n.. versionadded:: 3.14\n\n" + '* ``IgnoreGeoPdfSupportedEffects``: ' + QgsMapSettingsUtils.EffectsCheckFlag.IgnoreGeoPdfSupportedEffects.__doc__
55
# --

python/core/auto_generated/providers/qgsprovidersublayerdetails.sip.in

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ according to a specific data provider.
2121

2222
It is possible that multiple data providers may be able to utilize the same underlying
2323
sub layer in a single dataset, yet will interpret this layer differently. For instance, a layer
24-
in a GeoPDF document can be interpreted as either a vector layer by the OGR data provider or a raster
24+
in a Geospatial PDF document can be interpreted as either a vector layer by the OGR data provider or a raster
2525
layer by the GDAL provider. The :py:func:`~providerKey` property can be used to determine the data provider
2626
associated with a :py:class:`QgsProviderSubLayerDetails` instance.
2727

src/app/layout/qgslayoutdesignerdialog.cpp

+22-22
Original file line numberDiff line numberDiff line change
@@ -3339,16 +3339,16 @@ void QgsLayoutDesignerDialog::exportAtlasToPdf()
33393339
outputFileName = QDir( dir ).filePath( QStringLiteral( "atlas" ) ); // filename is overridden by atlas
33403340
}
33413341

3342-
bool allowGeoPdfExport = true;
3343-
QString geoPdfReason;
3342+
bool allowGeospatialPdfExport = true;
3343+
QString geospatialPdfReason;
33443344
if ( singleFile )
33453345
{
3346-
allowGeoPdfExport = false;
3347-
geoPdfReason = tr( "GeoPDF export is not available when exporting an atlas to a single PDF file." );
3346+
allowGeospatialPdfExport = false;
3347+
geospatialPdfReason = tr( "Geospatial PDF export is not available when exporting an atlas to a single PDF file." );
33483348
}
33493349

33503350
QgsLayoutExporter::PdfExportSettings pdfSettings;
3351-
if ( !getPdfExportSettings( pdfSettings, allowGeoPdfExport, geoPdfReason ) )
3351+
if ( !getPdfExportSettings( pdfSettings, allowGeospatialPdfExport, geospatialPdfReason ) )
33523352
return;
33533353

33543354
mView->setPaintingEnabled( false );
@@ -4477,19 +4477,19 @@ bool QgsLayoutDesignerDialog::getSvgExportSettings( QgsLayoutExporter::SvgExport
44774477
return true;
44784478
}
44794479

4480-
bool QgsLayoutDesignerDialog::getPdfExportSettings( QgsLayoutExporter::PdfExportSettings &settings, bool allowGeoPdfExport, const QString &geoPdfReason )
4480+
bool QgsLayoutDesignerDialog::getPdfExportSettings( QgsLayoutExporter::PdfExportSettings &settings, bool allowGeospatialPdfExport, const QString &geospatialPdfReason )
44814481
{
44824482
Qgis::TextRenderFormat prevTextRenderFormat = mMasterLayout->layoutProject()->labelingEngineSettings().defaultTextRenderFormat();
44834483
bool forceVector = false;
44844484
bool appendGeoreference = true;
44854485
bool includeMetadata = true;
44864486
bool disableRasterTiles = false;
44874487
bool simplify = true;
4488-
bool geoPdf = false;
4488+
bool geospatialPdf = false;
44894489
bool useOgcBestPracticeFormat = false;
44904490
bool losslessImages = false;
44914491
QStringList exportThemes;
4492-
QStringList geoPdfLayerOrder;
4492+
QStringList geospatialPdfLayerOrder;
44934493
if ( mLayout )
44944494
{
44954495
settings.flags = mLayout->renderContext().flags();
@@ -4499,14 +4499,14 @@ bool QgsLayoutDesignerDialog::getPdfExportSettings( QgsLayoutExporter::PdfExport
44994499
includeMetadata = mLayout->customProperty( QStringLiteral( "pdfIncludeMetadata" ), 1 ).toBool();
45004500
disableRasterTiles = mLayout->customProperty( QStringLiteral( "pdfDisableRasterTiles" ), 0 ).toBool();
45014501
simplify = mLayout->customProperty( QStringLiteral( "pdfSimplify" ), 1 ).toBool();
4502-
geoPdf = mLayout->customProperty( QStringLiteral( "pdfCreateGeoPdf" ), 0 ).toBool();
4502+
geospatialPdf = mLayout->customProperty( QStringLiteral( "pdfCreateGeoPdf" ), 0 ).toBool();
45034503
useOgcBestPracticeFormat = mLayout->customProperty( QStringLiteral( "pdfOgcBestPracticeFormat" ), 0 ).toBool();
45044504
const QString themes = mLayout->customProperty( QStringLiteral( "pdfExportThemes" ) ).toString();
45054505
if ( !themes.isEmpty() )
45064506
exportThemes = themes.split( QStringLiteral( "~~~" ) );
45074507
const QString layerOrder = mLayout->customProperty( QStringLiteral( "pdfLayerOrder" ) ).toString();
45084508
if ( !layerOrder.isEmpty() )
4509-
geoPdfLayerOrder = layerOrder.split( QStringLiteral( "~~~" ) );
4509+
geospatialPdfLayerOrder = layerOrder.split( QStringLiteral( "~~~" ) );
45104510

45114511
const int prevLayoutSettingLabelsAsOutlines = mLayout->customProperty( QStringLiteral( "pdfTextFormat" ), -1 ).toInt();
45124512
if ( prevLayoutSettingLabelsAsOutlines >= 0 )
@@ -4517,7 +4517,7 @@ bool QgsLayoutDesignerDialog::getPdfExportSettings( QgsLayoutExporter::PdfExport
45174517
}
45184518

45194519
// open options dialog
4520-
QString dialogGeoPdfReason = geoPdfReason;
4520+
QString dialogGeospatialPdfReason = geospatialPdfReason;
45214521
QList< QgsLayoutItemMap * > maps;
45224522
if ( mLayout )
45234523
mLayout->layoutItems( maps );
@@ -4526,20 +4526,20 @@ bool QgsLayoutDesignerDialog::getPdfExportSettings( QgsLayoutExporter::PdfExport
45264526
{
45274527
if ( !map->crs().isValid() )
45284528
{
4529-
allowGeoPdfExport = false;
4530-
dialogGeoPdfReason = tr( "One or more map items do not have a valid CRS set. This is required for GeoPDF export." );
4529+
allowGeospatialPdfExport = false;
4530+
dialogGeospatialPdfReason = tr( "One or more map items do not have a valid CRS set. This is required for geospatial PDF export." );
45314531
break;
45324532
}
45334533

45344534
if ( map->mapRotation() != 0 || map->itemRotation() != 0 || map->dataDefinedProperties().isActive( QgsLayoutObject::MapRotation ) )
45354535
{
4536-
allowGeoPdfExport = false;
4537-
dialogGeoPdfReason = tr( "One or more map items are rotated. This is not supported for GeoPDF export." );
4536+
allowGeospatialPdfExport = false;
4537+
dialogGeospatialPdfReason = tr( "One or more map items are rotated. This is not supported for geospatial PDF export." );
45384538
break;
45394539
}
45404540
}
45414541

4542-
QgsLayoutPdfExportOptionsDialog dialog( this, allowGeoPdfExport, dialogGeoPdfReason, geoPdfLayerOrder );
4542+
QgsLayoutPdfExportOptionsDialog dialog( this, allowGeospatialPdfExport, dialogGeospatialPdfReason, geospatialPdfLayerOrder );
45434543

45444544
dialog.setTextRenderFormat( prevTextRenderFormat );
45454545
dialog.setForceVector( forceVector );
@@ -4548,7 +4548,7 @@ bool QgsLayoutDesignerDialog::getPdfExportSettings( QgsLayoutExporter::PdfExport
45484548
dialog.setMetadataEnabled( includeMetadata );
45494549
dialog.setRasterTilingDisabled( disableRasterTiles );
45504550
dialog.setGeometriesSimplified( simplify );
4551-
dialog.setExportGeoPdf( geoPdf );
4551+
dialog.setExportGeospatialPdf( geospatialPdf );
45524552
dialog.setUseOgcBestPracticeFormat( useOgcBestPracticeFormat );
45534553
dialog.setExportThemes( exportThemes );
45544554
dialog.setLosslessImageExport( losslessImages );
@@ -4563,10 +4563,10 @@ bool QgsLayoutDesignerDialog::getPdfExportSettings( QgsLayoutExporter::PdfExport
45634563
disableRasterTiles = dialog.rasterTilingDisabled();
45644564
simplify = dialog.geometriesSimplified();
45654565
Qgis::TextRenderFormat textRenderFormat = dialog.textRenderFormat();
4566-
geoPdf = dialog.exportGeoPdf();
4566+
geospatialPdf = dialog.exportGeospatialPdf();
45674567
useOgcBestPracticeFormat = dialog.useOgcBestPracticeFormat();
45684568
exportThemes = dialog.exportThemes();
4569-
geoPdfLayerOrder = dialog.geoPdfLayerOrder();
4569+
geospatialPdfLayerOrder = dialog.geospatialPdfLayerOrder();
45704570
losslessImages = dialog.losslessImageExport();
45714571
QgsLayoutExporter::settingOpenAfterExportingPdf->setValue( dialog.openAfterExporting() );
45724572

@@ -4579,10 +4579,10 @@ bool QgsLayoutDesignerDialog::getPdfExportSettings( QgsLayoutExporter::PdfExport
45794579
mLayout->setCustomProperty( QStringLiteral( "pdfDisableRasterTiles" ), disableRasterTiles ? 1 : 0 );
45804580
mLayout->setCustomProperty( QStringLiteral( "pdfTextFormat" ), static_cast< int >( textRenderFormat ) );
45814581
mLayout->setCustomProperty( QStringLiteral( "pdfSimplify" ), simplify ? 1 : 0 );
4582-
mLayout->setCustomProperty( QStringLiteral( "pdfCreateGeoPdf" ), geoPdf ? 1 : 0 );
4582+
mLayout->setCustomProperty( QStringLiteral( "pdfCreateGeoPdf" ), geospatialPdf ? 1 : 0 );
45834583
mLayout->setCustomProperty( QStringLiteral( "pdfOgcBestPracticeFormat" ), useOgcBestPracticeFormat ? 1 : 0 );
45844584
mLayout->setCustomProperty( QStringLiteral( "pdfExportThemes" ), exportThemes.join( QLatin1String( "~~~" ) ) );
4585-
mLayout->setCustomProperty( QStringLiteral( "pdfLayerOrder" ), geoPdfLayerOrder.join( QLatin1String( "~~~" ) ) );
4585+
mLayout->setCustomProperty( QStringLiteral( "pdfLayerOrder" ), geospatialPdfLayerOrder.join( QLatin1String( "~~~" ) ) );
45864586
mLayout->setCustomProperty( QStringLiteral( "pdfLosslessImages" ), losslessImages ? 1 : 0 );
45874587
}
45884588

@@ -4591,7 +4591,7 @@ bool QgsLayoutDesignerDialog::getPdfExportSettings( QgsLayoutExporter::PdfExport
45914591
settings.exportMetadata = includeMetadata;
45924592
settings.textRenderFormat = textRenderFormat;
45934593
settings.simplifyGeometries = simplify;
4594-
settings.writeGeoPdf = geoPdf;
4594+
settings.writeGeoPdf = geospatialPdf;
45954595
settings.useOgcBestPracticeFormatGeoreferencing = useOgcBestPracticeFormat;
45964596
settings.useIso32000ExtensionFormatGeoreferencing = !useOgcBestPracticeFormat;
45974597
settings.exportThemes = exportThemes;

src/app/layout/qgslayoutdesignerdialog.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -559,7 +559,7 @@ class QgsLayoutDesignerDialog: public QMainWindow, public Ui::QgsLayoutDesignerB
559559
bool showFileSizeWarning();
560560
bool getRasterExportSettings( QgsLayoutExporter::ImageExportSettings &settings, QSize &imageSize );
561561
bool getSvgExportSettings( QgsLayoutExporter::SvgExportSettings &settings );
562-
bool getPdfExportSettings( QgsLayoutExporter::PdfExportSettings &settings, bool allowGeoPdfExport = true, const QString &geoPdfReason = QString() );
562+
bool getPdfExportSettings( QgsLayoutExporter::PdfExportSettings &settings, bool allowGeospatialPdfExport = true, const QString &geospatialPdfReason = QString() );
563563

564564
void toggleAtlasActions( bool enabled );
565565

src/app/qgsmapsavedialog.cpp

+32-32
Original file line numberDiff line numberDiff line change
@@ -115,35 +115,35 @@ QgsMapSaveDialog::QgsMapSaveDialog( QWidget *parent, QgsMapCanvas *mapCanvas, co
115115
mTextRenderFormatComboBox->addItem( tr( "Always Export Text as Paths (Recommended)" ), static_cast< int>( Qgis::TextRenderFormat::AlwaysOutlines ) );
116116
mTextRenderFormatComboBox->addItem( tr( "Always Export Text as Text Objects" ), static_cast< int >( Qgis::TextRenderFormat::AlwaysText ) );
117117

118-
const bool geoPdfAvailable = QgsAbstractGeoPdfExporter::geoPDFCreationAvailable();
119-
mGeoPDFGroupBox->setEnabled( geoPdfAvailable );
120-
mGeoPDFGroupBox->setChecked( false );
121-
if ( !geoPdfAvailable )
118+
const bool geospatialPdfAvailable = QgsAbstractGeospatialPdfExporter::geospatialPDFCreationAvailable();
119+
mGeospatialPDFGroupBox->setEnabled( geospatialPdfAvailable );
120+
mGeospatialPDFGroupBox->setChecked( false );
121+
if ( !geospatialPdfAvailable )
122122
{
123-
mGeoPDFOptionsStackedWidget->setCurrentIndex( 0 );
124-
mGeoPdfUnavailableReason->setText( QgsAbstractGeoPdfExporter::geoPDFAvailabilityExplanation() );
123+
mGeospatialPDFOptionsStackedWidget->setCurrentIndex( 0 );
124+
mGeospatialPdfUnavailableReason->setText( QgsAbstractGeospatialPdfExporter::geospatialPDFAvailabilityExplanation() );
125125
// avoid showing reason in disabled text color - we want it to stand out
126-
QPalette p = mGeoPdfUnavailableReason->palette();
126+
QPalette p = mGeospatialPdfUnavailableReason->palette();
127127
p.setColor( QPalette::Disabled, QPalette::WindowText, QPalette::WindowText );
128-
mGeoPdfUnavailableReason->setPalette( p );
129-
mGeoPDFOptionsStackedWidget->removeWidget( mGeoPDFOptionsStackedWidget->widget( 1 ) );
128+
mGeospatialPdfUnavailableReason->setPalette( p );
129+
mGeospatialPDFOptionsStackedWidget->removeWidget( mGeospatialPDFOptionsStackedWidget->widget( 1 ) );
130130
}
131131
else
132132
{
133-
mGeoPDFOptionsStackedWidget->setCurrentIndex( 1 );
134-
mGeoPdfFormatComboBox->addItem( tr( "ISO 32000 Extension (recommended)" ) );
135-
mGeoPdfFormatComboBox->addItem( tr( "OGC Best Practice" ) );
133+
mGeospatialPDFOptionsStackedWidget->setCurrentIndex( 1 );
134+
mGeospatialPdfFormatComboBox->addItem( tr( "ISO 32000 Extension (recommended)" ) );
135+
mGeospatialPdfFormatComboBox->addItem( tr( "OGC Best Practice" ) );
136136
}
137137

138-
connect( mGeoPDFGroupBox, &QGroupBox::toggled, this, &QgsMapSaveDialog::updatePdfExportWarning );
138+
connect( mGeospatialPDFGroupBox, &QGroupBox::toggled, this, &QgsMapSaveDialog::updatePdfExportWarning );
139139
updatePdfExportWarning();
140140
break;
141141
}
142142

143143
case Image:
144144
{
145145
mExportMetadataCheckBox->hide();
146-
mGeoPDFGroupBox->hide();
146+
mGeospatialPDFGroupBox->hide();
147147
mAdvancedPdfSettings->hide();
148148
mTextExportLabel->hide();
149149
QPushButton *button = new QPushButton( tr( "Copy to Clipboard" ) );
@@ -520,35 +520,35 @@ void QgsMapSaveDialog::onAccepted()
520520

521521
ms.setTextRenderFormat( static_cast< Qgis::TextRenderFormat >( mTextRenderFormatComboBox->currentData().toInt() ) );
522522

523-
QgsAbstractGeoPdfExporter::ExportDetails geoPdfExportDetails;
523+
QgsAbstractGeospatialPdfExporter::ExportDetails geospatialPdfExportDetails;
524524
if ( mExportMetadataCheckBox->isChecked() )
525525
{
526-
// These details will be used on non-GeoPDF exports is the export metadata checkbox is checked
527-
geoPdfExportDetails.author = QgsProject::instance()->metadata().author();
528-
geoPdfExportDetails.producer = QStringLiteral( "QGIS %1" ).arg( Qgis::version() );
529-
geoPdfExportDetails.creator = QStringLiteral( "QGIS %1" ).arg( Qgis::version() );
530-
geoPdfExportDetails.creationDateTime = QDateTime::currentDateTime();
531-
geoPdfExportDetails.subject = QgsProject::instance()->metadata().abstract();
532-
geoPdfExportDetails.title = QgsProject::instance()->metadata().title();
533-
geoPdfExportDetails.keywords = QgsProject::instance()->metadata().keywords();
526+
// These details will be used on non-Geospatial PDF exports is the export metadata checkbox is checked
527+
geospatialPdfExportDetails.author = QgsProject::instance()->metadata().author();
528+
geospatialPdfExportDetails.producer = QStringLiteral( "QGIS %1" ).arg( Qgis::version() );
529+
geospatialPdfExportDetails.creator = QStringLiteral( "QGIS %1" ).arg( Qgis::version() );
530+
geospatialPdfExportDetails.creationDateTime = QDateTime::currentDateTime();
531+
geospatialPdfExportDetails.subject = QgsProject::instance()->metadata().abstract();
532+
geospatialPdfExportDetails.title = QgsProject::instance()->metadata().title();
533+
geospatialPdfExportDetails.keywords = QgsProject::instance()->metadata().keywords();
534534
}
535535

536-
if ( mGeoPDFGroupBox->isChecked() )
536+
if ( mGeospatialPDFGroupBox->isChecked() )
537537
{
538-
if ( mGeoPdfFormatComboBox->currentIndex() == 0 )
538+
if ( mGeospatialPdfFormatComboBox->currentIndex() == 0 )
539539
{
540-
geoPdfExportDetails.useIso32000ExtensionFormatGeoreferencing = true;
541-
geoPdfExportDetails.useOgcBestPracticeFormatGeoreferencing = false;
540+
geospatialPdfExportDetails.useIso32000ExtensionFormatGeoreferencing = true;
541+
geospatialPdfExportDetails.useOgcBestPracticeFormatGeoreferencing = false;
542542
}
543543
else
544544
{
545-
geoPdfExportDetails.useIso32000ExtensionFormatGeoreferencing = false;
546-
geoPdfExportDetails.useOgcBestPracticeFormatGeoreferencing = true;
545+
geospatialPdfExportDetails.useIso32000ExtensionFormatGeoreferencing = false;
546+
geospatialPdfExportDetails.useOgcBestPracticeFormatGeoreferencing = true;
547547
}
548548

549-
geoPdfExportDetails.includeFeatures = mExportGeoPdfFeaturesCheckBox->isChecked();
549+
geospatialPdfExportDetails.includeFeatures = mExportGeospatialPdfFeaturesCheckBox->isChecked();
550550
}
551-
QgsMapRendererTask *mapRendererTask = new QgsMapRendererTask( ms, fileName, QStringLiteral( "PDF" ), saveAsRaster(), QgsTask::CanCancel, mGeoPDFGroupBox->isChecked(), geoPdfExportDetails );
551+
QgsMapRendererTask *mapRendererTask = new QgsMapRendererTask( ms, fileName, QStringLiteral( "PDF" ), saveAsRaster(), QgsTask::CanCancel, mGeospatialPDFGroupBox->isChecked(), geospatialPdfExportDetails );
552552

553553
if ( drawAnnotations() )
554554
{
@@ -586,7 +586,7 @@ void QgsMapSaveDialog::onAccepted()
586586

587587
void QgsMapSaveDialog::updatePdfExportWarning()
588588
{
589-
const QStringList layers = QgsMapSettingsUtils::containsAdvancedEffects( mMapCanvas->mapSettings(), mGeoPDFGroupBox->isChecked() ? QgsMapSettingsUtils::EffectsCheckFlags( QgsMapSettingsUtils::EffectsCheckFlag::IgnoreGeoPdfSupportedEffects ) : QgsMapSettingsUtils::EffectsCheckFlags() );
589+
const QStringList layers = QgsMapSettingsUtils::containsAdvancedEffects( mMapCanvas->mapSettings(), mGeospatialPDFGroupBox->isChecked() ? QgsMapSettingsUtils::EffectsCheckFlags( QgsMapSettingsUtils::EffectsCheckFlag::IgnoreGeoPdfSupportedEffects ) : QgsMapSettingsUtils::EffectsCheckFlags() );
590590
if ( !layers.isEmpty() )
591591
{
592592
mInfoDetails = tr( "The following layer(s) use advanced effects:\n\n%1\n\nRasterizing map is recommended for proper rendering." ).arg(

0 commit comments

Comments
 (0)