QGIS API Documentation 3.32.0-Lima (311a8cb8a6)
|
An action which can run on map layers The class can be used in two manners: More...
#include <qgsmaplayeraction.h>
Signals | |
Q_DECL_DEPRECATED void | triggeredForFeature (QgsMapLayer *layer, const QgsFeature &feature) |
Triggered when action has been run for a specific feature. More... | |
Q_DECL_DEPRECATED void | triggeredForFeatures (QgsMapLayer *layer, const QList< QgsFeature > &featureList) |
Triggered when action has been run for a specific list of features. More... | |
void | triggeredForFeaturesV2 (QgsMapLayer *layer, const QList< QgsFeature > &featureList, const QgsMapLayerActionContext &context) |
Triggered when action has been run for a specific list of features. More... | |
void | triggeredForFeatureV2 (QgsMapLayer *layer, const QgsFeature &feature, const QgsMapLayerActionContext &context) |
Triggered when action has been run for a specific feature. More... | |
Q_DECL_DEPRECATED void | triggeredForLayer (QgsMapLayer *layer) |
Triggered when action has been run for a specific layer. More... | |
void | triggeredForLayerV2 (QgsMapLayer *layer, const QgsMapLayerActionContext &context) |
Triggered when action has been run for a specific layer. More... | |
Public Member Functions | |
QgsMapLayerAction (const QString &name, QObject *parent, Qgis::LayerType layerType, Qgis::MapLayerActionTargets targets=Qgis::MapLayerActionTarget::AllActions, const QIcon &icon=QIcon(), Qgis::MapLayerActionFlags flags=Qgis::MapLayerActionFlags()) | |
Creates a map layer action which can run on a specific type of layer. More... | |
QgsMapLayerAction (const QString &name, QObject *parent, Qgis::MapLayerActionTargets targets=Qgis::MapLayerActionTarget::AllActions, const QIcon &icon=QIcon(), Qgis::MapLayerActionFlags flags=Qgis::MapLayerActionFlags()) | |
Creates a map layer action which can run on any layer. More... | |
QgsMapLayerAction (const QString &name, QObject *parent, QgsMapLayer *layer, Qgis::MapLayerActionTargets targets=Qgis::MapLayerActionTarget::AllActions, const QIcon &icon=QIcon(), Qgis::MapLayerActionFlags flags=Qgis::MapLayerActionFlags()) | |
Creates a map layer action which can run only on a specific layer. More... | |
~QgsMapLayerAction () override | |
virtual Q_DECL_DEPRECATED bool | canRunUsingLayer (QgsMapLayer *layer) const |
Returns true if the action can run using the specified layer. More... | |
virtual bool | canRunUsingLayer (QgsMapLayer *layer, const QgsMapLayerActionContext &context) const |
Returns true if the action can run using the specified layer. More... | |
Qgis::MapLayerActionFlags | flags () const |
Layer behavior flags. More... | |
bool | isEnabledOnlyWhenEditable () const |
Returns true if the action is only enabled for layers in editable mode. More... | |
void | setTargets (Qgis::MapLayerActionTargets targets) |
Define the targets of the action. More... | |
Qgis::MapLayerActionTargets | targets () const |
Returns availibity of action. More... | |
virtual Q_DECL_DEPRECATED void | triggerForFeature (QgsMapLayer *layer, const QgsFeature &feature) |
Triggers the action with the specified layer and feature. More... | |
virtual void | triggerForFeature (QgsMapLayer *layer, const QgsFeature &feature, const QgsMapLayerActionContext &context) |
Triggers the action with the specified layer and feature. More... | |
virtual Q_DECL_DEPRECATED void | triggerForFeatures (QgsMapLayer *layer, const QList< QgsFeature > &featureList) |
Triggers the action with the specified layer and list of feature. More... | |
virtual void | triggerForFeatures (QgsMapLayer *layer, const QList< QgsFeature > &featureList, const QgsMapLayerActionContext &context) |
Triggers the action with the specified layer and list of feature. More... | |
virtual Q_DECL_DEPRECATED void | triggerForLayer (QgsMapLayer *layer) |
Triggers the action with the specified layer. More... | |
virtual void | triggerForLayer (QgsMapLayer *layer, const QgsMapLayerActionContext &context) |
Triggers the action with the specified layer. More... | |
An action which can run on map layers The class can be used in two manners:
Definition at line 41 of file qgsmaplayeraction.h.
QgsMapLayerAction::QgsMapLayerAction | ( | const QString & | name, |
QObject * | parent, | ||
Qgis::MapLayerActionTargets | targets = Qgis::MapLayerActionTarget::AllActions , |
||
const QIcon & | icon = QIcon() , |
||
Qgis::MapLayerActionFlags | flags = Qgis::MapLayerActionFlags() |
||
) |
Creates a map layer action which can run on any layer.
Definition at line 23 of file qgsmaplayeraction.cpp.
QgsMapLayerAction::QgsMapLayerAction | ( | const QString & | name, |
QObject * | parent, | ||
QgsMapLayer * | layer, | ||
Qgis::MapLayerActionTargets | targets = Qgis::MapLayerActionTarget::AllActions , |
||
const QIcon & | icon = QIcon() , |
||
Qgis::MapLayerActionFlags | flags = Qgis::MapLayerActionFlags() |
||
) |
Creates a map layer action which can run only on a specific layer.
Definition at line 30 of file qgsmaplayeraction.cpp.
QgsMapLayerAction::QgsMapLayerAction | ( | const QString & | name, |
QObject * | parent, | ||
Qgis::LayerType | layerType, | ||
Qgis::MapLayerActionTargets | targets = Qgis::MapLayerActionTarget::AllActions , |
||
const QIcon & | icon = QIcon() , |
||
Qgis::MapLayerActionFlags | flags = Qgis::MapLayerActionFlags() |
||
) |
Creates a map layer action which can run on a specific type of layer.
Definition at line 39 of file qgsmaplayeraction.cpp.
|
override |
Definition at line 48 of file qgsmaplayeraction.cpp.
|
virtual |
Returns true
if the action can run using the specified layer.
Definition at line 59 of file qgsmaplayeraction.cpp.
|
virtual |
Returns true
if the action can run using the specified layer.
false
to the deprecated canRunUsingLayer() method which does not accept a QgsMapLayerActionContext argument.Definition at line 64 of file qgsmaplayeraction.cpp.
Qgis::MapLayerActionFlags QgsMapLayerAction::flags | ( | ) | const |
bool QgsMapLayerAction::isEnabledOnlyWhenEditable | ( | ) | const |
Returns true
if the action is only enabled for layers in editable mode.
Definition at line 134 of file qgsmaplayeraction.cpp.
|
inline |
Define the targets of the action.
Definition at line 126 of file qgsmaplayeraction.h.
|
inline |
Returns availibity of action.
Definition at line 128 of file qgsmaplayeraction.h.
|
signal |
Triggered when action has been run for a specific feature.
|
signal |
Triggered when action has been run for a specific list of features.
|
signal |
Triggered when action has been run for a specific list of features.
|
signal |
Triggered when action has been run for a specific feature.
|
signal |
Triggered when action has been run for a specific layer.
|
signal |
Triggered when action has been run for a specific layer.
|
virtual |
Triggers the action with the specified layer and feature.
Definition at line 105 of file qgsmaplayeraction.cpp.
|
virtual |
Triggers the action with the specified layer and feature.
Definition at line 124 of file qgsmaplayeraction.cpp.
|
virtual |
Triggers the action with the specified layer and list of feature.
Definition at line 98 of file qgsmaplayeraction.cpp.
|
virtual |
Triggers the action with the specified layer and list of feature.
Definition at line 119 of file qgsmaplayeraction.cpp.
|
virtual |
Triggers the action with the specified layer.
Definition at line 112 of file qgsmaplayeraction.cpp.
|
virtual |
Triggers the action with the specified layer.
Definition at line 129 of file qgsmaplayeraction.cpp.