27 #include <QGridLayout>
48 QGridLayout* layout =
new QGridLayout(
this );
49 QLabel* label =
new QLabel(
tr(
"The heatmap renderer only applies to point and multipoint layers. \n"
50 "'%1' is not a point layer and cannot be rendered as a heatmap." )
51 .arg( layer->
name() ),
this );
52 layout->addWidget( label );
57 mRadiusUnitWidget->setUnits( QStringList() <<
tr(
"Pixels" ) <<
tr(
"Millimeter" ) <<
tr(
"Map unit" ), 2 );
68 mRampComboBox->setShowGradientOnly(
true );
70 connect( mRampComboBox, SIGNAL( currentIndexChanged(
int ) ),
this, SLOT( applyColorRamp() ) );
73 mRampComboBox->blockSignals(
true );
75 mRampComboBox->blockSignals(
false );
77 mRadiusSpinBox->blockSignals(
true );
79 mRadiusSpinBox->blockSignals(
false );
80 mRadiusUnitWidget->blockSignals(
true );
84 mRadiusUnitWidget->setUnit( 1 );
87 mRadiusUnitWidget->setUnit( 2 );
91 mRadiusUnitWidget->setUnit( 0 );
95 mRadiusUnitWidget->blockSignals(
false );
96 mMaxSpinBox->blockSignals(
true );
98 mMaxSpinBox->blockSignals(
false );
99 mQualitySlider->blockSignals(
true );
101 mQualitySlider->blockSignals(
false );
102 mInvertCheckBox->blockSignals(
true );
104 mInvertCheckBox->blockSignals(
false );
106 mWeightExpressionWidget->setLayer( layer );
108 connect( mWeightExpressionWidget, SIGNAL( fieldChanged( QString ) ),
this, SLOT( weightExpressionChanged( QString ) ) );
116 void QgsHeatmapRendererWidget::applyColorRamp()
130 void QgsHeatmapRendererWidget::on_mButtonEditRamp_clicked()
138 if ( dlg.exec() && gradRamp )
141 mRampComboBox->blockSignals(
true );
143 mRampComboBox->blockSignals(
false );
152 void QgsHeatmapRendererWidget::on_mRadiusUnitWidget_changed()
159 switch ( mRadiusUnitWidget->getUnit() )
177 void QgsHeatmapRendererWidget::on_mRadiusSpinBox_valueChanged(
double d )
187 void QgsHeatmapRendererWidget::on_mMaxSpinBox_valueChanged(
double d )
197 void QgsHeatmapRendererWidget::on_mQualitySlider_valueChanged(
int v )
207 void QgsHeatmapRendererWidget::on_mInvertCheckBox_toggled(
bool v )
217 void QgsHeatmapRendererWidget::weightExpressionChanged( QString expression )