34 mParentWidget = newParentWidget;
39 return mAlgorithmName;
44 mAlgorithmName = name;
72 if ( mUseDeprecatedLoopBreak )
75 mUseDeprecatedLoopBreak =
true;
78 mUseDeprecatedLoopBreak =
false;
87 if ( mUseDeprecatedLoopBreak )
90 mUseDeprecatedLoopBreak =
true;
91 const QIcon res =
icon();
92 mUseDeprecatedLoopBreak =
false;
98 mToolboxDockWidget = widget;
103 if ( mUseDeprecatedLoopBreak )
106 mUseDeprecatedLoopBreak =
true;
110 mUseDeprecatedLoopBreak =
false;
115 if ( mUseDeprecatedLoopBreak )
118 mUseDeprecatedLoopBreak =
true;
120 mUseDeprecatedLoopBreak =
false;
125 return mToolboxDockWidget;
157 return mToolboxDockWidget;
162 mToolboxDockWidget = toolbox;
178 mToolboxDockWidget = toolbox;
183 if ( mUseDeprecatedLoopBreak )
186 mUseDeprecatedLoopBreak =
true;
188 mUseDeprecatedLoopBreak =
false;
193 if ( mUseDeprecatedLoopBreak )
196 mUseDeprecatedLoopBreak =
true;
200 mUseDeprecatedLoopBreak =
false;
static QIcon getThemeIcon(const QString &name, const QColor &fillColor=QColor(), const QColor &strokeColor=QColor())
Helper to get a theme icon.
Encapsulates the context in which a Processing action is executed.
void setAlgorithmName(const QString &name)
Sets the name of the algorithm associated with the action.
void setParentWidget(QWidget *widget)
Sets the parent widget to use for dialogs constructed when triggering the action.
QWidget * parentWidget() const
Returns the parent widget to use for dialogs constructed when triggering the action.
QString providerId() const
Returns the ID of the provider associated with the action.
void setProviderId(const QString &id)
Sets the ID of the provider associated with the action.
QString algorithmName() const
Returns the name of the algorithm associated with the action.
Abstract base class for processing algorithms.
Q_DECL_DEPRECATED QgsProcessingAlgorithm * getItemData()
Returns the associated algorithm the action will be shown for.
Q_DECL_DEPRECATED void setData(QgsProcessingAlgorithm *data, QgsDockWidget *toolbox)
Sets the associated algorithm and toolbox the action will be shown for.
virtual QIcon icon() const
Returns the icon to use for the action.
Q_DECL_DEPRECATED void setItemData(QgsProcessingAlgorithm *data)
Sets the associated algorithm the action will be shown for.
virtual Q_DECL_DEPRECATED bool isEnabled() const
Returns true if the action is enabled.
virtual bool isCompatibleWithAlgorithm(const QString &providerId, const QString &algorithmName)
Returns true if the action is compatible with the specified provider and algorithm.
Q_DECL_DEPRECATED QgsDockWidget * getToolbox()
Returns the parent toolbox the action will be shown in.
bool isSeparator() const
Returns true if the action is a separator action.
void setIsSeparator(bool isSeparator)
Sets whether the action is a separator action.
QgsProcessingToolboxContextAction(const QString &name=QString())
Constructor for QgsProcessingToolboxContextAction.
virtual ~QgsProcessingToolboxContextAction()
Q_DECL_DEPRECATED void setToolbox(QgsDockWidget *toolbox)
Sets the parent toolbox the action will be shown in.
virtual void trigger(const QgsProcessingActionContext &context)
Triggers the action.
virtual Q_DECL_DEPRECATED void execute()
Executes the action.
#define Q_NOWARN_DEPRECATED_POP
#define Q_NOWARN_DEPRECATED_PUSH