16#ifndef QGSMAPLAYERACTION_H
17#define QGSMAPLAYERACTION_H
65 Qgis::MapLayerActionFlags flags()
const;
88 Q_DECL_DEPRECATED
virtual void triggerForFeatures(
QgsMapLayer *layer,
const QList<QgsFeature> &featureList )
SIP_DEPRECATED;
126 void setTargets( Qgis::MapLayerActionTargets targets ) {mTargets = targets;}
128 Qgis::MapLayerActionTargets
targets()
const {
return mTargets;}
134 bool isEnabledOnlyWhenEditable()
const;
182 bool mSingleLayer =
false;
187 bool mSpecificLayerType =
false;
192 Qgis::MapLayerActionTargets mTargets = Qgis::MapLayerActionTargets();
194 Qgis::MapLayerActionFlags mFlags = Qgis::MapLayerActionFlags();
LayerType
Types of layers that can be added to a map.
The feature class encapsulates a single feature including its unique ID, geometry and a list of field...
Encapsulates the context in which a QgsMapLayerAction action is executed.
An action which can run on map layers The class can be used in two manners:
void triggeredForFeatureV2(QgsMapLayer *layer, const QgsFeature &feature, const QgsMapLayerActionContext &context)
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.
Q_DECL_DEPRECATED void triggeredForFeature(QgsMapLayer *layer, const QgsFeature &feature)
Triggered when action has been run for a specific feature.
void setTargets(Qgis::MapLayerActionTargets targets)
Define the targets of the action.
Q_DECL_DEPRECATED void triggeredForLayer(QgsMapLayer *layer)
Triggered when action has been run for a specific layer.
Qgis::MapLayerActionTargets targets() const
Returns availibity of action.
void triggeredForLayerV2(QgsMapLayer *layer, const QgsMapLayerActionContext &context)
Triggered when action has been run for a specific layer.
Base class for all map layer types.