45#include "moc_qgsrasterlayerproperties.cpp"
78#include <QDesktopServices>
79#include <QTableWidgetItem>
86#include <QLinearGradient>
87#include <QPainterPath>
89#include <QColorDialog>
96#include <QRegularExpressionValidator>
97#include <QRegularExpression>
102 , TRSTRING_NOT_SET( tr(
"Not Set" ) )
103 , mDefaultStandardDeviation( 0 )
104 , mDefaultRedBand( 0 )
105 , mDefaultGreenBand( 0 )
106 , mDefaultBlueBand( 0 )
108 , mGradientHeight( 0.0 )
109 , mGradientWidth( 0.0 )
110 , mMetadataFilled( false )
112 mGrayMinimumMaximumEstimated =
true;
113 mRGBMinimumMaximumEstimated =
true;
118 mOptsPage_Information->layout()->addWidget( mMetadataViewer );
122 transparencyScrollArea->setWidget( mRasterTransparencyWidget );
125 QVBoxLayout *vl =
new QVBoxLayout();
126 vl->setContentsMargins( 0, 0, 0, 0 );
127 vl->addWidget( mLabelingWidget );
128 mOptsPage_Labeling->setLayout( vl );
130 connect( buttonBuildPyramids, &QPushButton::clicked,
this, &QgsRasterLayerProperties::buttonBuildPyramids_clicked );
132 connect( mRenderTypeComboBox,
static_cast<void ( QComboBox::* )(
int )
>( &QComboBox::currentIndexChanged ),
this, &QgsRasterLayerProperties::mRenderTypeComboBox_currentIndexChanged );
133 connect( mResetColorRenderingBtn, &QToolButton::clicked,
this, &QgsRasterLayerProperties::mResetColorRenderingBtn_clicked );
138 connect( buttonBox, &QDialogButtonBox::helpRequested,
this, &QgsRasterLayerProperties::showHelp );
140 mSourceGroupBox->hide();
142 mBtnStyle =
new QPushButton( tr(
"Style" ) );
143 buttonBox->addButton(
mBtnStyle, QDialogButtonBox::ResetRole );
157 connect( mSliderBrightness, &QAbstractSlider::valueChanged, mBrightnessSpinBox, &QSpinBox::setValue );
158 connect( mBrightnessSpinBox,
static_cast<void ( QSpinBox::* )(
int )
>( &QSpinBox::valueChanged ), mSliderBrightness, &QAbstractSlider::setValue );
159 mBrightnessSpinBox->setClearValue( 0 );
161 connect( mSliderContrast, &QAbstractSlider::valueChanged, mContrastSpinBox, &QSpinBox::setValue );
162 connect( mContrastSpinBox,
static_cast<void ( QSpinBox::* )(
int )
>( &QSpinBox::valueChanged ), mSliderContrast, &QAbstractSlider::setValue );
163 mContrastSpinBox->setClearValue( 0 );
166 connect( mSliderGamma, &QAbstractSlider::valueChanged,
this, &QgsRasterLayerProperties::updateGammaSpinBox );
167 connect( mGammaSpinBox,
static_cast<void ( QDoubleSpinBox::* )(
double )
>( &QDoubleSpinBox::valueChanged ),
this, &QgsRasterLayerProperties::updateGammaSlider );
168 mGammaSpinBox->setClearValue( 1.0 );
171 connect( sliderSaturation, &QAbstractSlider::valueChanged, spinBoxSaturation, &QSpinBox::setValue );
172 connect( spinBoxSaturation,
static_cast<void ( QSpinBox::* )(
int )
>( &QSpinBox::valueChanged ), sliderSaturation, &QAbstractSlider::setValue );
173 spinBoxSaturation->setClearValue( 0 );
176 connect( sliderColorizeStrength, &QAbstractSlider::valueChanged, spinColorizeStrength, &QSpinBox::setValue );
177 connect( spinColorizeStrength,
static_cast<void ( QSpinBox::* )(
int )
>( &QSpinBox::valueChanged ), sliderColorizeStrength, &QAbstractSlider::setValue );
178 spinColorizeStrength->setClearValue( 100 );
181 connect( comboGrayscale,
static_cast<void ( QComboBox::* )(
int )
>( &QComboBox::currentIndexChanged ),
this, &QgsRasterLayerProperties::toggleSaturationControls );
184 connect( mColorizeCheck, &QAbstractButton::toggled,
this, &QgsRasterLayerProperties::toggleColorizeControls );
187 connect( lbxPyramidResolutions, &QListWidget::itemSelectionChanged,
this, &QgsRasterLayerProperties::toggleBuildPyramidsButton );
189 mRefreshSettingsWidget->setLayer( mRasterLayer );
190 mMapLayerServerPropertiesWidget->setHasWfsTitle(
false );
191 mMapLayerServerPropertiesWidget->setServerProperties( mRasterLayer->
serverProperties() );
194 mScaleRangeWidget->setMapCanvas(
mCanvas );
209 connect( mEnableMapTips, &QAbstractButton::toggled, mHtmlMapTipGroupBox, &QWidget::setEnabled );
212 updateRasterAttributeTableOptionsPage();
216 connect( mCreateRasterAttributeTableButton, &QPushButton::clicked,
this, [=] {
220 QgsCreateRasterAttributeTableDialog dlg { mRasterLayer };
221 dlg.setOpenWhenDoneVisible(
false );
222 if ( dlg.exec() == QDialog::Accepted )
224 updateRasterAttributeTableOptionsPage();
229 connect( mLoadRasterAttributeTableFromFileButton, &QPushButton::clicked,
this, [=] {
233 if ( dlg.exec() == QDialog::Accepted )
235 updateRasterAttributeTableOptionsPage();
239 mBackupCrs = mRasterLayer->crs();
242 if ( mCanvas && mRasterTransparencyWidget->pixelSelectorTool() )
252 connect( mRasterTransparencyWidget->pbnAddValuesFromDisplay, &QPushButton::clicked,
this, [=] {
257 mCanvas->window()->raise();
258 mCanvas->window()->activateWindow();
259 mCanvas->window()->setFocus();
265 mContext = mCanvas->createExpressionContext();
279 connect( mInsertExpressionButton, &QAbstractButton::clicked,
this, [=] {
281 int selectionStart = mMapTipWidget->selectionStart();
282 int selectionEnd = mMapTipWidget->selectionEnd();
286 exprDlg.setWindowTitle( tr(
"Insert Expression" ) );
287 if ( exprDlg.exec() == QDialog::Accepted && !exprDlg.expressionText().trimmed().isEmpty() )
288 mMapTipWidget->insertText(
"[%" + exprDlg.expressionText().trimmed() +
"%]" );
290 mMapTipWidget->setLinearSelection( selectionStart, selectionEnd );
299 cboResamplingMethod->clear();
302 for (
const QPair<QString, QString> &method : std::as_const( constProviderType ) )
304 cboResamplingMethod->addItem( method.second, method.first );
308 QString prefix = provider->name() +
"/driverOptions/_pyramids/";
310 QString defaultMethod = mySettings.
value( prefix +
"resampling",
"AVERAGE" ).toString();
311 int idx = cboResamplingMethod->findData( defaultMethod );
313 cboResamplingMethod->setCurrentIndex( idx );
317 const QList<QgsRasterPyramid> myPyramidList = provider->buildPyramidList();
321 if ( pyramid.getExists() )
323 lbxPyramidResolutions->addItem(
new QListWidgetItem( myPyramidPixmap, QString::number( pyramid.getXDim() ) + QStringLiteral(
" x " ) + QString::number( pyramid.getYDim() ) ) );
327 lbxPyramidResolutions->addItem(
new QListWidgetItem( myNoPyramidPixmap, QString::number( pyramid.getXDim() ) + QStringLiteral(
" x " ) + QString::number( pyramid.getYDim() ) ) );
334 mOptsPage_Pyramids->setEnabled(
false );
343 mOptsPage_Histogram->setEnabled(
false );
346 QVBoxLayout *layout =
new QVBoxLayout( metadataFrame );
347 layout->setContentsMargins( 0, 0, 0, 0 );
349 mMetadataWidget->layout()->setContentsMargins( 0, 0, 0, 0 );
350 mMetadataWidget->setMapCanvas( mCanvas );
351 layout->addWidget( mMetadataWidget );
352 metadataFrame->setLayout( layout );
354 QVBoxLayout *temporalLayout =
new QVBoxLayout( temporalFrame );
355 temporalLayout->setContentsMargins( 0, 0, 0, 0 );
357 temporalLayout->addWidget( mTemporalWidget );
360 QgsDebugMsgLevel(
"Setting crs to " + mRasterLayer->crs().userFriendlyIdentifier(), 2 );
361 mCrsSelector->setCrs( mRasterLayer->crs() );
364 QString pyramidFormat( QStringLiteral(
"<h2>%1</h2><p>%2 %3 %4</p><b><font color='red'><p>%5</p><p>%6</p>" ) );
365 QString pyramidHeader = tr(
"Description" );
366 QString pyramidSentence1 = tr(
"Large resolution raster layers can slow navigation in QGIS." );
367 QString pyramidSentence2 = tr(
"By creating lower resolution copies of the data (pyramids) performance can be considerably improved as QGIS selects the most suitable resolution to use depending on the level of zoom." );
368 QString pyramidSentence3 = tr(
"You must have write access in the directory where the original data is stored to build pyramids." );
369 QString pyramidSentence4 = tr(
"Please note that building internal pyramids may alter the original data file and once created they cannot be removed!" );
370 QString pyramidSentence5 = tr(
"Please note that building internal pyramids could corrupt your image - always make a backup of your data first!" );
372 tePyramidDescription->setHtml( pyramidFormat.arg( pyramidHeader, pyramidSentence1, pyramidSentence2, pyramidSentence3, pyramidSentence4, pyramidSentence5 ) );
375 mResamplingGroupBox->setSaveCheckedState(
true );
376 mResamplingUtils.initWidgets( mRasterLayer, mZoomedInResamplingComboBox, mZoomedOutResamplingComboBox, mMaximumOversamplingSpinBox, mCbEarlyResampling );
377 mResamplingUtils.refreshWidgetsFromLayer();
381 btnColorizeColor->setColorDialogTitle( tr(
"Select Color" ) );
382 btnColorizeColor->setContext( QStringLiteral(
"symbology" ) );
387 if ( hueSaturationFilter )
389 sliderSaturation->setValue( hueSaturationFilter->
saturation() );
390 comboGrayscale->setCurrentIndex( (
int ) hueSaturationFilter->
grayscaleMode() );
393 toggleSaturationControls(
static_cast<int>( hueSaturationFilter->
grayscaleMode() ) );
396 mColorizeCheck->setChecked( hueSaturationFilter->
colorizeOn() );
397 btnColorizeColor->setColor( hueSaturationFilter->
colorizeColor() );
398 toggleColorizeControls( hueSaturationFilter->
colorizeOn() );
399 sliderColorizeStrength->setValue( hueSaturationFilter->
colorizeStrength() );
400 mInvertColorsCheck->setChecked( hueSaturationFilter->
invertColors() );
405 mBlendModeComboBox->setBlendMode( mRasterLayer->blendMode() );
410 mRasterTransparencyWidget->cboxTransparencyBand->setShowNotSetOption(
true, tr(
"None" ) );
411 mRasterTransparencyWidget->cboxTransparencyBand->setLayer( mRasterLayer );
420 cboxTransparencyBand->setCurrentIndex( cboxTransparencyBand->findData( renderer->
alphaBand() ) );
427 mHistogramWidget =
nullptr;
428 if ( mOptsPage_Histogram->isEnabled() )
431 mHistogramStackedWidget->addWidget( mHistogramWidget );
445 mDisableRenderTypeComboBoxCurrentIndexChanged =
true;
447 for (
const QString &name : constRenderersList )
457 mDisableRenderTypeComboBoxCurrentIndexChanged =
false;
462 QString rendererType = renderer->
type();
463 widgetIndex = mRenderTypeComboBox->findData( rendererType );
464 if ( widgetIndex != -1 )
466 mDisableRenderTypeComboBoxCurrentIndexChanged =
true;
467 mRenderTypeComboBox->setCurrentIndex( widgetIndex );
468 mDisableRenderTypeComboBoxCurrentIndexChanged =
false;
471 if ( rendererType == QLatin1String(
"singlebandcolordata" ) && mRenderTypeComboBox->count() == 1 )
474 QSizePolicy sizep = mBandRenderingGrpBx->sizePolicy();
475 sizep.setVerticalStretch( 0 );
476 sizep.setVerticalPolicy( QSizePolicy::Maximum );
477 mBandRenderingGrpBx->setSizePolicy( sizep );
478 mBandRenderingGrpBx->updateGeometry();
481 if ( mRasterLayer->providerType() != QLatin1String(
"wms" ) )
483 mWMSPrintGroupBox->hide();
484 mPublishDataSourceUrlCheckBox->hide();
485 mBackgroundLayerCheckBox->hide();
492 const int horizontalDpi = logicalDpiX();
495 if ( horizontalDpi > 96 )
497 mMetadataViewer->setZoomFactor( mMetadataViewer->zoomFactor() * 0.9 );
499 mMetadataViewer->page()->setLinkDelegationPolicy( QWebPage::LinkDelegationPolicy::DelegateAllLinks );
501 mMetadataViewer->page()->settings()->setAttribute( QWebSettings::DeveloperExtrasEnabled,
true );
502 mMetadataViewer->page()->settings()->setAttribute( QWebSettings::JavascriptEnabled,
true );
508 mRenderTypeComboBox_currentIndexChanged( widgetIndex );
510 setMetadataWidget( mMetadataWidget, mOptsPage_Metadata );
512 QMenu *menuStyle =
new QMenu(
this );
515 menuStyle->addSeparator();
518 mBtnStyle->setMenu( menuStyle );
519 connect( menuStyle, &QMenu::aboutToShow,
this, &QgsRasterLayerProperties::aboutToShowStyleMenu );
521 mBtnMetadata =
new QPushButton( tr(
"Metadata" ),
this );
522 QMenu *menuMetadata =
new QMenu(
this );
525 menuMetadata->addSeparator();
528 mBtnMetadata->setMenu( menuMetadata );
529 buttonBox->addButton( mBtnMetadata, QDialogButtonBox::ResetRole );
537 if ( !settings.
contains( QStringLiteral(
"/Windows/RasterLayerProperties/tab" ) ) )
539 settings.
setValue( QStringLiteral(
"Windows/RasterLayerProperties/tab" ), mOptStackedWidget->indexOf( mOptsPage_Style ) );
544 optionsStackedWidget_CurrentChanged( mOptionsStackedWidget->currentIndex() );
547 mOptsPage_Information->setProperty(
"helpPage", QStringLiteral(
"working_with_raster/raster_properties.html#information-properties" ) );
548 mOptsPage_Source->setProperty(
"helpPage", QStringLiteral(
"working_with_raster/raster_properties.html#source-properties" ) );
549 mOptsPage_Style->setProperty(
"helpPage", QStringLiteral(
"working_with_raster/raster_properties.html#symbology-properties" ) );
550 mOptsPage_Transparency->setProperty(
"helpPage", QStringLiteral(
"working_with_raster/raster_properties.html#transparency-properties" ) );
552 if ( mOptsPage_Histogram )
553 mOptsPage_Histogram->setProperty(
"helpPage", QStringLiteral(
"working_with_raster/raster_properties.html#histogram-properties" ) );
555 mOptsPage_Rendering->setProperty(
"helpPage", QStringLiteral(
"working_with_raster/raster_properties.html#rendering-properties" ) );
556 mOptsPage_Temporal->setProperty(
"helpPage", QStringLiteral(
"working_with_raster/raster_properties.html#temporal-properties" ) );
558 if ( mOptsPage_Pyramids )
559 mOptsPage_Pyramids->setProperty(
"helpPage", QStringLiteral(
"working_with_raster/raster_properties.html#pyramids-properties" ) );
561 if ( mOptsPage_Display )
562 mOptsPage_Display->setProperty(
"helpPage", QStringLiteral(
"working_with_raster/raster_properties.html#display-properties" ) );
564 mOptsPage_Metadata->setProperty(
"helpPage", QStringLiteral(
"working_with_raster/raster_properties.html#metadata-properties" ) );
565 mOptsPage_Legend->setProperty(
"helpPage", QStringLiteral(
"working_with_raster/raster_properties.html#legend-properties" ) );
566 mOptsPage_Server->setProperty(
"helpPage", QStringLiteral(
"working_with_raster/raster_properties.html#server-properties" ) );
586 if ( beforePage.isEmpty() )
604void QgsRasterLayerProperties::updateRasterAttributeTableOptionsPage()
606 if ( mRasterAttributeTableWidget )
608 mOptsPage_RasterAttributeTable->layout()->removeWidget( mRasterAttributeTableWidget );
609 mRasterAttributeTableWidget =
nullptr;
615 mRasterAttributeTableWidget =
new QgsRasterAttributeTableWidget(
this, mRasterLayer );
616 mOptsPage_RasterAttributeTable->layout()->addWidget( mRasterAttributeTableWidget );
618 connect( mRasterAttributeTableWidget, &QgsRasterAttributeTableWidget::rendererChanged,
this, &QgsRasterLayerProperties::syncToLayer );
619 mNoRasterAttributeTableWidget->hide();
623 mNoRasterAttributeTableWidget->show();
628void QgsRasterLayerProperties::setRendererWidget(
const QString &rendererName )
637 const QList<int> oldBands = oldRenderer ? oldRenderer->
usesBands() : QList<int>();
642 opacity = oldRenderer->
opacity();
651 QgsDebugMsgLevel( QStringLiteral(
"renderer has widgetCreateFunction" ), 3 );
654 if ( oldWidget && ( !oldRenderer || rendererName != oldRenderer->
type() ) )
656 if ( rendererName == QLatin1String(
"singlebandgray" ) )
659 whileBlocking( mRasterLayer )->setDefaultContrastEnhancement();
661 else if ( rendererName == QLatin1String(
"multibandcolor" ) )
664 whileBlocking( mRasterLayer )->setDefaultContrastEnhancement();
672 mRendererStackedWidget->addWidget( mRendererWidget );
676 std::unique_ptr<QgsRasterRenderer> newRenderer;
677 newRenderer.reset( mRendererWidget->
renderer() );
678 const QList<int> newBands = newRenderer->usesBands();
679 if ( oldBands != newBands )
687 const int widgetIndex = mRenderTypeComboBox->findData( rendererName );
688 if ( widgetIndex != -1 )
690 mDisableRenderTypeComboBoxCurrentIndexChanged =
true;
691 mRenderTypeComboBox->setCurrentIndex( widgetIndex );
692 mDisableRenderTypeComboBoxCurrentIndexChanged =
false;
695 if ( mRendererWidget != oldWidget )
698 if ( mHistogramWidget )
704void QgsRasterLayerProperties::sync()
708 if ( !mSourceWidget )
713 QHBoxLayout *layout =
new QHBoxLayout();
714 layout->addWidget( mSourceWidget );
715 mSourceGroupBox->setLayout( layout );
717 mSourceGroupBox->setTitle( mSourceWidget->
groupTitle() );
718 mSourceGroupBox->show();
721 buttonBox->button( QDialogButtonBox::Apply )->setEnabled( isValid );
722 buttonBox->button( QDialogButtonBox::Ok )->setEnabled( isValid );
743 mRasterTransparencyWidget->gboxNoDataValue->setEnabled(
false );
744 mRasterTransparencyWidget->gboxCustomTransparency->setEnabled(
false );
745 mOptionsStackedWidget->setCurrentWidget( mOptsPage_Server );
752 if ( mOptsPage_Pyramids )
754 delete mOptsPage_Pyramids;
755 mOptsPage_Pyramids =
nullptr;
761 if ( mOptsPage_Histogram )
763 delete mOptsPage_Histogram;
764 mOptsPage_Histogram =
nullptr;
765 delete mHistogramWidget;
766 mHistogramWidget =
nullptr;
778 if ( brightnessFilter )
780 mSliderBrightness->setValue( brightnessFilter->
brightness() );
781 mSliderContrast->setValue( brightnessFilter->
contrast() );
782 mGammaSpinBox->setValue( brightnessFilter->
gamma() );
788 if ( hueSaturationFilter )
790 sliderSaturation->setValue( hueSaturationFilter->
saturation() );
791 comboGrayscale->setCurrentIndex( (
int ) hueSaturationFilter->
grayscaleMode() );
794 toggleSaturationControls(
static_cast<int>( hueSaturationFilter->
grayscaleMode() ) );
797 mColorizeCheck->setChecked( hueSaturationFilter->
colorizeOn() );
798 btnColorizeColor->setColor( hueSaturationFilter->
colorizeColor() );
799 toggleColorizeControls( hueSaturationFilter->
colorizeOn() );
800 sliderColorizeStrength->setValue( hueSaturationFilter->
colorizeStrength() );
801 mInvertColorsCheck->setChecked( hueSaturationFilter->
invertColors() );
805 mResamplingUtils.refreshWidgetsFromLayer();
807 mRefreshSettingsWidget->syncToLayer();
808 mMapLayerServerPropertiesWidget->sync();
815 mLayerOrigNameLineEd->setText( mRasterLayer->
name() );
822 updateInformationContent();
828 QVariant wmsPrintLayer = mRasterLayer->
customProperty( QStringLiteral(
"WMSPrintLayer" ) );
829 if ( wmsPrintLayer.isValid() )
831 mWMSPrintLayerLineEdit->setText( wmsPrintLayer.toString() );
834 QVariant wmsPublishDataSourceUrl = mRasterLayer->
customProperty( QStringLiteral(
"WMSPublishDataSourceUrl" ),
false );
835 mPublishDataSourceUrlCheckBox->setChecked( wmsPublishDataSourceUrl.toBool() );
837 QVariant wmsBackgroundLayer = mRasterLayer->
customProperty( QStringLiteral(
"WMSBackgroundLayer" ),
false );
838 mBackgroundLayerCheckBox->setChecked( wmsBackgroundLayer.toBool() );
840 mLegendPlaceholderWidget->setLastPathSettingsKey( QStringLiteral(
"lastLegendPlaceholderDir" ) );
842 mLegendConfigEmbeddedWidget->setLayer( mRasterLayer );
847 updateDataDefinedButtons();
851 page->syncToLayer( mRasterLayer );
859 const QString newSource = mSourceWidget->
sourceUri();
860 if ( newSource != mRasterLayer->
source() )
867 if ( !mRasterLayer->
isValid() )
881 mLegendConfigEmbeddedWidget->applyToLayer();
904 if ( rendererWidget )
911 mBackupCrs = mRasterLayer->
crs();
913 mMetadataFilled =
false;
919 mLabelingWidget->
apply();
921 if ( rasterRenderer )
931 mRasterLayer->
setName( mLayerOrigNameLineEd->text() );
938 mRefreshSettingsWidget->saveToLayer();
939 if ( mMapLayerServerPropertiesWidget->save() )
940 mMetadataFilled =
true;
947 mResamplingUtils.refreshLayerFromWidgets();
951 if ( hueSaturationFilter )
953 hueSaturationFilter->
setSaturation( sliderSaturation->value() );
955 hueSaturationFilter->
setColorizeOn( mColorizeCheck->checkState() );
958 hueSaturationFilter->
setInvertColors( mInvertColorsCheck->isChecked() );
962 mRasterLayer->
setBlendMode( mBlendModeComboBox->blendMode() );
967 mRasterLayer->
setCrs( mCrsSelector->crs() );
969 if ( !mWMSPrintLayerLineEdit->text().isEmpty() )
971 mRasterLayer->
setCustomProperty( QStringLiteral(
"WMSPrintLayer" ), mWMSPrintLayerLineEdit->text() );
974 mRasterLayer->
setCustomProperty(
"WMSPublishDataSourceUrl", mPublishDataSourceUrlCheckBox->isChecked() );
975 mRasterLayer->
setCustomProperty(
"WMSBackgroundLayer", mBackgroundLayerCheckBox->isChecked() );
992void QgsRasterLayerProperties::buttonBuildPyramids_clicked()
996 auto feedback = std::make_unique<QgsRasterBlockFeedback>();
1004 for (
int myCounterInt = 0; myCounterInt < lbxPyramidResolutions->count(); myCounterInt++ )
1006 QListWidgetItem *myItem = lbxPyramidResolutions->item( myCounterInt );
1008 myPyramidList[myCounterInt].setBuild( myItem->isSelected() || myPyramidList[myCounterInt].getExists() );
1012 QString prefix = provider->
name() +
"/driverOptions/_pyramids/";
1014 QString resamplingMethod( cboResamplingMethod->currentData().toString() );
1015 mySettings.
setValue( prefix +
"resampling", resamplingMethod );
1022 QApplication::setOverrideCursor( Qt::WaitCursor );
1030 QApplication::restoreOverrideCursor();
1031 mPyramidProgress->setValue( 0 );
1032 buttonBuildPyramids->setEnabled(
false );
1033 if ( !res.isNull() )
1035 if ( res == QLatin1String(
"CANCELED" ) )
1039 else if ( res == QLatin1String(
"ERROR_WRITE_ACCESS" ) )
1041 QMessageBox::warning(
this, tr(
"Building Pyramids" ), tr(
"Write access denied. Adjust the file permissions and try again." ) );
1043 else if ( res == QLatin1String(
"ERROR_WRITE_FORMAT" ) )
1045 QMessageBox::warning(
this, tr(
"Building Pyramids" ), tr(
"The file was not writable. Some formats do not "
1046 "support pyramid overviews. Consult the GDAL documentation if in doubt." ) );
1048 else if ( res == QLatin1String(
"FAILED_NOT_SUPPORTED" ) )
1050 QMessageBox::warning(
this, tr(
"Building Pyramids" ), tr(
"Building pyramid overviews is not supported on this type of raster." ) );
1052 else if ( res == QLatin1String(
"ERROR_JPEG_COMPRESSION" ) )
1054 QMessageBox::warning(
this, tr(
"Building Pyramids" ), tr(
"Building internal pyramid overviews is not supported on raster layers with JPEG compression and your current libtiff library." ) );
1056 else if ( res == QLatin1String(
"ERROR_VIRTUAL" ) )
1058 QMessageBox::warning(
this, tr(
"Building Pyramids" ), tr(
"Building pyramid overviews is not supported on this type of raster." ) );
1065 lbxPyramidResolutions->clear();
1073 if ( pyramid.getExists() )
1075 lbxPyramidResolutions->addItem(
new QListWidgetItem( myPyramidPixmap, QString::number( pyramid.getXDim() ) + QStringLiteral(
" x " ) + QString::number( pyramid.getYDim() ) ) );
1079 lbxPyramidResolutions->addItem(
new QListWidgetItem( myNoPyramidPixmap, QString::number( pyramid.getXDim() ) + QStringLiteral(
" x " ) + QString::number( pyramid.getYDim() ) ) );
1088 updateInformationContent();
1091void QgsRasterLayerProperties::mRenderTypeComboBox_currentIndexChanged(
int index )
1093 if ( index < 0 || mDisableRenderTypeComboBoxCurrentIndexChanged || !mRasterLayer->renderer() )
1098 QString rendererName = mRenderTypeComboBox->itemData( index ).toString();
1099 setRendererWidget( rendererName );
1109void QgsRasterLayerProperties::aboutToShowStyleMenu()
1113 QMenu *m = qobject_cast<QMenu *>( sender() );
1121void QgsRasterLayerProperties::syncToLayer()
1126 setRendererWidget( renderer->
type() );
1136 if ( !mHistogramWidget )
1148 if ( index ==
mOptStackedWidget->indexOf( mOptsPage_Information ) || !mMetadataFilled )
1151 updateInformationContent();
1157 button->blockSignals(
true );
1161 button->blockSignals(
false );
1164void QgsRasterLayerProperties::updateDataDefinedButtons()
1166 const auto propertyOverrideButtons { findChildren<QgsPropertyOverrideButton *>() };
1169 updateDataDefinedButton( button );
1185void QgsRasterLayerProperties::updateProperty()
1192void QgsRasterLayerProperties::toggleSaturationControls(
int grayscaleMode )
1195 if ( grayscaleMode == 0 )
1197 sliderSaturation->setEnabled(
true );
1198 spinBoxSaturation->setEnabled(
true );
1202 sliderSaturation->setEnabled(
false );
1203 spinBoxSaturation->setEnabled(
false );
1207void QgsRasterLayerProperties::toggleColorizeControls(
bool colorizeEnabled )
1210 btnColorizeColor->setEnabled( colorizeEnabled );
1211 sliderColorizeStrength->setEnabled( colorizeEnabled );
1212 spinColorizeStrength->setEnabled( colorizeEnabled );
1216QLinearGradient QgsRasterLayerProperties::redGradient()
1220 QLinearGradient myGradient = QLinearGradient( mGradientWidth, 0, mGradientWidth, mGradientHeight );
1221 myGradient.setColorAt( 0.0, QColor( 242, 14, 25, 190 ) );
1222 myGradient.setColorAt( 0.5, QColor( 175, 29, 37, 190 ) );
1223 myGradient.setColorAt( 1.0, QColor( 114, 17, 22, 190 ) );
1226QLinearGradient QgsRasterLayerProperties::greenGradient()
1230 QLinearGradient myGradient = QLinearGradient( mGradientWidth, 0, mGradientWidth, mGradientHeight );
1231 myGradient.setColorAt( 0.0, QColor( 48, 168, 5, 190 ) );
1232 myGradient.setColorAt( 0.8, QColor( 36, 122, 4, 190 ) );
1233 myGradient.setColorAt( 1.0, QColor( 21, 71, 2, 190 ) );
1236QLinearGradient QgsRasterLayerProperties::blueGradient()
1240 QLinearGradient myGradient = QLinearGradient( mGradientWidth, 0, mGradientWidth, mGradientHeight );
1241 myGradient.setColorAt( 0.0, QColor( 30, 0, 106, 190 ) );
1242 myGradient.setColorAt( 0.2, QColor( 30, 72, 128, 190 ) );
1243 myGradient.setColorAt( 1.0, QColor( 30, 223, 196, 190 ) );
1246QLinearGradient QgsRasterLayerProperties::grayGradient()
1250 QLinearGradient myGradient = QLinearGradient( mGradientWidth, 0, mGradientWidth, mGradientHeight );
1251 myGradient.setColorAt( 0.0, QColor( 5, 5, 5, 190 ) );
1252 myGradient.setColorAt( 0.8, QColor( 122, 122, 122, 190 ) );
1253 myGradient.setColorAt( 1.0, QColor( 220, 220, 220, 190 ) );
1256QLinearGradient QgsRasterLayerProperties::highlightGradient()
1260 QLinearGradient myGradient = QLinearGradient( mGradientWidth, 0, mGradientWidth, mGradientHeight );
1261 myGradient.setColorAt( 1.0, QColor( 255, 255, 255, 50 ) );
1262 myGradient.setColorAt( 0.5, QColor( 255, 255, 255, 100 ) );
1263 myGradient.setColorAt( 0.0, QColor( 255, 255, 255, 150 ) );
1278void QgsRasterLayerProperties::restoreWindowModality()
1287void QgsRasterLayerProperties::toggleBuildPyramidsButton()
1289 if ( lbxPyramidResolutions->selectedItems().empty() )
1291 buttonBuildPyramids->setEnabled(
false );
1295 buttonBuildPyramids->setEnabled(
true );
1299void QgsRasterLayerProperties::mResetColorRenderingBtn_clicked()
1301 mBlendModeComboBox->setBlendMode( QPainter::CompositionMode_SourceOver );
1302 mSliderBrightness->setValue( 0 );
1303 mSliderContrast->setValue( 0 );
1304 mGammaSpinBox->setValue( 1.0 );
1305 sliderSaturation->setValue( 0 );
1307 mColorizeCheck->setChecked(
false );
1308 sliderColorizeStrength->setValue( 100 );
1309 mInvertColorsCheck->setChecked(
false );
1312bool QgsRasterLayerProperties::rasterIsMultiBandColor()
1317void QgsRasterLayerProperties::updateInformationContent()
1321 const QString html { mRasterLayer->
htmlMetadata().replace( QLatin1String(
"<head>" ), QStringLiteral( R
"raw(<head><style type="text/css">%1</style>)raw" ) ).arg( myStyle ) };
1322 mMetadataViewer->setHtml( html );
1323 mMetadataFilled = true;
1329 if ( mRasterAttributeTableWidget && mRasterAttributeTableWidget->isDirty() )
1331 mRasterAttributeTableWidget->setEditable(
false,
false );
1335 if ( mBackupCrs != mRasterLayer->
crs() )
1336 mRasterLayer->
setCrs( mBackupCrs );
1339void QgsRasterLayerProperties::showHelp()
1341 const QVariant helpPage = mOptionsStackedWidget->currentWidget()->property(
"helpPage" );
1343 if ( helpPage.isValid() )
1349 QgsHelp::openHelp( QStringLiteral(
"working_with_raster/raster_properties.html" ) );
1353void QgsRasterLayerProperties::updateGammaSpinBox(
int value )
1358void QgsRasterLayerProperties::updateGammaSlider(
double value )
1367 if ( obj == mMapTipPreviewContainer && ev->type() == QEvent::Resize )
1371 return QgsOptionsDialogBase::eventFilter( obj, ev );
1374void QgsRasterLayerProperties::initMapTipPreview()
1377 mMapTipSplitter->setSizes( { 400, 200 } );
1379 mMapTipPreviewContainer->installEventFilter(
this );
1383 mMapTipPreview =
new QgsWebView( mMapTipPreviewContainer );
1386 mMapTipPreview->page()->setLinkDelegationPolicy( QWebPage::DelegateAllLinks );
1387 mMapTipPreview->setContextMenuPolicy( Qt::NoContextMenu );
1388 connect( mMapTipPreview, &QWebView::loadFinished,
this, &QgsRasterLayerProperties::resizeMapTip );
1391 mMapTipPreview->page()->settings()->setAttribute( QWebSettings::DeveloperExtrasEnabled,
true );
1392 mMapTipPreview->page()->settings()->setAttribute( QWebSettings::JavascriptEnabled,
true );
1393 mMapTipPreview->page()->settings()->setAttribute( QWebSettings::LocalStorageEnabled,
true );
1396 mMapTipPreview->page()->mainFrame()->setScrollBarPolicy( Qt::Horizontal, Qt::ScrollBarAlwaysOff );
1397 mMapTipPreview->page()->mainFrame()->setScrollBarPolicy( Qt::Vertical, Qt::ScrollBarAlwaysOff );
1401 connect( mMapTipWidget, &QgsCodeEditorHTML::textChanged,
this, &QgsRasterLayerProperties::updateMapTipPreview );
1404void QgsRasterLayerProperties::updateMapTipPreview()
1406 mMapTipPreview->setMaximumSize( mMapTipPreviewContainer->width(), mMapTipPreviewContainer->height() );
1408 mMapTipPreview->setHtml( htmlContent );
1411void QgsRasterLayerProperties::resizeMapTip()
1414 mMapTipPreview->setMaximumSize( mMapTipPreviewContainer->width(), mMapTipPreviewContainer->height() );
1417 const QWebElement container = mMapTipPreview->page()->mainFrame()->findFirstElement(
1418 QStringLiteral(
"#QgsWebViewContainer" )
1420 const int width = container.geometry().width();
1421 const int height = container.geometry().height();
1422 mMapTipPreview->resize( width, height );
1425 mMapTipPreview->move( ( mMapTipPreviewContainer->width() - mMapTipPreview->width() ) / 2, ( mMapTipPreviewContainer->height() - mMapTipPreview->height() ) / 2 );
1428 mMapTipPreview->adjustSize();
@ BuildPyramids
Supports building of pyramids (overviews) (since QGIS 3.38 – this is a replacement for RasterInterfac...
@ SingleBandColorData
Single band containing color data.
RasterPyramidFormat
Raster pyramid formats.
@ GeoTiff
Geotiff .ovr (external)
@ Erdas
Erdas Image .aux (external)
@ SingleBandGray
A single band image drawn as a range of gray colors.
@ MultiBandColor
A layer containing 2 or more bands, mapped to RGB color space. In the case of a multiband with only t...
@ BuildPyramids
Supports building of pyramids (overviews) (Deprecated since QGIS 3.38 – use RasterProviderCapability:...
@ Size
Original data source size (and thus resolution) is known, it is not always available,...
@ ARGB32_Premultiplied
Color, alpha, red, green, blue, 4 bytes the same as QImage::Format_ARGB32_Premultiplied.
@ ARGB32
Color, alpha, red, green, blue, 4 bytes the same as QImage::Format_ARGB32.
@ Preferred
Preferred format, matching the most recent WKT ISO standard. Currently an alias to WKT2_2019,...
static QString reportStyleSheet(QgsApplication::StyleSheetType styleSheetType=QgsApplication::StyleSheetType::Qt)
Returns a css style sheet for reports, the styleSheetType argument determines what type of stylesheet...
static QgsRasterRendererRegistry * rasterRendererRegistry()
Returns the application's raster renderer registry, used for managing raster layer renderers.
@ WebBrowser
StyleSheet for embedded browsers (QtWebKit), supports full standard CSS.
static QIcon getThemeIcon(const QString &name, const QColor &fillColor=QColor(), const QColor &strokeColor=QColor())
Helper to get a theme icon.
Brightness/contrast and gamma correction filter pipe for rasters.
int contrast() const
Returns current contrast level.
int brightness() const
Returns current brightness level.
double gamma() const
Returns current gamma value.
void setGamma(double gamma)
Set gamma value.
void setContrast(int contrast)
Set contrast level.
void setBrightness(int brightness)
Set brightness level.
This class represents a coordinate reference system (CRS).
virtual QString name() const =0
Returns a provider name.
A generic dialog for building expression strings.
static QgsExpressionContextScope * projectScope(const QgsProject *project)
Creates a new scope which contains variables and functions relating to a QGIS project.
static QgsExpressionContextScope * atlasScope(const QgsLayoutAtlas *atlas)
Creates a new scope which contains variables and functions relating to a QgsLayoutAtlas.
static QgsExpressionContextScope * mapLayerPositionScope(const QgsPointXY &position)
Sets the expression context variables which are available for expressions triggered by moving the mou...
static QgsExpressionContextScope * mapSettingsScope(const QgsMapSettings &mapSettings)
Creates a new scope which contains variables and functions relating to a QgsMapSettings object.
static QgsExpressionContextScope * layerScope(const QgsMapLayer *layer)
Creates a new scope which contains variables and functions relating to a QgsMapLayer.
static QgsExpressionContextScope * globalScope()
Creates a new scope which contains variables and functions relating to the global QGIS context.
Expression contexts are used to encapsulate the parameters around which a QgsExpression should be eva...
static QString findAndSelectActiveExpression(QgsCodeEditor *editor, const QString &pattern=QString())
Find the expression under the cursor in the given editor and select it.
void progressChanged(double progress)
Emitted when the feedback object reports a progress change.
static QgsProviderSourceWidgetProviderRegistry * sourceWidgetProviderRegistry()
Returns the registry of provider source widget providers.
static void openHelp(const QString &key)
Opens help topic for the given help key using default system web browser.
Color and saturation filter pipe for rasters.
void setColorizeOn(bool colorizeOn)
void setSaturation(int saturation)
int colorizeStrength() const
bool invertColors() const
Returns true if the filter inverts colors.
void setGrayscaleMode(QgsHueSaturationFilter::GrayscaleMode grayscaleMode)
void setInvertColors(bool invertColors)
Sets whether the filter will invert colors.
QgsHueSaturationFilter::GrayscaleMode grayscaleMode() const
void setColorizeColor(const QColor &colorizeColor)
void setColorizeStrength(int colorizeStrength)
QColor colorizeColor() const
Base class for "layer properties" dialogs, containing common utilities for handling functionality in ...
QPushButton * mBtnStyle
Style button.
void saveMetadataToFile()
Allows the user to save the layer's metadata as a file.
virtual void rollback()
Rolls back changes made to the layer.
void optionsStackedWidget_CurrentChanged(int index) override
void saveStyleAsDefault()
Saves the current layer style as the default for the layer.
QList< QgsMapLayerConfigWidget * > mConfigWidgets
Layer config widgets.
void loadDefaultStyle()
Reloads the default style for the layer.
void saveStyleAs()
Saves a style when appriate button is pressed.
void loadStyle()
Triggers a dialog to load a saved style.
QgsMapCanvas * mCanvas
Associated map canvas.
void loadDefaultMetadata()
Reloads the default layer metadata for the layer.
void loadMetadataFromFile()
Allows the user to load layer metadata from a file.
void saveMetadataAsDefault()
Saves the current layer metadata as the default for the layer.
void openUrl(const QUrl &url)
Handles opening a url from the dialog.
The QgsLoadRasterAttributeTableDialog dialog let the user select a VAT.DBF file and associate the res...
void setOpenWhenDoneVisible(bool visible)
Sets the visibility of the "Open newly created raster attribute table" option to visible,...
Map canvas is a class for displaying all GIS data types on a canvas.
const QgsMapSettings & mapSettings() const
Gets access to properties used for map rendering.
QgsRectangle extent() const
Returns the current zoom extent of the map canvas.
static QgsMapLayerLegend * defaultRasterLegend(QgsRasterLayer *rl)
Create new legend implementation for raster layer.
void removesExtraMenuSeparators(QMenu *m)
removes extra separators from the menu
void addStyleManagerActions(QMenu *m, QgsMapLayer *layer)
adds actions to the menu in accordance to the layer
static QgsMapLayerStyleGuiUtils * instance()
returns a singleton instance of this class
void currentStyleChanged(const QString ¤tName)
Emitted when the current style has been changed.
Base class for all map layer types.
QString source() const
Returns the source for the layer.
Q_INVOKABLE QVariant customProperty(const QString &value, const QVariant &defaultValue=QVariant()) const
Read a custom property from layer.
QString providerType() const
Returns the provider type (provider key) for this layer.
void setBlendMode(QPainter::CompositionMode blendMode)
Set the blending mode used for rendering a layer.
void setMinimumScale(double scale)
Sets the minimum map scale (i.e.
QgsCoordinateReferenceSystem crs
QString legendPlaceholderImage() const
Returns path to the placeholder image or an empty string if a generated legend is shown.
QgsMapLayerServerProperties * serverProperties()
Returns QGIS Server Properties for the map layer.
void setDataSource(const QString &dataSource, const QString &baseName=QString(), const QString &provider=QString(), bool loadDefaultStyleFlag=false)
Updates the data source of the layer.
void triggerRepaint(bool deferredUpdate=false)
Will advise the map canvas (and any other interested party) that this layer requires to be repainted.
void setMaximumScale(double scale)
Sets the maximum map scale (i.e.
Q_INVOKABLE void setCustomProperty(const QString &key, const QVariant &value)
Set a custom property for layer.
void rendererChanged()
Signal emitted when renderer is changed.
void setScaleBasedVisibility(bool enabled)
Sets whether scale based visibility is enabled for the layer.
bool hasScaleBasedVisibility() const
Returns whether scale based visibility is enabled for the layer.
void emitStyleChanged()
Triggers an emission of the styleChanged() signal.
void setName(const QString &name)
Set the display name of the layer.
void setLegendPlaceholderImage(const QString &imgPath)
Set placeholder image for legend.
void setMapTipsEnabled(bool enabled)
Enable or disable map tips for this layer.
double minimumScale() const
Returns the minimum map scale (i.e.
QgsMapLayerStyleManager * styleManager() const
Gets access to the layer's style manager.
void setMapTipTemplate(const QString &mapTipTemplate)
The mapTip is a pretty, html representation for feature information.
void setLegend(QgsMapLayerLegend *legend)
Assign a legend controller to the map layer.
double maximumScale() const
Returns the maximum map scale (i.e.
void setCrs(const QgsCoordinateReferenceSystem &srs, bool emitSignal=true)
Sets layer's spatial reference system.
The QgsMapSettings class contains configuration for rendering of the map.
QgsRectangle outputExtentToLayerExtent(const QgsMapLayer *layer, QgsRectangle extent) const
transform bounding box from output CRS to layer's CRS
static QString rasterMapTipPreviewText(QgsMapLayer *layer, QgsMapCanvas *mapCanvas, const QString &mapTemplate)
Returns the html that would be displayed in a maptip for a given layer.
Renderer for multiband images with the color components.
void addPage(const QString &title, const QString &tooltip, const QIcon &icon, QWidget *widget, const QStringList &path=QStringList(), const QString &key=QString())
Adds a new page to the dialog pages.
QStackedWidget * mOptStackedWidget
void initOptionsBase(bool restoreUi=true, const QString &title=QString())
Set up the base ui connections for vertical tabs.
void insertPage(const QString &title, const QString &tooltip, const QIcon &icon, QWidget *widget, const QString &before, const QStringList &path=QStringList(), const QString &key=QString())
Inserts a new page into the dialog pages.
static bool layerIsContainedInGroupLayer(QgsProject *project, QgsMapLayer *layer)
Returns true if the specified layer is a child layer from any QgsGroupLayer in the given project.
static QgsProject * instance()
Returns the QgsProject singleton instance.
void setDirty(bool b=true)
Flag the project as dirty (modified).
void setProperty(int key, const QgsProperty &property)
Adds a property to the collection and takes ownership of it.
QgsProperty property(int key) const final
Returns a matching property from the collection, if one exists.
Base class for raster data providers.
virtual QString buildPyramids(const QList< QgsRasterPyramid > &pyramidList, const QString &resamplingMethod="NEAREST", Qgis::RasterPyramidFormat format=Qgis::RasterPyramidFormat::GeoTiff, const QStringList &configOptions=QStringList(), QgsRasterBlockFeedback *feedback=nullptr)
Creates pyramid overviews.
Qgis::DataType dataType(int bandNo) const override=0
Returns data type for the band specified by number.
virtual Qgis::RasterProviderCapabilities providerCapabilities() const
Returns flags containing the supported capabilities of the data provider.
static QList< QPair< QString, QString > > pyramidResamplingMethods(const QString &providerKey)
Returns a list of pyramid resampling method name and label pairs for given provider.
virtual QList< QgsRasterPyramid > buildPyramidList(const QList< int > &overviewList=QList< int >())
Returns the raster layers pyramid list.
virtual Qgis::RasterInterfaceCapabilities capabilities() const
Returns the capabilities supported by the interface.
Q_DECL_DEPRECATED void saveDefaultStyle()
Saves the default style when appropriate button is pressed.
QgsRasterLayerProperties(QgsMapLayer *lyr, QgsMapCanvas *canvas, QWidget *parent=nullptr, Qt::WindowFlags=QgsGuiUtils::ModalDialogFlags)
Constructor.
bool eventFilter(QObject *obj, QEvent *ev) override
QgsExpressionContext createExpressionContext() const override
This method needs to be reimplemented in all classes which implement this interface and return an exp...
void optionsStackedWidget_CurrentChanged(int index) FINAL
void addPropertiesPageFactory(const QgsMapLayerConfigWidgetFactory *factory) FINAL
Adds properties page from a factory.
Represents a raster layer.
QString htmlMetadata() const override
Obtain a formatted HTML string containing assorted metadata for this layer.
bool canCreateRasterAttributeTable()
Returns true if the raster renderer is suitable for creation of a raster attribute table.
int attributeTableCount() const
Returns the number of attribute tables for the raster by counting the number of bands that have an as...
QgsRasterPipe * pipe()
Returns the raster pipe.
QgsBrightnessContrastFilter * brightnessFilter() const
Returns the raster's brightness/contrast filter.
QgsRasterRenderer * renderer() const
Returns the raster's renderer.
QgsRasterDataProvider * dataProvider() override
Returns the source data provider.
void setRenderer(QgsRasterRenderer *renderer)
Sets the raster's renderer.
QgsHueSaturationFilter * hueSaturationFilter() const
Returns the raster's hue/saturation filter.
QgsPropertyCollection & dataDefinedProperties()
Returns a reference to the pipe's property collection, used for data defined overrides.
Property
Data definable properties.
@ RendererOpacity
Raster renderer global opacity.
static QgsPropertiesDefinition propertyDefinitions()
Returns the definitions for data defined properties available for use in raster pipes.
void setDataDefinedProperties(const QgsPropertyCollection &collection)
Sets the pipe's property collection, used for data defined overrides.
This struct is used to store pyramid info for the raster layer.
void insertWidgetFunction(const QString &rendererName, QgsRasterRendererWidgetCreateFunc func)
Sets the widget creation function for a renderer.
QStringList renderersList() const
Returns a list of the names of registered renderers.
Raster renderer pipe that applies colors to a raster.
QColor nodataColor() const
Returns the color to use for shading nodata pixels.
virtual QString type() const
Returns a unique string representation of the renderer type.
double opacity() const
Returns the opacity for the renderer, where opacity is a value between 0 (totally transparent) and 1....
virtual QList< int > usesBands() const
Returns a list of band numbers used by the renderer.
void setAlphaBand(int band)
void setOpacity(double opacity)
Sets the opacity for the renderer, where opacity is a value between 0 (totally transparent) and 1....
void setNodataColor(const QColor &color)
Sets the color to use for shading nodata pixels.
A rectangle specified with double values.
This class is a composition of two QSettings instances:
QVariant value(const QString &key, const QVariant &defaultValue=QVariant(), Section section=NoSection) const
Returns the value for setting key.
bool contains(const QString &key, QgsSettings::Section section=QgsSettings::NoSection) const
Returns true if there exists a setting called key; returns false otherwise.
void setValue(const QString &key, const QVariant &value, QgsSettings::Section section=QgsSettings::NoSection)
Sets the value of setting key to value.
The QgsWebView class is a collection of stubs to mimic the API of QWebView on systems where the real ...
QgsSignalBlocker< Object > whileBlocking(Object *object)
Temporarily blocks signals from a QObject while calling a single method from the object.
#define QgsDebugMsgLevel(str, level)
const QgsCoordinateReferenceSystem & crs
Setting options for creating vector data providers.
Registry for raster renderer entries.
QgsRasterRendererWidgetCreateFunc widgetCreateFunction