Skip to content
Permalink
Browse files

Improve vector field widget

  • Loading branch information
mhugent committed Nov 1, 2011
1 parent 59545f1 commit 68f7d57d3afa4111b85e00eeadbfd68f1b668f9d
@@ -109,9 +109,11 @@ void QgsVectorFieldSymbolLayer::renderPoint( const QPointF& point, QgsSymbolV2Re
convertPolarToCartesian( xVal, yVal, xComponent, yComponent );
xComponent = context.outputLineWidth( xComponent );
yComponent = context.outputLineWidth( yComponent );
break;
case Height:
xComponent = 0;
yComponent = context.outputLineWidth( yVal );
break;
default:
break;
}
@@ -140,6 +140,10 @@ void QgsVectorFieldSymbolLayerWidget::on_mCartesianRadioButton_toggled( bool che
if ( mLayer && checked )
{
mLayer->setVectorFieldType( QgsVectorFieldSymbolLayer::Cartesian );
mXAttributeComboBox->setEnabled( true );
mYAttributeComboBox->setEnabled( true );
mXAttributeLabel->setText( tr( "X attribute" ) );
mYAttributeLabel->setText( tr( "Y attribute" ) );
emit changed();
}
}
@@ -149,6 +153,10 @@ void QgsVectorFieldSymbolLayerWidget::on_mPolarRadioButton_toggled( bool checked
if ( mLayer && checked )
{
mLayer->setVectorFieldType( QgsVectorFieldSymbolLayer::Polar );
mXAttributeComboBox->setEnabled( true );
mYAttributeComboBox->setEnabled( true );
mXAttributeLabel->setText( tr( "Length attribute" ) );
mYAttributeLabel->setText( tr( "Angle attribute" ) );
emit changed();
}
}
@@ -158,6 +166,9 @@ void QgsVectorFieldSymbolLayerWidget::on_mHeightRadioButton_toggled( bool checke
if ( mLayer && checked )
{
mLayer->setVectorFieldType( QgsVectorFieldSymbolLayer::Height );
mXAttributeLabel->setText( "" );
mXAttributeComboBox->setEnabled( false );
mYAttributeLabel->setText( tr( "Height attribute" ) );
emit changed();
}
}
@@ -27,7 +27,7 @@
<item row="1" column="0">
<widget class="QLabel" name="mYAttributeLabel">
<property name="text">
<string>Y Attribute</string>
<string>Y attribute</string>
</property>
</widget>
</item>

0 comments on commit 68f7d57

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