|
QGIS API Documentation 4.3.0-Master (4a47d6a9bb1)
|
Contains settings which reflect the context in which a Processing parameter widget is shown. More...
#include <qgsprocessingwidgetcontext.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. | |
| QgsModelDesignerDialog * | modelDesignerDialog () const |
| Returns the associated model designer dialog, if applicable. | |
| QgsProcessingContextGenerator * | processingContextGenerator () |
| Returns the Processing context generator class that will be used to retrieve a Processing context for the widget when required. | |
| QgsProject * | project () const |
| Returns the project associated with the widget. | |
| void | registerProcessingContextGenerator (QgsProcessingContextGenerator *generator) |
| Registers a Processing context generator class that will be used to retrieve a Processing context for the widget when required. | |
| 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 | setModelDesignerDialog (QgsModelDesignerDialog *dialog) |
| Sets the associated model designer dialog, if applicable. | |
| 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.
For instance, the parent model algorithm, a linked map canvas, and other relevant information which allows the widget to fine-tune its behavior.
Definition at line 49 of file qgsprocessingwidgetcontext.h.
|
default |
| QgsMapLayer * QgsProcessingParameterWidgetContext::activeLayer | ( | ) | const |
Returns the current active layer.
Definition at line 82 of file qgsprocessingwidgetcontext.cpp.
| QgsBrowserGuiModel * QgsProcessingParameterWidgetContext::browserModel | ( | ) | const |
Returns the browser model associated with the widget.
Definition at line 57 of file qgsprocessingwidgetcontext.cpp.
| QgsMapCanvas * QgsProcessingParameterWidgetContext::mapCanvas | ( | ) | const |
Returns the map canvas associated with the widget.
Definition at line 37 of file qgsprocessingwidgetcontext.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 47 of file qgsprocessingwidgetcontext.cpp.
| QgsProcessingModelAlgorithm * QgsProcessingParameterWidgetContext::model | ( | ) | const |
Returns the model which the parameter widget is associated with.
Definition at line 112 of file qgsprocessingwidgetcontext.cpp.
| QString QgsProcessingParameterWidgetContext::modelChildAlgorithmId | ( | ) | const |
Returns the child algorithm ID within the model which the parameter widget is associated with.
Definition at line 72 of file qgsprocessingwidgetcontext.cpp.
| QgsModelDesignerDialog * QgsProcessingParameterWidgetContext::modelDesignerDialog | ( | ) | const |
Returns the associated model designer dialog, if applicable.
Definition at line 102 of file qgsprocessingwidgetcontext.cpp.
| QgsProcessingContextGenerator * QgsProcessingParameterWidgetContext::processingContextGenerator | ( | ) |
Returns the Processing context generator class that will be used to retrieve a Processing context for the widget when required.
Definition at line 97 of file qgsprocessingwidgetcontext.cpp.
| QgsProject * QgsProcessingParameterWidgetContext::project | ( | ) | const |
Returns the project associated with the widget.
Definition at line 67 of file qgsprocessingwidgetcontext.cpp.
| void QgsProcessingParameterWidgetContext::registerProcessingContextGenerator | ( | QgsProcessingContextGenerator * | generator | ) |
Registers a Processing context generator class that will be used to retrieve a Processing context for the widget when required.
The generator must exist for the lifetime of the widget, ownership is not transferred.
Definition at line 92 of file qgsprocessingwidgetcontext.cpp.
| void QgsProcessingParameterWidgetContext::setActiveLayer | ( | QgsMapLayer * | layer | ) |
Sets the current active layer.
Definition at line 87 of file qgsprocessingwidgetcontext.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 52 of file qgsprocessingwidgetcontext.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 32 of file qgsprocessingwidgetcontext.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 42 of file qgsprocessingwidgetcontext.cpp.
| void QgsProcessingParameterWidgetContext::setModel | ( | QgsProcessingModelAlgorithm * | model | ) |
Sets the model which the parameter widget is associated with.
Definition at line 117 of file qgsprocessingwidgetcontext.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 77 of file qgsprocessingwidgetcontext.cpp.
| void QgsProcessingParameterWidgetContext::setModelDesignerDialog | ( | QgsModelDesignerDialog * | dialog | ) |
Sets the associated model designer dialog, if applicable.
Definition at line 107 of file qgsprocessingwidgetcontext.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 62 of file qgsprocessingwidgetcontext.cpp.