Skip to content
Permalink
Browse files

Add distance parameter for point displacement to the gui

git-svn-id: http://svn.osgeo.org/qgis/trunk@13147 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent
mhugent committed Mar 23, 2010
1 parent fd17345 commit 280ec8d5319a13fb94afca241e172e707c02a3be
@@ -58,6 +58,7 @@ QgsFeatureRendererV2* QgsPointDisplacementRenderer::clone()
r->setLabelColor( mLabelColor );
r->setCircleRadiusAddition( mCircleRadiusAddition );
r->setMaxLabelScaleDenominator( mMaxLabelScaleDenominator );
r->setTolerance( mTolerance );
if ( mCenterSymbol )
{
r->setCenterSymbol( dynamic_cast<QgsMarkerSymbolV2*>( mCenterSymbol->clone() ) );
@@ -98,6 +98,7 @@ QgsPointDisplacementRendererWidget::QgsPointDisplacementRendererWidget( QgsVecto
mCircleColorButton->setColor( mRenderer->circleColor() );
mLabelColorButton->setColor( mRenderer->labelColor() );
mCircleModificationSpinBox->setValue( mRenderer->circleRadiusAddition() );
mDistanceSpinBox->setValue( mRenderer->tolerance() );

//scale dependent labelling
mMaxScaleDenominatorEdit->setText( QString::number( mRenderer->maxLabelScaleDenominator() ) );
@@ -265,6 +266,14 @@ void QgsPointDisplacementRendererWidget::on_mCircleModificationSpinBox_valueChan
mRenderer->setCircleRadiusAddition( d );
}

void QgsPointDisplacementRendererWidget::on_mDistanceSpinBox_valueChanged( double d )
{
if ( mRenderer )
{
mRenderer->setTolerance( d );
}
}

void QgsPointDisplacementRendererWidget::on_mScaleDependentLabelsCheckBox_stateChanged( int state )
{
if ( state == Qt::Unchecked )
@@ -305,6 +314,7 @@ void QgsPointDisplacementRendererWidget::blockAllSignals( bool block )
mScaleDependentLabelsCheckBox->blockSignals( block );
mMaxScaleDenominatorEdit->blockSignals( block );
mCenterSymbolPushButton->blockSignals( block );
mDistanceSpinBox->blockSignals( block );
}

void QgsPointDisplacementRendererWidget::on_mCenterSymbolPushButton_clicked()
@@ -47,6 +47,7 @@ class QgsPointDisplacementRendererWidget: public QgsRendererV2Widget, private Ui
void on_mLabelFontButton_clicked();
void on_mCircleWidthSpinBox_valueChanged( double d );
void on_mCircleColorButton_clicked();
void on_mDistanceSpinBox_valueChanged( double d );
void on_mLabelColorButton_clicked();
void on_mCircleModificationSpinBox_valueChanged( double d );
void on_mScaleDependentLabelsCheckBox_stateChanged( int state );
@@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>328</width>
<height>469</height>
<width>327</width>
<height>505</height>
</rect>
</property>
<property name="windowTitle">
@@ -115,6 +115,27 @@
</item>
</layout>
</item>
<item row="3" column="0">
<layout class="QHBoxLayout" name="horizontalLayout_10">
<item>
<widget class="QLabel" name="mDistanceToleranceLabel">
<property name="text">
<string>Point distance tolerance:</string>
</property>
</widget>
</item>
<item>
<widget class="QDoubleSpinBox" name="mDistanceSpinBox">
<property name="decimals">
<number>7</number>
</property>
<property name="maximum">
<double>9999.000000000000000</double>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
</item>

0 comments on commit 280ec8d

Please sign in to comment.
You can’t perform that action at this time.