QGIS API Documentation 3.40.0-Bratislava (b56115d8743)
|
Contains settings which reflect the context in which a Processing parameter widget is shown, e.g., the parent model algorithm, a linked map canvas, and other relevant information which allows the widget to fine-tune its behavior. More...
#include <qgsprocessingwidgetwrapper.h>
Public Member Functions | |
QgsProcessingParameterWidgetContext ()=default | |
QgsMapLayer * | activeLayer () const |
Returns the current active layer. | |
QgsBrowserGuiModel * | browserModel () const |
Returns the browser model associated with the widget. | |
QgsMapCanvas * | mapCanvas () const |
Returns the map canvas associated with the widget. | |
QgsMessageBar * | messageBar () const |
Returns the message bar associated with the widget. | |
QgsProcessingModelAlgorithm * | model () const |
Returns the model which the parameter widget is associated with. | |
QString | modelChildAlgorithmId () const |
Returns the child algorithm ID within the model which the parameter widget is associated with. | |
QgsProject * | project () const |
Returns the project associated with the widget. | |
void | setActiveLayer (QgsMapLayer *layer) |
Sets the current active layer. | |
void | setBrowserModel (QgsBrowserGuiModel *model) |
Sets the browser model associated with the widget. | |
void | setMapCanvas (QgsMapCanvas *canvas) |
Sets the map canvas associated with the widget. | |
void | setMessageBar (QgsMessageBar *bar) |
Sets the message bar associated with the widget. | |
void | setModel (QgsProcessingModelAlgorithm *model) |
Sets the model which the parameter widget is associated with. | |
void | setModelChildAlgorithmId (const QString &id) |
Sets the child algorithm id within the model which the parameter widget is associated with. | |
void | setProject (QgsProject *project) |
Sets the project associated with the widget. | |
Contains settings which reflect the context in which a Processing parameter widget is shown, e.g., the parent model algorithm, a linked map canvas, and other relevant information which allows the widget to fine-tune its behavior.
Definition at line 114 of file qgsprocessingwidgetwrapper.h.
|
default |
QgsMapLayer * QgsProcessingParameterWidgetContext::activeLayer | ( | ) | const |
Returns the current active layer.
Definition at line 83 of file qgsprocessingwidgetwrapper.cpp.
QgsBrowserGuiModel * QgsProcessingParameterWidgetContext::browserModel | ( | ) | const |
Returns the browser model associated with the widget.
Definition at line 58 of file qgsprocessingwidgetwrapper.cpp.
QgsMapCanvas * QgsProcessingParameterWidgetContext::mapCanvas | ( | ) | const |
Returns the map canvas associated with the widget.
Definition at line 38 of file qgsprocessingwidgetwrapper.cpp.
QgsMessageBar * QgsProcessingParameterWidgetContext::messageBar | ( | ) | const |
Returns the message bar associated with the widget.
This allows the widget to push feedback messages to the user.
Definition at line 48 of file qgsprocessingwidgetwrapper.cpp.
QgsProcessingModelAlgorithm * QgsProcessingParameterWidgetContext::model | ( | ) | const |
Returns the model which the parameter widget is associated with.
Definition at line 93 of file qgsprocessingwidgetwrapper.cpp.
QString QgsProcessingParameterWidgetContext::modelChildAlgorithmId | ( | ) | const |
Returns the child algorithm ID within the model which the parameter widget is associated with.
Definition at line 73 of file qgsprocessingwidgetwrapper.cpp.
QgsProject * QgsProcessingParameterWidgetContext::project | ( | ) | const |
Returns the project associated with the widget.
Definition at line 68 of file qgsprocessingwidgetwrapper.cpp.
void QgsProcessingParameterWidgetContext::setActiveLayer | ( | QgsMapLayer * | layer | ) |
Sets the current active layer.
Definition at line 88 of file qgsprocessingwidgetwrapper.cpp.
void QgsProcessingParameterWidgetContext::setBrowserModel | ( | QgsBrowserGuiModel * | model | ) |
Sets the browser model associated with the widget.
This will usually be the shared app instance of the browser model
Definition at line 53 of file qgsprocessingwidgetwrapper.cpp.
void QgsProcessingParameterWidgetContext::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.
Definition at line 33 of file qgsprocessingwidgetwrapper.cpp.
void QgsProcessingParameterWidgetContext::setMessageBar | ( | QgsMessageBar * | bar | ) |
Sets the message bar associated with the widget.
This allows the widget to push feedback messages to the user.
Definition at line 43 of file qgsprocessingwidgetwrapper.cpp.
void QgsProcessingParameterWidgetContext::setModel | ( | QgsProcessingModelAlgorithm * | model | ) |
Sets the model which the parameter widget is associated with.
Definition at line 98 of file qgsprocessingwidgetwrapper.cpp.
void QgsProcessingParameterWidgetContext::setModelChildAlgorithmId | ( | const QString & | id | ) |
Sets the child algorithm id within the model which the parameter widget is associated with.
Definition at line 78 of file qgsprocessingwidgetwrapper.cpp.
void QgsProcessingParameterWidgetContext::setProject | ( | QgsProject * | project | ) |
Sets the project associated with the widget.
This allows the widget to retrieve the map layers and other properties from the correct project.
Definition at line 63 of file qgsprocessingwidgetwrapper.cpp.