16 #ifndef QGSMAPLAYERACTIONREGISTRY_H
17 #define QGSMAPLAYERACTIONREGISTRY_H
44 AllActions = Layer | SingleFeature | MultipleFeatures
46 Q_DECLARE_FLAGS( Targets, Target )
55 EnabledOnlyWhenEditable = 1 << 1,
62 Q_DECLARE_FLAGS( Flags, Flag )
69 QgsMapLayerAction(
const QString &name, QObject *parent
SIP_TRANSFERTHIS, Targets targets = AllActions,
const QIcon &icon = QIcon(), QgsMapLayerAction::Flags flags = QgsMapLayerAction::Flags() );
83 QgsMapLayerAction::Flags flags()
const;
89 void triggerForFeatures(
QgsMapLayer *layer,
const QList<QgsFeature> &featureList );
100 const Targets &
targets()
const {
return mTargets;}
106 bool isEnabledOnlyWhenEditable()
const;
121 bool mSingleLayer =
false;
126 bool mSpecificLayerType =
false;
131 Targets mTargets = Targets();
133 QgsMapLayerAction::Flags mFlags = QgsMapLayerAction::Flags();
183 QMap< QgsMapLayer *, QgsMapLayerAction * > mDefaultLayerActionMap;
189 #endif // QGSMAPLAYERACTIONREGISTRY_H