QGIS API Documentation 3.41.0-Master (af5edcb665c)
|
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. | |
Q_DECL_DEPRECATED void | triggeredForFeatures (QgsMapLayer *layer, const QList< QgsFeature > &featureList) |
Triggered when action has been run for a specific list of features. | |
void | triggeredForFeaturesV2 (QgsMapLayer *layer, const QList< QgsFeature > &featureList, const QgsMapLayerActionContext &context) |
Triggered when action has been run for a specific list of features. | |
void | triggeredForFeatureV2 (QgsMapLayer *layer, const QgsFeature &feature, const QgsMapLayerActionContext &context) |
Triggered when action has been run for a specific feature. | |
Q_DECL_DEPRECATED void | triggeredForLayer (QgsMapLayer *layer) |
Triggered when action has been run for a specific layer. | |
void | triggeredForLayerV2 (QgsMapLayer *layer, const QgsMapLayerActionContext &context) |
Triggered when action has been run for a specific layer. | |
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. | |
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. | |
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. | |
~QgsMapLayerAction () override | |
virtual Q_DECL_DEPRECATED bool | canRunUsingLayer (QgsMapLayer *layer) const |
Returns true if the action can run using the specified layer. | |
virtual bool | canRunUsingLayer (QgsMapLayer *layer, const QgsMapLayerActionContext &context) const |
Returns true if the action can run using the specified layer. | |
Qgis::MapLayerActionFlags | flags () const |
Layer behavior flags. | |
bool | isEnabledOnlyWhenEditable () const |
Returns true if the action is only enabled for layers in editable mode. | |
void | setTargets (Qgis::MapLayerActionTargets targets) |
Define the targets of the action. | |
Qgis::MapLayerActionTargets | targets () const |
Returns availibity of action. | |
virtual Q_DECL_DEPRECATED void | triggerForFeature (QgsMapLayer *layer, const QgsFeature &feature) |
Triggers the action with the specified layer and feature. | |
virtual void | triggerForFeature (QgsMapLayer *layer, const QgsFeature &feature, const QgsMapLayerActionContext &context) |
Triggers the action with the specified layer and feature. | |
virtual Q_DECL_DEPRECATED void | triggerForFeatures (QgsMapLayer *layer, const QList< QgsFeature > &featureList) |
Triggers the action with the specified layer and list of feature. | |
virtual void | triggerForFeatures (QgsMapLayer *layer, const QList< QgsFeature > &featureList, const QgsMapLayerActionContext &context) |
Triggers the action with the specified layer and list of feature. | |
virtual Q_DECL_DEPRECATED void | triggerForLayer (QgsMapLayer *layer) |
Triggers the action with the specified layer. | |
virtual void | triggerForLayer (QgsMapLayer *layer, const QgsMapLayerActionContext &context) |
Triggers the action with the specified layer. | |
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 24 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 31 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 40 of file qgsmaplayeraction.cpp.
|
override |
Definition at line 49 of file qgsmaplayeraction.cpp.
|
virtual |
Returns true
if the action can run using the specified layer.
Definition at line 60 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 65 of file qgsmaplayeraction.cpp.
Qgis::MapLayerActionFlags QgsMapLayerAction::flags | ( | ) | const |
Layer behavior flags.
Definition at line 55 of file qgsmaplayeraction.cpp.
bool QgsMapLayerAction::isEnabledOnlyWhenEditable | ( | ) | const |
Returns true
if the action is only enabled for layers in editable mode.
Definition at line 135 of file qgsmaplayeraction.cpp.
|
inline |
Define the targets of the action.
Definition at line 124 of file qgsmaplayeraction.h.
|
inline |
Returns availibity of action.
Definition at line 126 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 106 of file qgsmaplayeraction.cpp.
|
virtual |
Triggers the action with the specified layer and feature.
Definition at line 125 of file qgsmaplayeraction.cpp.
|
virtual |
Triggers the action with the specified layer and list of feature.
Definition at line 99 of file qgsmaplayeraction.cpp.
|
virtual |
Triggers the action with the specified layer and list of feature.
Definition at line 120 of file qgsmaplayeraction.cpp.
|
virtual |
Triggers the action with the specified layer.
Definition at line 113 of file qgsmaplayeraction.cpp.
|
virtual |
Triggers the action with the specified layer.
Definition at line 130 of file qgsmaplayeraction.cpp.