QGIS API Documentation
3.26.3-Buenos Aires (65e4edfdad)
|
Go to the documentation of this file.
44 mRenderer.reset(
nullptr );
45 QGridLayout *layout =
new QGridLayout(
this );
46 QLabel *label =
new QLabel( tr(
"The embedded symbols renderer can only be used with layers\n"
47 "containing embedded styling information.\n\n"
48 "'%1' does not contain embedded styling and cannot be displayed." )
49 .arg( layer->
name() ),
this );
50 this->setLayout( layout );
51 layout->addWidget( label );
52 mDefaultSymbolToolButton =
nullptr;
73 mDefaultSymbolToolButton->setSymbol( mRenderer->defaultSymbol()->clone() );
74 mDefaultSymbolToolButton->setDialogTitle( tr(
"Default symbol" ) );
75 mDefaultSymbolToolButton->setLayer(
mLayer );
76 mDefaultSymbolToolButton->registerExpressionContextGenerator(
this );
80 mRenderer->setDefaultSymbol( mDefaultSymbolToolButton->symbol()->clone() );
89 return mRenderer.get();
95 if ( mDefaultSymbolToolButton )
void copyRendererData(QgsFeatureRenderer *destRenderer) const
Clones generic renderer data to another renderer.
QList< QgsExpressionContextScope * > globalProjectAtlasMapLayerScopes(const QgsMapLayer *layer) const
Returns list of scopes: global, project, atlas, map, layer.
Expression contexts are used to encapsulate the parameters around which a QgsExpression should be eva...
QgsMapCanvas * mapCanvas() const
Returns the map canvas associated with the widget.
Q_INVOKABLE QgsWkbTypes::Type wkbType() const FINAL
Returns the WKBType or WKBUnknown in case of error.
QgsVectorDataProvider * dataProvider() FINAL
Returns the layer's data provider, it may be nullptr.
static QgsSymbol * defaultSymbol(QgsWkbTypes::GeometryType geomType)
Returns a new default symbol for the specified geometry type.
Contains settings which reflect the context in which a symbol (or renderer) widget is shown,...
static Qgis::SymbolType symbolTypeForGeometryType(QgsWkbTypes::GeometryType type)
Returns the default symbol type required for the specified geometry type.
@ FeatureSymbology
Provider is able retrieve embedded symbology associated with individual features. Since QGIS 3....
virtual Q_INVOKABLE QgsVectorDataProvider::Capabilities capabilities() const
Returns flags containing the supported capabilities.
static QgsEmbeddedSymbolRenderer * convertFromRenderer(const QgsFeatureRenderer *renderer)
Creates a QgsEmbeddedSymbolRenderer from an existing renderer.
QgsExpressionContext * expressionContext() const
Returns the expression context used for the widget, if set.
Single scope for storing variables and functions for use within a QgsExpressionContext....
GeometryType
The geometry types are used to group QgsWkbTypes::Type in a coarse way.
A vector feature renderer which uses embedded feature symbology to render per-feature symbols.
Represents a vector layer which manages a vector based data sets.
static GeometryType geometryType(Type type) SIP_HOLDGIL
Returns the geometry type for a WKB type, e.g., both MultiPolygon and CurvePolygon would have a Polyg...
QgsMessageBar * messageBar() const
Returns the message bar associated with the widget.
QList< QgsExpressionContextScope > additionalExpressionContextScopes() const
Returns the list of additional expression context scopes to show as available within the layer.