QGIS API Documentation
3.10.0-A Coruña (6c816b4204)
|
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 | |
Constructor for QgsProcessingParameterWidgetContext. More... | |
QgsMapCanvas * | mapCanvas () const |
Returns the map canvas associated with the widget. More... | |
QgsProcessingModelAlgorithm * | model () const |
Returns the model which the parameter widget is associated with. More... | |
QString | modelChildAlgorithmId () const |
Returns the child algorithm ID within the model which the parameter widget is associated with. More... | |
QgsProject * | project () const |
Returns the project associated with the widget. More... | |
void | setMapCanvas (QgsMapCanvas *canvas) |
Sets the map canvas associated with the widget. More... | |
void | setModel (QgsProcessingModelAlgorithm *model) |
Sets the model which the parameter widget is associated with. More... | |
void | setModelChildAlgorithmId (const QString &id) |
Sets the child algorithm id within the model which the parameter widget is associated with. More... | |
void | setProject (QgsProject *project) |
Sets the project associated with the widget. More... | |
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 75 of file qgsprocessingwidgetwrapper.h.
|
default |
Constructor for QgsProcessingParameterWidgetContext.
QgsMapCanvas * QgsProcessingParameterWidgetContext::mapCanvas | ( | ) | const |
Returns the map canvas associated with the widget.
Definition at line 39 of file qgsprocessingwidgetwrapper.cpp.
QgsProcessingModelAlgorithm * QgsProcessingParameterWidgetContext::model | ( | ) | const |
Returns the model which the parameter widget is associated with.
Definition at line 64 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 54 of file qgsprocessingwidgetwrapper.cpp.
QgsProject * QgsProcessingParameterWidgetContext::project | ( | ) | const |
Returns the project associated with the widget.
Definition at line 49 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 34 of file qgsprocessingwidgetwrapper.cpp.
void QgsProcessingParameterWidgetContext::setModel | ( | QgsProcessingModelAlgorithm * | model | ) |
Sets the model which the parameter widget is associated with.
Definition at line 69 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 59 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 44 of file qgsprocessingwidgetwrapper.cpp.