QGIS API Documentation 4.3.0-Master (16649ce5cc6)
Loading...
Searching...
No Matches
QgsProcessingToolboxContextAction Class Reference

A custom action to show in the context menu for the Processing toolbox. More...

#include <qgsprocessingprovideractions.h>

Public Member Functions

 QgsProcessingToolboxContextAction (const QString &name=QString())
 Constructor for QgsProcessingToolboxContextAction.
virtual ~QgsProcessingToolboxContextAction ()
QString actionName () const
 Returns the action's (translated, user visible) name.
virtual Q_DECL_DEPRECATED void execute ()
 Executes the action.
Q_DECL_DEPRECATED QgsProcessingAlgorithm * getItemData ()
 Returns the associated algorithm the action will be shown for.
Q_DECL_DEPRECATED QgsDockWidget * getToolbox ()
 Returns the parent toolbox the action will be shown in.
virtual QIcon icon () const
 Returns the icon to use for the action.
virtual bool isCompatibleWithAlgorithm (const QString &providerId, const QString &algorithmName)
 Returns true if the action is compatible with the specified provider and algorithm.
virtual Q_DECL_DEPRECATED bool isEnabled () const
 Returns true if the action is enabled.
bool isSeparator () const
 Returns true if the action is a separator action.
Q_DECL_DEPRECATED void setActionName (const QString &name)
 Sets the action's (translated, user visible) name.
Q_DECL_DEPRECATED void setData (QgsProcessingAlgorithm *data, QgsDockWidget *toolbox)
 Sets the associated algorithm and toolbox the action will be shown for.
void setIsSeparator (bool isSeparator)
 Sets whether the action is a separator action.
Q_DECL_DEPRECATED void setItemData (QgsProcessingAlgorithm *data)
 Sets the associated algorithm the action will be shown for.
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.

Detailed Description

A custom action to show in the context menu for the Processing toolbox.

Since
QGIS 4.4

Definition at line 189 of file qgsprocessingprovideractions.h.

Constructor & Destructor Documentation

◆ QgsProcessingToolboxContextAction()

QgsProcessingToolboxContextAction::QgsProcessingToolboxContextAction ( const QString & name = QString())

Constructor for QgsProcessingToolboxContextAction.

Definition at line 132 of file qgsprocessingprovideractions.cpp.

◆ ~QgsProcessingToolboxContextAction()

QgsProcessingToolboxContextAction::~QgsProcessingToolboxContextAction ( )
virtualdefault

Member Function Documentation

◆ actionName()

QString QgsProcessingToolboxContextAction::actionName ( ) const
inline

Returns the action's (translated, user visible) name.

Definition at line 203 of file qgsprocessingprovideractions.h.

◆ execute()

void QgsProcessingToolboxContextAction::execute ( )
virtual

Executes the action.

Deprecated
QGIS 4.4. Use trigger() instead.

Definition at line 181 of file qgsprocessingprovideractions.cpp.

◆ getItemData()

QgsProcessingAlgorithm * QgsProcessingToolboxContextAction::getItemData ( )

Returns the associated algorithm the action will be shown for.

Deprecated
QGIS 4.4

Definition at line 165 of file qgsprocessingprovideractions.cpp.

◆ getToolbox()

QgsDockWidget * QgsProcessingToolboxContextAction::getToolbox ( )

Returns the parent toolbox the action will be shown in.

Deprecated
QGIS 4.4

Definition at line 155 of file qgsprocessingprovideractions.cpp.

◆ icon()

QIcon QgsProcessingToolboxContextAction::icon ( ) const
virtual

Returns the icon to use for the action.

Definition at line 138 of file qgsprocessingprovideractions.cpp.

◆ isCompatibleWithAlgorithm()

bool QgsProcessingToolboxContextAction::isCompatibleWithAlgorithm ( const QString & providerId,
const QString & algorithmName )
virtual

Returns true if the action is compatible with the specified provider and algorithm.

Definition at line 148 of file qgsprocessingprovideractions.cpp.

◆ isEnabled()

bool QgsProcessingToolboxContextAction::isEnabled ( ) const
virtual

Returns true if the action is enabled.

Deprecated
QGIS 4.4

Definition at line 143 of file qgsprocessingprovideractions.cpp.

◆ isSeparator()

bool QgsProcessingToolboxContextAction::isSeparator ( ) const

Returns true if the action is a separator action.

See also
setIsSeparator()

Definition at line 203 of file qgsprocessingprovideractions.cpp.

◆ setActionName()

Q_DECL_DEPRECATED void QgsProcessingToolboxContextAction::setActionName ( const QString & name)
inline

Sets the action's (translated, user visible) name.

Deprecated
QGIS 4.4. Use the constructor setter instead.

Definition at line 209 of file qgsprocessingprovideractions.h.

◆ setData()

void QgsProcessingToolboxContextAction::setData ( QgsProcessingAlgorithm * data,
QgsDockWidget * toolbox )

Sets the associated algorithm and toolbox the action will be shown for.

Deprecated
QGIS 4.4

Definition at line 175 of file qgsprocessingprovideractions.cpp.

◆ setIsSeparator()

void QgsProcessingToolboxContextAction::setIsSeparator ( bool isSeparator)

Sets whether the action is a separator action.

See also
isSeparator()

Definition at line 208 of file qgsprocessingprovideractions.cpp.

◆ setItemData()

void QgsProcessingToolboxContextAction::setItemData ( QgsProcessingAlgorithm * data)

Sets the associated algorithm the action will be shown for.

Deprecated
QGIS 4.4

Definition at line 170 of file qgsprocessingprovideractions.cpp.

◆ setToolbox()

void QgsProcessingToolboxContextAction::setToolbox ( QgsDockWidget * toolbox)

Sets the parent toolbox the action will be shown in.

Deprecated
QGIS 4.4

Definition at line 160 of file qgsprocessingprovideractions.cpp.

◆ trigger()

void QgsProcessingToolboxContextAction::trigger ( const QgsProcessingActionContext & context)
virtual

Triggers the action.

Definition at line 191 of file qgsprocessingprovideractions.cpp.


The documentation for this class was generated from the following files: