[QGIS Commit] r13147 - trunk/qgis/src/plugins/point_displacement_renderer

svn_qgis at osgeo.org svn_qgis at osgeo.org
Tue Mar 23 11:34:38 EDT 2010


Author: mhugent
Date: 2010-03-23 11:34:38 -0400 (Tue, 23 Mar 2010)
New Revision: 13147

Modified:
   trunk/qgis/src/plugins/point_displacement_renderer/qgspointdisplacementrenderer.cpp
   trunk/qgis/src/plugins/point_displacement_renderer/qgspointdisplacementrendererwidget.cpp
   trunk/qgis/src/plugins/point_displacement_renderer/qgspointdisplacementrendererwidget.h
   trunk/qgis/src/plugins/point_displacement_renderer/qgspointdisplacementrendererwidgetbase.ui
Log:
Add distance parameter for point displacement to the gui

Modified: trunk/qgis/src/plugins/point_displacement_renderer/qgspointdisplacementrenderer.cpp
===================================================================
--- trunk/qgis/src/plugins/point_displacement_renderer/qgspointdisplacementrenderer.cpp	2010-03-23 15:31:21 UTC (rev 13146)
+++ trunk/qgis/src/plugins/point_displacement_renderer/qgspointdisplacementrenderer.cpp	2010-03-23 15:34:38 UTC (rev 13147)
@@ -58,6 +58,7 @@
   r->setLabelColor( mLabelColor );
   r->setCircleRadiusAddition( mCircleRadiusAddition );
   r->setMaxLabelScaleDenominator( mMaxLabelScaleDenominator );
+  r->setTolerance( mTolerance );
   if ( mCenterSymbol )
   {
     r->setCenterSymbol( dynamic_cast<QgsMarkerSymbolV2*>( mCenterSymbol->clone() ) );

Modified: trunk/qgis/src/plugins/point_displacement_renderer/qgspointdisplacementrendererwidget.cpp
===================================================================
--- trunk/qgis/src/plugins/point_displacement_renderer/qgspointdisplacementrendererwidget.cpp	2010-03-23 15:31:21 UTC (rev 13146)
+++ trunk/qgis/src/plugins/point_displacement_renderer/qgspointdisplacementrendererwidget.cpp	2010-03-23 15:34:38 UTC (rev 13147)
@@ -98,6 +98,7 @@
   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 @@
   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 @@
   mScaleDependentLabelsCheckBox->blockSignals( block );
   mMaxScaleDenominatorEdit->blockSignals( block );
   mCenterSymbolPushButton->blockSignals( block );
+  mDistanceSpinBox->blockSignals( block );
 }
 
 void QgsPointDisplacementRendererWidget::on_mCenterSymbolPushButton_clicked()

Modified: trunk/qgis/src/plugins/point_displacement_renderer/qgspointdisplacementrendererwidget.h
===================================================================
--- trunk/qgis/src/plugins/point_displacement_renderer/qgspointdisplacementrendererwidget.h	2010-03-23 15:31:21 UTC (rev 13146)
+++ trunk/qgis/src/plugins/point_displacement_renderer/qgspointdisplacementrendererwidget.h	2010-03-23 15:34:38 UTC (rev 13147)
@@ -47,6 +47,7 @@
     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 );

Modified: trunk/qgis/src/plugins/point_displacement_renderer/qgspointdisplacementrendererwidgetbase.ui
===================================================================
--- trunk/qgis/src/plugins/point_displacement_renderer/qgspointdisplacementrendererwidgetbase.ui	2010-03-23 15:31:21 UTC (rev 13146)
+++ trunk/qgis/src/plugins/point_displacement_renderer/qgspointdisplacementrendererwidgetbase.ui	2010-03-23 15:34:38 UTC (rev 13147)
@@ -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>



More information about the QGIS-commit mailing list