QGIS API Documentation
3.26.3-Buenos Aires (65e4edfdad)
|
Go to the documentation of this file.
51 mRenderer = std::make_unique< QgsSingleSymbolRenderer >( symbol );
59 mSingleSymbol.reset( mRenderer->symbol()->clone() );
66 QVBoxLayout *layout =
new QVBoxLayout(
this );
67 layout->setContentsMargins( 0, 0, 0, 0 );
68 layout->addWidget( mSelector );
73 mActionLevels = advMenu->addAction( tr(
"Symbol Levels…" ) );
74 connect( mActionLevels, &QAction::triggered,
this, &QgsSingleSymbolRendererWidget::showSymbolLevels );
77 QAction *actionDdsLegend = advMenu->addAction( tr(
"Data-defined Size Legend…" ) );
78 connect( actionDdsLegend, &QAction::triggered,
this, &QgsSingleSymbolRendererWidget::dataDefinedSizeLegend );
84 mSingleSymbol.reset();
92 return mRenderer.get();
111 delete mActionLevels;
112 mActionLevels =
nullptr;
117 mSingleSymbol.reset( levels.at( 0 ).symbol()->clone() );
124 mRenderer->setSymbol( mSingleSymbol->clone() );
125 mRenderer->setUsingSymbolLevels( enabled );
130 void QgsSingleSymbolRendererWidget::changeSingleSymbol()
133 mRenderer->setSymbol( mSingleSymbol->clone() );
136 mRenderer->setUsingSymbolLevels(
true );
141 void QgsSingleSymbolRendererWidget::showSymbolLevels()
146 void QgsSingleSymbolRendererWidget::dataDefinedSizeLegend()
154 mRenderer->setDataDefinedSizeLegend( panel->dataDefinedSizeLegend() );
void copyRendererData(QgsFeatureRenderer *destRenderer) const
Clones generic renderer data to another renderer.
static QgsSingleSymbolRenderer * convertFromRenderer(const QgsFeatureRenderer *renderer)
Creates a new single symbol renderer from an existing renderer.
static QgsSymbol * defaultSymbol(QgsWkbTypes::GeometryType geomType)
Returns a new default symbol for the specified geometry type.
@ RendererShouldUseSymbolLevels
If present, indicates that a QgsFeatureRenderer using the symbol should use symbol levels for best re...
Contains settings which reflect the context in which a symbol (or renderer) widget is shown,...
Abstract base class for all rendered symbols.
A marker symbol type, for rendering Point and MultiPoint geometries.
Represents a vector layer which manages a vector based data sets.
Q_INVOKABLE QgsWkbTypes::GeometryType geometryType() const
Returns point, line or polygon.