QGIS API Documentation  2.2.0-Valmiera
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Signals | Public Member Functions | Private Attributes | List of all members
QgsMapLayerAction Class Reference

An action which can run on map layers. More...

#include <qgsmaplayeractionregistry.h>

Collaboration diagram for QgsMapLayerAction:
Collaboration graph
[legend]

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
QgsMapLayermActionLayer
bool mSpecificLayerType
QgsMapLayer::LayerType mLayerType

Detailed Description

An action which can run on map layers.

Definition at line 31 of file qgsmaplayeractionregistry.h.

Constructor & Destructor Documentation

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 ( )

Member Function Documentation

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().

void QgsMapLayerAction::triggeredForFeature ( QgsMapLayer layer,
QgsFeature feature 
)
signal

Triggered when action has been run for a specific feature.

Referenced by triggerForFeature().

void QgsMapLayerAction::triggeredForLayer ( QgsMapLayer layer)
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().

Member Data Documentation

QgsMapLayer* QgsMapLayerAction::mActionLayer
private

Definition at line 67 of file qgsmaplayeractionregistry.h.

Referenced by canRunUsingLayer().

QgsMapLayer::LayerType QgsMapLayerAction::mLayerType
private

Definition at line 72 of file qgsmaplayeractionregistry.h.

Referenced by canRunUsingLayer().

bool QgsMapLayerAction::mSingleLayer
private

Definition at line 65 of file qgsmaplayeractionregistry.h.

Referenced by canRunUsingLayer().

bool QgsMapLayerAction::mSpecificLayerType
private

Definition at line 70 of file qgsmaplayeractionregistry.h.

Referenced by canRunUsingLayer().


The documentation for this class was generated from the following files: