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 );
130void QgsSingleSymbolRendererWidget::changeSingleSymbol()
133 mRenderer->setSymbol( mSingleSymbol->clone() );
136 mRenderer->setUsingSymbolLevels(
true );
141void QgsSingleSymbolRendererWidget::showSymbolLevels()
146void QgsSingleSymbolRendererWidget::dataDefinedSizeLegend()
@ RendererShouldUseSymbolLevels
If present, indicates that a QgsFeatureRenderer using the symbol should use symbol levels for best re...
void copyRendererData(QgsFeatureRenderer *destRenderer) const
Clones generic renderer data to another renderer.
A marker symbol type, for rendering Point and MultiPoint geometries.
static QgsSingleSymbolRenderer * convertFromRenderer(const QgsFeatureRenderer *renderer)
Creates a new single symbol renderer from an existing renderer.
Contains settings which reflect the context in which a symbol (or renderer) widget is shown,...
Abstract base class for all rendered symbols.
static QgsSymbol * defaultSymbol(QgsWkbTypes::GeometryType geomType)
Returns a new default symbol for the specified geometry type.
Represents a vector layer which manages a vector based data sets.
Q_INVOKABLE QgsWkbTypes::GeometryType geometryType() const
Returns point, line or polygon.