void QgsPolygon3DSymbolWidget::setSymbol( const QgsPolygon3DSymbol &symbol, QgsVectorLayer *layer )
{
  spinHeight->setValue( symbol.height() );
  spinExtrusion->setValue( symbol.extrusionHeight() );
  cboAltClamping->setCurrentIndex( static_cast<int>( symbol.altitudeClamping() ) );
  cboAltBinding->setCurrentIndex( static_cast<int>( symbol.altitudeBinding() ) );
  cboCullingMode->setCurrentIndex( static_cast<int>( symbol.cullingMode() ) );
  chkAddBackFaces->setChecked( symbol.addBackFaces() );
  chkInvertNormals->setChecked( symbol.invertNormals() );
  widgetMaterial->setMaterial( symbol.material() );

  btnHeightDD->init( QgsAbstract3DSymbol::PropertyHeight, symbol.dataDefinedProperties(), QgsAbstract3DSymbol::propertyDefinitions(), layer, true );
  btnExtrusionDD->init( QgsAbstract3DSymbol::PropertyExtrusionHeight, symbol.dataDefinedProperties(), QgsAbstract3DSymbol::propertyDefinitions(), layer, true );
}
Esempio n. 2
0
static QSet<QString> _requiredAttributes( const QgsPolygon3DSymbol &symbol, QgsVectorLayer *layer )
{
  QgsExpressionContext ctx( _expressionContext3D() );
  ctx.setFields( layer->fields() );
  //symbol.dataDefinedProperties().prepare( ctx );
  return symbol.dataDefinedProperties().referencedFields( ctx );
}