45 QGridLayout* layout =
new QGridLayout(
this );
46 QLabel* label =
new QLabel(
tr(
"The inverted polygon renderer only applies to polygon and multipolygon layers. \n"
47 "'%1' is not a polygon layer and then cannot be displayed" )
48 .arg( layer->
name() ),
this );
49 layout->addWidget( label );
65 mMergePolygonsCheckBox->blockSignals(
true );
66 mMergePolygonsCheckBox->setCheckState(
mRenderer->preprocessingEnabled() ? Qt::Checked : Qt::Unchecked );
67 mMergePolygonsCheckBox->blockSignals(
false );
69 int currentEmbeddedIdx = 0;
72 QStringList::const_iterator it = rendererList.constBegin();
74 mRendererComboBox->blockSignals(
true );
75 for ( ; it != rendererList.constEnd(); ++it, ++idx )
77 if (( *it !=
"invertedPolygonRenderer" ) &&
78 ( *it !=
"pointDisplacement" ) )
83 if ( embeddedRenderer && embeddedRenderer->
type() == m->
name() )
86 currentEmbeddedIdx = idx;
90 mRendererComboBox->blockSignals(
false );
92 int oldIdx = mRendererComboBox->currentIndex();
93 mRendererComboBox->setCurrentIndex( currentEmbeddedIdx );
94 if ( oldIdx == currentEmbeddedIdx )
97 on_mRendererComboBox_currentIndexChanged( currentEmbeddedIdx );
106 if ( embeddedRenderer )
114 void QgsInvertedPolygonRendererWidget::on_mRendererComboBox_currentIndexChanged(
int index )
116 QString rendererId = mRendererComboBox->itemData( index ).toString();
122 if ( mLayout->count() > 2 )
125 mLayout->takeAt( 2 );
131 void QgsInvertedPolygonRendererWidget::on_mMergePolygonsCheckBox_stateChanged(
int state )
133 mRenderer->setPreprocessingEnabled( state == Qt::Checked );