32 QList< QgsMapLayerAction * > validActions;
38 canRun = action->canRunUsingLayer( layer );
41 canRun = action->canRunUsingLayer( layer, context );
43 if ( canRun && ( targets & action->targets() ) )
45 validActions.append( action );
Encapsulates the context in which a QgsMapLayerAction action is executed.
QList< QgsMapLayerAction * > mapLayerActions(QgsMapLayer *layer, Qgis::MapLayerActionTargets targets=Qgis::MapLayerActionTarget::AllActions, const QgsMapLayerActionContext &context=QgsMapLayerActionContext())
Returns the map layer actions which can run on the specified layer.