QGIS API Documentation
2.2.0-Valmiera
|
An action which can run on map layers. More...
#include <qgsmaplayeractionregistry.h>
Signals | |
void | triggeredForFeature (QgsMapLayer *layer, QgsFeature *feature) |
Triggered when action has been run for a specific feature. | |
void | triggeredForLayer (QgsMapLayer *layer) |
Triggered when action has been run for a specific layer. |
Public Member Functions | |
QgsMapLayerAction (QString name, QObject *parent) | |
Creates a map layer action which can run on any layer. | |
QgsMapLayerAction (QString name, QObject *parent, QgsMapLayer *layer) | |
Creates a map layer action which can run only on a specific layer. | |
QgsMapLayerAction (QString name, QObject *parent, QgsMapLayer::LayerType layerType) | |
Creates a map layer action which can run on a specific type of layer. | |
~QgsMapLayerAction () | |
bool | canRunUsingLayer (QgsMapLayer *layer) const |
True if action can run using the specified layer. | |
void | triggerForFeature (QgsMapLayer *layer, QgsFeature *feature) |
Triggers the action with the specified layer and feature. | |
void | triggerForLayer (QgsMapLayer *layer) |
Triggers the action with the specified layer. |
Private Attributes | |
bool | mSingleLayer |
QgsMapLayer * | mActionLayer |
bool | mSpecificLayerType |
QgsMapLayer::LayerType | mLayerType |
An action which can run on map layers.
Definition at line 31 of file qgsmaplayeractionregistry.h.
QgsMapLayerAction::QgsMapLayerAction | ( | QString | name, |
QObject * | parent | ||
) |
Creates a map layer action which can run on any layer.
Definition at line 19 of file qgsmaplayeractionregistry.cpp.
QgsMapLayerAction::QgsMapLayerAction | ( | QString | name, |
QObject * | parent, | ||
QgsMapLayer * | layer | ||
) |
Creates a map layer action which can run only on a specific layer.
Definition at line 28 of file qgsmaplayeractionregistry.cpp.
QgsMapLayerAction::QgsMapLayerAction | ( | QString | name, |
QObject * | parent, | ||
QgsMapLayer::LayerType | layerType | ||
) |
Creates a map layer action which can run on a specific type of layer.
Definition at line 37 of file qgsmaplayeractionregistry.cpp.
QgsMapLayerAction::~QgsMapLayerAction | ( | ) |
Definition at line 46 of file qgsmaplayeractionregistry.cpp.
References QgsMapLayerActionRegistry::instance(), and QgsMapLayerActionRegistry::removeMapLayerAction().
bool QgsMapLayerAction::canRunUsingLayer | ( | QgsMapLayer * | layer | ) | const |
True if action can run using the specified layer.
Definition at line 52 of file qgsmaplayeractionregistry.cpp.
References mActionLayer, mLayerType, mSingleLayer, mSpecificLayerType, and QgsMapLayer::type().
|
signal |
Triggered when action has been run for a specific feature.
Referenced by triggerForFeature().
|
signal |
Triggered when action has been run for a specific layer.
Referenced by triggerForLayer().
void QgsMapLayerAction::triggerForFeature | ( | QgsMapLayer * | layer, |
QgsFeature * | feature | ||
) |
Triggers the action with the specified layer and feature.
This also emits the triggeredForLayer( QgsMapLayer *) and triggered() slots
Definition at line 75 of file qgsmaplayeractionregistry.cpp.
References triggeredForFeature(), and triggerForLayer().
Referenced by QgsAttributeTableModel::executeMapLayerAction().
void QgsMapLayerAction::triggerForLayer | ( | QgsMapLayer * | layer | ) |
Triggers the action with the specified layer.
This also emits the triggered() slot.
Definition at line 82 of file qgsmaplayeractionregistry.cpp.
References triggeredForLayer().
Referenced by triggerForFeature().
|
private |
Definition at line 67 of file qgsmaplayeractionregistry.h.
Referenced by canRunUsingLayer().
|
private |
Definition at line 72 of file qgsmaplayeractionregistry.h.
Referenced by canRunUsingLayer().
|
private |
Definition at line 65 of file qgsmaplayeractionregistry.h.
Referenced by canRunUsingLayer().
|
private |
Definition at line 70 of file qgsmaplayeractionregistry.h.
Referenced by canRunUsingLayer().