20 : mMapCanvas( other.mMapCanvas )
21 , mAdditionalScopes( other.mAdditionalScopes )
23 if ( other.mExpressionContext )
31 mMapCanvas = other.mMapCanvas;
32 mAdditionalScopes = other.mAdditionalScopes;
33 if ( other.mExpressionContext )
39 mExpressionContext.reset();
59 mExpressionContext.reset();
64 return mExpressionContext.get();
69 mAdditionalScopes = scopes;
74 return mAdditionalScopes;
79 QList<QgsExpressionContextScope *> scopes;
Base class for all map layer types.
QgsSymbolWidgetContext & operator=(const QgsSymbolWidgetContext &other)
const QgsMapSettings & mapSettings() const
Gets access to properties used for map rendering.
static QgsExpressionContextScope * projectScope(const QgsProject *project)
Creates a new scope which contains variables and functions relating to a QGIS project.
void setMapCanvas(QgsMapCanvas *canvas)
Sets the map canvas associated with the widget.
QgsMapCanvas * mapCanvas() const
Returns the map canvas associated with the widget.
Map canvas is a class for displaying all GIS data types on a canvas.
QgsExpressionContextScope * defaultExpressionContextScope()
Creates a new scope which contains default variables and functions relating to the map canvas...
The QgsMapSettings class contains configuration for rendering of the map.
static QgsExpressionContextScope * globalScope()
Creates a new scope which contains variables and functions relating to the global QGIS context...
Contains settings which reflect the context in which a symbol (or renderer) widget is shown...
Expression contexts are used to encapsulate the parameters around which a QgsExpression should be eva...
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.
void setAdditionalExpressionContextScopes(const QList< QgsExpressionContextScope > &scopes)
Sets a list of additional expression context scopes to show as available within the layer...
void setExpressionContext(QgsExpressionContext *context)
Sets the optional expression context used for the widget.
QgsSymbolWidgetContext()=default
Constructor for QgsSymbolWidgetContext.
static QgsExpressionContextScope * atlasScope(QgsLayoutAtlas *atlas)
Creates a new scope which contains variables and functions relating to a QgsLayoutAtlas.
static QgsExpressionContextScope * mapSettingsScope(const QgsMapSettings &mapSettings)
Creates a new scope which contains variables and functions relating to a QgsMapSettings object...
QgsExpressionContextScope & expressionContextScope()
Returns a reference to the expression context scope for the map canvas.
static QgsProject * instance()
Returns the QgsProject singleton instance.
QList< QgsExpressionContextScope > additionalExpressionContextScopes() const
Returns the list of additional expression context scopes to show as available within the layer...
QList< QgsExpressionContextScope * > globalProjectAtlasMapLayerScopes(const QgsMapLayer *layer) const
Returns list of scopes: global, project, atlas, map, layer.
static QgsExpressionContextScope * layerScope(const QgsMapLayer *layer)
Creates a new scope which contains variables and functions relating to a QgsMapLayer.