51 mRenderer = std::make_unique< QgsSingleSymbolRenderer >( symbol );
56 mSingleSymbol.reset( mRenderer->symbol()->clone() );
63 QVBoxLayout *layout =
new QVBoxLayout(
this );
64 layout->setContentsMargins( 0, 0, 0, 0 );
65 layout->addWidget( mSelector );
70 mActionLevels = advMenu->addAction( tr(
"Symbol Levels…" ) );
71 connect( mActionLevels, &QAction::triggered,
this, &QgsSingleSymbolRendererWidget::showSymbolLevels );
74 QAction *actionDdsLegend = advMenu->addAction( tr(
"Data-defined Size Legend…" ) );
75 connect( actionDdsLegend, &QAction::triggered,
this, &QgsSingleSymbolRendererWidget::dataDefinedSizeLegend );
81 mSingleSymbol.reset();
89 return mRenderer.get();
108 delete mActionLevels;
109 mActionLevels =
nullptr;
114 mSingleSymbol.reset( levels.at( 0 ).symbol()->clone() );
121 mRenderer->setSymbol( mSingleSymbol->clone() );
122 mRenderer->setUsingSymbolLevels( enabled );
127 void QgsSingleSymbolRendererWidget::changeSingleSymbol()
130 mRenderer->setSymbol( mSingleSymbol->clone() );
133 mRenderer->setUsingSymbolLevels(
true );
138 void QgsSingleSymbolRendererWidget::showSymbolLevels()
143 void QgsSingleSymbolRendererWidget::dataDefinedSizeLegend()
@ RendererShouldUseSymbolLevels
If present, indicates that a QgsFeatureRenderer using the symbol should use symbol levels for best re...
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.