QGIS API Documentation
3.6.0-Noosa (5873452)
|
Contains settings which reflect the context in which a symbol (or renderer) widget is shown, e.g., the map canvas and relevant expression contexts. More...
#include <qgssymbolwidgetcontext.h>
Public Member Functions | |
QgsSymbolWidgetContext ()=default | |
Constructor for QgsSymbolWidgetContext. More... | |
QgsSymbolWidgetContext (const QgsSymbolWidgetContext &other) | |
Copy constructor. More... | |
QList< QgsExpressionContextScope > | additionalExpressionContextScopes () const |
Returns the list of additional expression context scopes to show as available within the layer. More... | |
QgsExpressionContext * | expressionContext () const |
Returns the expression context used for the widget, if set. More... | |
QList< QgsExpressionContextScope * > | globalProjectAtlasMapLayerScopes (const QgsMapLayer *layer) const |
Returns list of scopes: global, project, atlas, map, layer. More... | |
QgsMapCanvas * | mapCanvas () const |
Returns the map canvas associated with the widget. More... | |
QgsMessageBar * | messageBar () const |
Returns the message bar associated with the widget. More... | |
QgsSymbolWidgetContext & | operator= (const QgsSymbolWidgetContext &other) |
void | setAdditionalExpressionContextScopes (const QList< QgsExpressionContextScope > &scopes) |
Sets a list of additional expression context scopes to show as available within the layer. More... | |
void | setExpressionContext (QgsExpressionContext *context) |
Sets the optional expression context used for the widget. More... | |
void | setMapCanvas (QgsMapCanvas *canvas) |
Sets the map canvas associated with the widget. More... | |
void | setMessageBar (QgsMessageBar *bar) |
Sets the message bar associated with the widget. More... | |
Contains settings which reflect the context in which a symbol (or renderer) widget is shown, e.g., the map canvas and relevant expression contexts.
Definition at line 35 of file qgssymbolwidgetcontext.h.
|
default |
Constructor for QgsSymbolWidgetContext.
QgsSymbolWidgetContext::QgsSymbolWidgetContext | ( | const QgsSymbolWidgetContext & | other | ) |
Copy constructor.
other | source QgsSymbolWidgetContext |
Definition at line 21 of file qgssymbolwidgetcontext.cpp.
QList< QgsExpressionContextScope > QgsSymbolWidgetContext::additionalExpressionContextScopes | ( | ) | const |
Returns the list of additional expression context scopes to show as available within the layer.
Definition at line 86 of file qgssymbolwidgetcontext.cpp.
QgsExpressionContext * QgsSymbolWidgetContext::expressionContext | ( | ) | const |
Returns the expression context used for the widget, if set.
This expression context is used for evaluating data defined symbol properties and for populating based expression widgets in the layer widget.
Definition at line 76 of file qgssymbolwidgetcontext.cpp.
QList< QgsExpressionContextScope * > QgsSymbolWidgetContext::globalProjectAtlasMapLayerScopes | ( | const QgsMapLayer * | layer | ) | const |
Returns list of scopes: global, project, atlas, map, layer.
Ownership is transferred to the caller.
Definition at line 91 of file qgssymbolwidgetcontext.cpp.
QgsMapCanvas * QgsSymbolWidgetContext::mapCanvas | ( | ) | const |
Returns the map canvas associated with the widget.
Definition at line 53 of file qgssymbolwidgetcontext.cpp.
QgsMessageBar * QgsSymbolWidgetContext::messageBar | ( | ) | const |
Returns the message bar associated with the widget.
Definition at line 63 of file qgssymbolwidgetcontext.cpp.
QgsSymbolWidgetContext & QgsSymbolWidgetContext::operator= | ( | const QgsSymbolWidgetContext & | other | ) |
Definition at line 32 of file qgssymbolwidgetcontext.cpp.
void QgsSymbolWidgetContext::setAdditionalExpressionContextScopes | ( | const QList< QgsExpressionContextScope > & | scopes | ) |
Sets a list of additional expression context scopes to show as available within the layer.
scopes | list of additional scopes which will be added in order to the end of the default expression context |
Definition at line 81 of file qgssymbolwidgetcontext.cpp.
void QgsSymbolWidgetContext::setExpressionContext | ( | QgsExpressionContext * | context | ) |
Sets the optional expression context used for the widget.
This expression context is used for evaluating data defined symbol properties and for populating based expression widgets in the layer widget.
context | expression context pointer. Ownership is not transferred. |
Definition at line 68 of file qgssymbolwidgetcontext.cpp.
void QgsSymbolWidgetContext::setMapCanvas | ( | QgsMapCanvas * | canvas | ) |
Sets the map canvas associated with the widget.
This allows the widget to retrieve the current map scale and other properties from the canvas.
canvas | map canvas |
Definition at line 48 of file qgssymbolwidgetcontext.cpp.
void QgsSymbolWidgetContext::setMessageBar | ( | QgsMessageBar * | bar | ) |
Sets the message bar associated with the widget.
This allows the widget to push feedback messages to the appropriate message bar.
Definition at line 58 of file qgssymbolwidgetcontext.cpp.