16 #ifndef QGSMAPLAYERACTIONREGISTRY_H
17 #define QGSMAPLAYERACTIONREGISTRY_H
48 AllActions = Layer | SingleFeature | MultipleFeatures
50 Q_DECLARE_FLAGS( Targets, Target )
59 EnabledOnlyWhenEditable = 1 << 1,
66 Q_DECLARE_FLAGS( Flags, Flag )
73 QgsMapLayerAction(
const QString &name, QObject *parent
SIP_TRANSFERTHIS, Targets targets = AllActions,
const QIcon &icon = QIcon(), QgsMapLayerAction::Flags flags = QgsMapLayerAction::Flags() );
87 QgsMapLayerAction::Flags flags()
const;
90 virtual bool canRunUsingLayer(
QgsMapLayer *layer )
const;
93 virtual void triggerForFeatures(
QgsMapLayer *layer,
const QList<QgsFeature> &featureList );
104 const Targets &
targets()
const {
return mTargets;}
110 bool isEnabledOnlyWhenEditable()
const;
114 void triggeredForFeatures(
QgsMapLayer *layer,
const QList<QgsFeature> &featureList );
125 bool mSingleLayer =
false;
130 bool mSpecificLayerType =
false;
135 Targets mTargets = Targets();
137 QgsMapLayerAction::Flags mFlags = QgsMapLayerAction::Flags();
187 QMap< QgsMapLayer *, QgsMapLayerAction * > mDefaultLayerActionMap;
193 #endif // QGSMAPLAYERACTIONREGISTRY_H