Ejemplo n.º 1
0
void QgsGraduatedSymbolRenderer::toSld( QDomDocument &doc, QDomElement &element, const QgsStringMap &props ) const
{
  QgsStringMap newProps = props;
  newProps[ QStringLiteral( "attribute" )] = mAttrName;
  newProps[ QStringLiteral( "method" )] = graduatedMethodStr( mGraduatedMethod );

  // create a Rule for each range
  bool first = true;
  for ( QgsRangeList::const_iterator it = mRanges.constBegin(); it != mRanges.constEnd(); ++it )
  {
    it->toSld( doc, element, newProps, first );
    first = false;
  }
}
Ejemplo n.º 2
0
void QgsGraduatedSymbolRenderer::toSld( QDomDocument& doc, QDomElement &element, QgsStringMap props ) const
{
  props[ "attribute" ] = mAttrName;
  props[ "method" ] = graduatedMethodStr( mGraduatedMethod );

  // create a Rule for each range
  bool first = true;
  for ( QgsRangeList::const_iterator it = mRanges.constBegin(); it != mRanges.constEnd(); ++it )
  {
    QgsStringMap catProps( props );
    it->toSld( doc, element, catProps, first );
    first = false;
  }
}
Ejemplo n.º 3
0
void QgsGraduatedSymbolRendererV2::toSld( QDomDocument& doc, QDomElement &element ) const
{
  QgsStringMap props;
  props[ "attribute" ] = mAttrName;
  if ( mRotation.data() )
    props[ "angle" ] = mRotation->expression();
  if ( mSizeScale.data() )
    props[ "scale" ] = mSizeScale->expression();

  // create a Rule for each range
  for ( QgsRangeList::const_iterator it = mRanges.constBegin(); it != mRanges.constEnd(); ++it )
  {
    QgsStringMap catProps( props );
    it->toSld( doc, element, catProps );
  }
}
void QgsGraduatedSymbolRendererV2::toSld( QDomDocument& doc, QDomElement &element ) const
{
  QgsStringMap props;
  props[ "attribute" ] = mAttrName;
  if ( !mRotationField.isEmpty() )
    props[ "angle" ] = QString( mRotationField ).append( "\"" ).prepend( "\"" );
  if ( !mSizeScaleField.isEmpty() )
    props[ "scale" ] = QString( mSizeScaleField ).append( "\"" ).prepend( "\"" );

  // create a Rule for each range
  for ( QgsRangeList::const_iterator it = mRanges.constBegin(); it != mRanges.constEnd(); it++ )
  {
    QgsStringMap catProps( props );
    it->toSld( doc, element, catProps );
  }
}