38 setFromRenderer( layer->
renderer() );
41 connect( mFillSymbolButton, &
QgsSymbolButton::changed,
this, &QgsTiledSceneWireframeRendererWidget::emitWidgetChanged );
42 connect( mLineSymbolButton, &
QgsSymbolButton::changed,
this, &QgsTiledSceneWireframeRendererWidget::emitWidgetChanged );
43 connect( mCheckUseTextureColors, &QCheckBox::toggled,
this, &QgsTiledSceneWireframeRendererWidget::emitWidgetChanged );
48 return new QgsTiledSceneWireframeRendererWidget( layer, style );
53 std::unique_ptr< QgsTiledSceneWireframeRenderer > renderer = std::make_unique< QgsTiledSceneWireframeRenderer >();
54 renderer->setFillSymbol( mFillSymbolButton->clonedSymbol<
QgsFillSymbol >() );
55 renderer->setLineSymbol( mLineSymbolButton->clonedSymbol<
QgsLineSymbol >() );
56 renderer->setUseTextureColors( mCheckUseTextureColors->isChecked() );
58 return renderer.release();
61void QgsTiledSceneWireframeRendererWidget::emitWidgetChanged()
63 if ( !mBlockChangedSignal )
69 mBlockChangedSignal =
true;
72 mFillSymbolButton->setSymbol( wireframeRenderer->fillSymbol()->clone() );
73 mLineSymbolButton->setSymbol( wireframeRenderer->lineSymbol()->clone() );
74 mCheckUseTextureColors->setChecked( wireframeRenderer->useTextureColors() );
77 mBlockChangedSignal =
false;
A fill symbol type, for rendering Polygon and MultiPolygon geometries.
A line symbol type, for rendering LineString and MultiLineString geometries.
Represents a map layer supporting display of tiled scene objects.
QgsTiledSceneRenderer * renderer()
Returns the 2D renderer for the tiled scene.
Abstract base class for 2d tiled scene renderers.
Renders tiled scene layers using the raw primitive wireframes.
static QgsLineSymbol * createDefaultLineSymbol()
Returns a copy of the default line symbol used to render lines in the wireframe.
static QgsFillSymbol * createDefaultFillSymbol()
Returns a copy of the default fill symbol used to render triangles in the wireframe.