16 #ifndef QGSMAPLAYERACTIONREGISTRY_H 17 #define QGSMAPLAYERACTIONREGISTRY_H 34 Q_FLAGS( Availability )
42 AllActions = Layer | SingleFeature | MultipleFeatures
44 Q_DECLARE_FLAGS( Targets,
Target )
47 QgsMapLayerAction( QString name, QObject *parent, Targets targets = AllActions, QIcon icon = QIcon() );
54 QgsMapLayerAction( QString name, QObject *parent,
QgsMapLayer::LayerType layerType, Targets targets = AllActions, QIcon icon = QIcon() );
71 void setTargets( Targets targets ) {mTargets = targets;}
73 const Targets&
targets()
const {
return mTargets;}
77 void triggeredForFeatures(
QgsMapLayer* layer,
const QList<QgsFeature> featureList );
93 bool mSpecificLayerType;
101 Q_DECLARE_OPERATORS_FOR_FLAGS( QgsMapLayerAction::Targets )
144 QMap< QgsMapLayer*, QgsMapLayerAction* > mDefaultLayerActionMap;
148 #endif // QGSMAPLAYERACTIONREGISTRY_H Base class for all map layer types.
The feature class encapsulates a single feature including its id, geometry and a list of field/values...
LayerType
Layers enum defining the types of layers that can be added to a map.
QList< QgsMapLayerAction * > mMapLayerActionList
This class tracks map layer actions.
const Targets & targets() const
Return availibity of action.
An action which can run on map layers.