@@ -7,40 +7,48 @@ class QgsMapLayerAction : QAction
77 public:
88 enum Target
99 {
10- Layer ,
10+ Layer,
1111 SingleFeature,
1212 MultipleFeatures,
1313 AllActions
1414 };
1515 typedef QFlags<QgsMapLayerAction::Target> Targets;
1616
17- /**Creates a map layer action which can run on any layer*/
17+ //! Creates a map layer action which can run on any layer
18+ //! @note using AllActions as a target probably does not make a lot of sense. This default action was settled for API compatiblity reasons.
1819 QgsMapLayerAction( QString name, QObject *parent, Targets targets = AllActions );
19- /**Creates a map layer action which can run only on a specific layer*/
20+
21+ //! Creates a map layer action which can run only on a specific layer
2022 QgsMapLayerAction( QString name, QObject *parent, QgsMapLayer* layer, Targets targets = AllActions );
21- /**Creates a map layer action which can run on a specific type of layer*/
23+
24+ //! Creates a map layer action which can run on a specific type of layer
2225 QgsMapLayerAction( QString name, QObject *parent, QgsMapLayer::LayerType layerType, Targets targets = AllActions );
26+
2327 ~QgsMapLayerAction();
2428
2529 /** True if action can run using the specified layer */
2630 bool canRunUsingLayer( QgsMapLayer* layer ) const;
2731
2832 /** Triggers the action with the specified layer and list of feature. */
29- void triggerForFeatures( QgsMapLayer* layer, QList<const QgsFeature*> featureList );
33+ void triggerForFeatures( QgsMapLayer* layer, const QList<QgsFeature> featureList );
34+
35+ /** Triggers the action with the specified layer and feature. */
36+ void triggerForFeature( QgsMapLayer* layer, const QgsFeature* feature );
3037
31- /** Triggers the action with the specified layer. This also emits the triggered() slot. */
38+ /** Triggers the action with the specified layer. */
3239 void triggerForLayer( QgsMapLayer* layer );
3340
3441 /** Define the targets of the action */
3542 void setTargets( Targets targets );
43+ /** Return availibity of action */
3644 const Targets& targets() const;
3745
3846 signals:
3947 /** Triggered when action has been run for a specific list of features */
40- void triggeredForFeatures( QgsMapLayer* layer, QList< const QgsFeature* > featureList );
48+ void triggeredForFeatures( QgsMapLayer* layer, const QList< QgsFeature> featureList );
4149
4250 /** Triggered when action has been run for a specific feature */
43- void triggeredForFeature( QgsMapLayer* layer, const QgsFeature* feature );
51+ void triggeredForFeature( QgsMapLayer* layer, const QgsFeature& feature );
4452
4553 /** Triggered when action has been run for a specific layer */
4654 void triggeredForLayer( QgsMapLayer* layer );
0 commit comments